Events

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.

EndpointScopeDoes
GET /v1/eventsevents:readList events, newest first
GET /v1/events/{id}events:readRetrieve an event

Events are kept for 30 days. Each belongs to one mode: a test token sees only test events.

The event object#

A payout.completed event
{
  "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"
  }
}
FieldTypeDescription
idstringevt_…. Unique. Deduplicate on it
objectstringevent
typestringWhat happened, as <family>.<what>. See Event types
api_versionstringThe envelope version. Always v1
created_atstringWhen the change happened, UTC, whole seconds
livemodebooleantrue for live data, false for test
resource.objectstringThe kind of object the event is about: payout, beneficiary, originator, fx_order, business_verification, webhook_subscription or treasury_funding
resource.idstringThe object's id
resource.versionintegerThe object's version after the change. See Order and duplicates
dataobjectThe 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.objectCompared with the REST resource, it leaves out
payoutpurpose_description, tax_withheld, the five detail statuses, failure.reason and livemode
beneficiaryThe 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
originatorEvery personal detail, status_reason_code, status_reason_message and livemode
fx_orderlivemode. failure_reason is only its code, the part before any :
business_verificationlivemode
webhook_subscriptionEverything 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_fundingThe 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.

typeWhen
payout.createdA payout was accepted in CREATED
payout.compliance_reviewThe payout waits for a compliance review by Superpay
payout.approvedThe payout passed Superpay's checks
payout.funds_reservedamount + fee are held from your INR balance
payout.submittedSuperpay's banking partner acknowledged the payout
payout.provider_pendingThe Indian banking network is processing it
payout.completedThe beneficiary's bank credited the account
payout.failedThe payout failed. data.failure.code says why
payout.cancel_requestedYour 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.cancelledThe payout was cancelled
payout.reversedThe beneficiary's bank returned a completed payout
payout.unknownThe 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#

typeWhen
originator.createdAn originator was created
originator.verifiedThe 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.rejectedThe originator became REJECTED
originator.suspendedThe originator became SUSPENDED
originator.verification_updatedThe originator's verification changed: a capability was granted or refused, or requirements became due
beneficiary.createdA beneficiary was created
beneficiary.verifiedThe beneficiary became ACTIVE and VERIFIED: payable. For a UPI ID, which is not verified, it means that Superpay holds everything a payout needs
beneficiary.rejectedThe beneficiary became REJECTED
beneficiary.name_mismatchThe name the bank holds does not match holder_name
beneficiary.suspendedThe beneficiary became SUSPENDED
beneficiary.deletedYou deleted the beneficiary
beneficiary.verification_updatedThe beneficiary's verification changed, including on creation, on a correction and on deletion
  • *.created is always followed by *.verification_updated with the same resource.version.
  • An originator that is ACTIVE when it is created sends three events with resource.version 1 and the same data, which already shows ACTIVE: originator.created, originator.verified, then originator.verification_updated.
  • A status event and the *.verification_updated of the same change share a resource.version and the same data.
  • A change in a beneficiary's standing sends one status event. rejected takes precedence over suspended, then verified, then name_mismatch.
  • A beneficiary verified without a bank-held name being reported sends beneficiary.verified with no name_match in data.
  • A beneficiary that is a UPI ID and holds everything a payout needs when it is created sends three events with resource.version 1 and the same data, which already shows ACTIVE: beneficiary.created, beneficiary.verified, then beneficiary.verification_updated. Its data.account carries vpa_handle, and never the UPI ID.
  • An originator entering VERIFYING is not announced. Neither is one going back to PENDING: only originator.verification_updated is sent.

Conversions#

typeWhen
fx.executedA conversion executed. The INR is in your balance
fx.failedA 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#

typeWhen
business.verification_updatedYour business verification changed: its status, its reason, or what is required
webhook_subscription.disabledSuperpay 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#

typeWhen
treasury.funding_detectedA deposit for an announced funding was seen on chain
treasury.funding_confirmedIt reached the confirmations it needs
treasury.funding_creditedIt was credited
treasury.funding_returnedIt was returned. Nothing was credited

These belong to the retired stablecoin fundings. See Stablecoin fundings.

List events#

GET/v1/eventsevents:read

The 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.

typestring

Query 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_idstring

Query parameter. Only the events about this object, such as one payout. An unknown id returns an empty page.

limitinteger

Query parameter. 1 to 100. Default 10.

starting_afterstring

Query parameter. An event id. Returns the page of events published before it.

ending_beforestring

Query 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.

Shell
curl -G https://api.withsuperpay.com/v1/events \
  -H "Authorization: Bearer $SUPERPAY_TOKEN" \
  -d 'type=payout.*' \
  -d resource_id=po_01M2FPYTCG9B1D3F5H7K9M1P3R
  • 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_next is always true. 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#

GET/v1/events/{id}events:read

Returns 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.

Shell
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:

  1. Keep a watermark: the id of the newest event you have processed. Take it from a list page, never from a webhook.
  2. Call GET /v1/events?ending_before=<watermark>&limit=100. The page holds the next events published after the watermark, at most 100, newest first.
  3. Process them oldest first. Then make the first id on the page your new watermark.
  4. Repeat until a page comes back empty. Do not stop on has_next: with ending_before it is always true.

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.

Catch up from a watermark
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. data only 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#

CodeHTTPEndpointWhenWhat you do
INVALID_ARGUMENT400Listlimit 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_EXPIRED400ListThe cursor is not a published event of yours from the last 30 daysList again without a cursor
EVENT_NOT_FOUND404RetrieveNo such event of yours in this mode within the last 30 daysCheck the id and mode

Authentication and scope errors are on Errors.