Events
Changes to your objects are recorded as events. Read the last 30 days, or have them sent to you as webhooks.
An event records one change to one of your objects: a payout completing, a beneficiary verified, your business verification asking for a document. It is recorded in the same step as the change itself, so an event exists exactly when its change happened. The event types list which changes are announced: not every change is, for example a conversion starting to execute.
Read events here, or have Superpay send them to you with webhooks. An event is the same bytes wherever you read it: in a list, fetched by id, or in a webhook delivery.
| Endpoint | Scope | Does |
|---|---|---|
GET /v1/events | events:read | List events, newest first |
GET /v1/events/{id} | events:read | Retrieve an event |
Events are kept for 30 days. Each belongs to one mode: a test token sees only test events.
The event object#
{
"id": "evt_01M2G0A7ZQ3K9V5T1R8N6P4J2H",
"object": "event",
"type": "payout.completed",
"api_version": "v1",
"created_at": "2026-09-30T10:21:41Z",
"livemode": false,
"resource": {
"object": "payout",
"id": "po_01M2FPYTCG9B1D3F5H7K9M1P3R",
"version": 8
},
"data": {
"object": "payout",
"id": "po_01M2FPYTCG9B1D3F5H7K9M1P3R",
"originator_id": "org_01M2FPKH20W4N5X6M3P9R2T1VA",
"beneficiary_id": "ben_01M2FPNHGG6C8D0F2H4K6M8P0R",
"corridor": "IN-INR-BANK",
"amount": { "amount": 5000000, "currency": "INR" },
"fee": { "amount": 12500, "currency": "INR" },
"status": "COMPLETED",
"purpose_code": "P1301",
"reference": "INV-2026-0042",
"bank_reference": "425714839201",
"rail": "IMPS",
"created_at": "2026-09-30T10:21:14Z",
"updated_at": "2026-09-30T10:21:41Z",
"submitted_at": "2026-09-30T10:21:16Z",
"completed_at": "2026-09-30T10:21:41Z"
}
}| Field | Type | Description |
|---|---|---|
id | string | evt_…. Unique. Deduplicate on it |
object | string | event |
type | string | What happened, as <family>.<what>. See Event types |
api_version | string | The envelope version. Always v1 |
created_at | string | When the change happened, UTC, whole seconds |
livemode | boolean | true for live data, false for test |
resource.object | string | The kind of object the event is about: payout, beneficiary, originator, fx_order, business_verification, webhook_subscription or treasury_funding |
resource.id | string | The object's id |
resource.version | integer | The object's version after the change. See Order and duplicates |
data | object | The object as the change left it. See What data holds |
Superpay sends the event as compact JSON of at most 16 KiB, shown formatted above. Treat the bytes you receive as the event: never re-serialise one to compare or verify it.
What data holds#
data is a subset of the object's REST resource, with the same field names, types and formats. data.object equals resource.object. It never carries personal data or free text:
data.object | Compared with the REST resource, it leaves out |
|---|---|
payout | purpose_description, tax_withheld, the five detail statuses, failure.reason and livemode |
beneficiary | The holder name, the IFSC, the relationship, the holder's identity (date_of_birth, nationality, address, id_document), account_type, status_reason_code, status_reason_message and livemode |
originator | Every personal detail, status_reason_code, status_reason_message and livemode |
fx_order | livemode. failure_reason is only its code, the part before any : |
business_verification | livemode |
webhook_subscription | Everything except id, status, disabled_reason, status_changed_at and created_at. It adds url_host, the URL's host, and failing_since when the endpoint was failing |
treasury_funding | The deposit address and memo, and livemode |
data is not a replacement for the object. Retrieve the object when you need every field.
Event types#
Ignore a type you do not recognise. New types are added over time.
Payouts#
One event for each status a payout enters, except VALIDATING and SUBMISSION_PENDING. A type can repeat for one payout: payout.submitted comes again if an UNKNOWN payout turns out to be SUBMITTED.
type | When |
|---|---|
payout.created | A payout was accepted in CREATED |
payout.compliance_review | The payout waits for a compliance review by Superpay |
payout.approved | The payout passed Superpay's checks |
payout.funds_reserved | amount + fee are held from your INR balance |
payout.submitted | Superpay's banking partner acknowledged the payout |
payout.provider_pending | The Indian banking network is processing it |
payout.completed | The beneficiary's bank credited the account |
payout.failed | The payout failed. data.failure.code says why |
payout.cancel_requested | Your first cancel of a payout that could not be cancelled in the same request. data.cancel_requested_at is set and status is unchanged |
payout.cancelled | The payout was cancelled |
payout.reversed | The beneficiary's bank returned a completed payout |
payout.unknown | The outcome is not confirmed yet. Funds stay held |
A payout that goes straight through sends created, approved, funds_reserved, submitted, provider_pending and completed, though some can be skipped.
Originators and beneficiaries#
type | When |
|---|---|
originator.created | An originator was created |
originator.verified | The originator became ACTIVE: Superpay holds everything it needs to pay on the sender's behalf, and no check is outstanding. Sent at creation when that is already so |
originator.rejected | The originator became REJECTED |
originator.suspended | The originator became SUSPENDED |
originator.verification_updated | The originator's verification changed: a capability was granted or refused, or requirements became due |
beneficiary.created | A beneficiary was created |
beneficiary.verified | The beneficiary became ACTIVE and VERIFIED: payable. For a UPI ID, which is not verified, it means that Superpay holds everything a payout needs |
beneficiary.rejected | The beneficiary became REJECTED |
beneficiary.name_mismatch | The name the bank holds does not match holder_name |
beneficiary.suspended | The beneficiary became SUSPENDED |
beneficiary.deleted | You deleted the beneficiary |
beneficiary.verification_updated | The beneficiary's verification changed, including on creation, on a correction and on deletion |
*.createdis always followed by*.verification_updatedwith the sameresource.version.- An originator that is
ACTIVEwhen it is created sends three events withresource.version1 and the samedata, which already showsACTIVE:originator.created,originator.verified, thenoriginator.verification_updated. - A status event and the
*.verification_updatedof the same change share aresource.versionand the samedata. - A change in a beneficiary's standing sends one status event.
rejectedtakes precedence oversuspended, thenverified, thenname_mismatch. - A beneficiary verified without a bank-held name being reported sends
beneficiary.verifiedwith noname_matchindata. - A beneficiary that is a UPI ID and holds everything a payout needs when it is created sends three events with
resource.version1 and the samedata, which already showsACTIVE:beneficiary.created,beneficiary.verified, thenbeneficiary.verification_updated. Itsdata.accountcarriesvpa_handle, and never the UPI ID. - An originator entering
VERIFYINGis not announced. Neither is one going back toPENDING: onlyoriginator.verification_updatedis sent.
Conversions#
type | When |
|---|---|
fx.executed | A conversion executed. The INR is in your balance |
fx.failed | A conversion failed. data.failure_reason says why |
The data of both is the conversion (object fx_order). Each conversion ends with exactly one of the two. Quotes send no events, and neither does a conversion starting to execute or becoming UNKNOWN: retrieve a conversion that has not ended when you expect.
Your account#
type | When |
|---|---|
business.verification_updated | Your business verification changed: its status, its reason, or what is required |
webhook_subscription.disabled | Superpay disabled one of your webhook subscriptions because its endpoint kept failing. It is sent to your other subscriptions that match it, never to the disabled one. Your own changes to subscriptions send no events |
Stablecoin fundings#
type | When |
|---|---|
treasury.funding_detected | A deposit for an announced funding was seen on chain |
treasury.funding_confirmed | It reached the confirmations it needs |
treasury.funding_credited | It was credited |
treasury.funding_returned | It was returned. Nothing was credited |
These belong to the retired stablecoin fundings. See Stablecoin fundings.
List events#
/v1/eventsevents:readThe events of the last 30 days, in the token's mode, newest first in the order they were published. An event is published, and listed, a moment after the change it records. Until then it can only be retrieved by id.
typestringQuery parameter. An exact type (payout.completed) or every type of one family (payout.*). Any other value, * included, returns 400 INVALID_ARGUMENT rather than an empty page. Send it once.
resource_idstringQuery parameter. Only the events about this object, such as one payout. An unknown id returns an empty page.
limitintegerQuery parameter. 1 to 100. Default 10.
starting_afterstringQuery parameter. An event id. Returns the page of events published before it.
ending_beforestringQuery parameter. An event id. Returns the page of events published after it, still newest first. Can't be combined with starting_after.
Filters combine. There is no time-range filter.
curl -G https://api.withsuperpay.com/v1/events \
-H "Authorization: Bearer $SUPERPAY_TOKEN" \
-d 'type=payout.*' \
-d resource_id=po_01M2FPYTCG9B1D3F5H7K9M1P3R{
"object": "list",
"data": [
{
"id": "evt_01M2G0A7ZQ3K9V5T1R8N6P4J2H",
"object": "event",
"type": "payout.completed",
"api_version": "v1",
"created_at": "2026-09-30T10:21:41Z",
"livemode": false,
"resource": { "object": "payout", "id": "po_01M2FPYTCG9B1D3F5H7K9M1P3R", "version": 8 },
"data": { "object": "payout", "id": "po_01M2FPYTCG9B1D3F5H7K9M1P3R", "status": "COMPLETED" }
}
],
"has_next": true
}- A cursor must be an event of yours, in this mode, that has been published within the last 30 days. It need not match your filters. Any other id, including one that has aged out, returns
400 EVENT_CURSOR_EXPIRED: list again without a cursor. - With
ending_before,has_nextis alwaystrue. Stop when a page comes back empty. - The list never inserts an event behind one it has already served. A newly published event always joins the newest end.
- Event ids are not in list order. Page with the cursors; never sort or compare ids.
Retrieve an event#
/v1/events/{id}events:readReturns one event of the last 30 days, byte for byte as it was recorded. An event can be read here from the moment its change happened, a moment before it is listed and delivered.
curl https://api.withsuperpay.com/v1/events/evt_01M2G0A7ZQ3K9V5T1R8N6P4J2H \
-H "Authorization: Bearer $SUPERPAY_TOKEN"A malformed or unknown id, an event from the other mode, or one older than 30 days returns 404 EVENT_NOT_FOUND.
Keep up without gaps#
Webhooks arrive in no particular order and can miss events while your endpoint is down. To be sure you have processed every event, walk the list forward from a watermark:
- Keep a watermark: the
idof the newest event you have processed. Take it from a list page, never from a webhook. - Call
GET /v1/events?ending_before=<watermark>&limit=100. The page holds the next events published after the watermark, at most 100, newest first. - Process them oldest first. Then make the first
idon the page your new watermark. - Repeat until a page comes back empty. Do not stop on
has_next: withending_beforeit is alwaystrue.
With no watermark yet, or when yours has aged out (400 EVENT_CURSOR_EXPIRED), start again from the newest page and walk back with starting_after as far as you need. Events older than 30 days are gone: reconcile those objects with their GET endpoints.
async function catchUp(watermark, getToken, handle) {
for (;;) {
const qs = new URLSearchParams({ ending_before: watermark, limit: '100' });
const res = await fetch(`https://api.withsuperpay.com/v1/events?${qs}`, {
headers: { Authorization: `Bearer ${await getToken()}` },
});
const page = await res.json();
if (!res.ok) throw page; // EVENT_CURSOR_EXPIRED: start again from the newest page
if (page.data.length === 0) return watermark;
for (const event of [...page.data].reverse()) await handle(event); // oldest first
watermark = page.data[0].id;
}
}Order and duplicates#
- Events are listed in the order they were published, which is not always the order their changes happened.
- For one object, order its events by
resource.version. Versions only grow, but skip numbers: a change nobody is told about still takes a version. Two events of one change can share a version. - Deduplicate on the event
id. The same event can reach you from a webhook and from the list.
Versioning#
- Envelope fields are never removed, renamed or retyped.
dataonly gains fields. - Enums are open. Ignore a field, a value or an event type you don't know.
- A breaking change ships as a new type name, such as
payout.completed_v2, sent alongside the old one for at least six months. - Type names match
^[a-z][a-z_]*\.[a-z][a-z0-9_]*$. The part before the dot is the family.
Errors#
| Code | HTTP | Endpoint | When | What you do |
|---|---|---|---|---|
INVALID_ARGUMENT | 400 | List | limit is not 1 to 100 (parameter_range_invalid), both cursors were sent, or type names no type or family (parameter_value_invalid) | Fix the parameter |
EVENT_CURSOR_EXPIRED | 400 | List | The cursor is not a published event of yours from the last 30 days | List again without a cursor |
EVENT_NOT_FOUND | 404 | Retrieve | No such event of yours in this mode within the last 30 days | Check the id and mode |
Authentication and scope errors are on Errors.