API reference
Webhook events
The signed body Wegopay posts to your webhook endpoint. Verify the signature over the raw bytes before reading any field.
Payment event
your webhook URLSigned historical payment snapshot delivered at least once. Verify the exact raw bytes before reading fields. New optional fields may be added to version 1; tolerate unknown fields. Retrieve current payment state before fulfillment.
Headers Wegopay-Signature and Wegopay-Event-Id. See verifying signatures.
Body
versionintegerAlways
1eventIdstringtypestringOne of
payment.paidpayment.failedpayment.refundedpayment.partially_refundedpayment.disputedpayment.dispute_wonpayment.dispute_lostcreatedAtstring <date-time>dataobjectMerchant-safe projection of verified state. Processor identities, costs, account balances, credentials, action secrets, and raw provider data are excluded. New fields may be absent from historical queued events.
idstring <uuid>referencestringstatusstringOne of
pendingrequiresActionpaidfailedrefundedpartiallyRefundeddisputeddisputeWondisputeLostmethodstringcan be nullOne of
cardwalletpixamountCentsinteger500–100000000refundedCentsinteger0–100000000netCentsinteger0–100000000Original amount minus cumulative refunds, before processing fees.
currencystringAlways
USDcardBrandstringcan be nullcardLast4stringcan be nullfailureCodestringcan be nullfailureMessagestringcan be nullcreatedAtstring <date-time>paidAtstring <date-time>can be nullrefundedAtstring <date-time>can be nullcardBinstringoptionalcan be nullPCI Vault issuer prefix from an authenticated capture webhook bound to this checkout attempt; at most eight digits. Null when unavailable. Historical events may omit it.
cardIssuerobjectoptionalcan be nullMost-specific PCI Vault issuer match, independent of verified payment status; null when unavailable. Historical events may omit it.
bankstringcan be null≤ 128 charscountryCodestringcan be nullcountryNamestringcan be null≤ 128 charstypestringcan be null≤ 128 charslevelstringcan be null≤ 128 charscategorystringcan be null≤ 128 charsregulatedstringcan be null≤ 128 chars
failureIsFinalbooleanoptionalcan be nullProvider-reported finality flag; null if omitted by the provider. This does not replace the verified payment status or guarantee settlement or immunity from refunds/disputes.
refundsarray of objectoptionalcan be null≤ 100 itemsIndividual refund amounts when the provider supplies a complete list matching cumulative refundedCents. Null when unavailable; an empty array means a reported empty list. Processor refund identifiers are excluded.
amountCentsinteger0–100000000
disputeobjectoptionalcan be nullstatusstringProvider-reported card-network dispute stage, separate from normalized payment status. Unknown stages become other.
One of
warning_needs_responsewarning_under_reviewwarning_closedneeds_responseunder_reviewwonlostpreventedotherreasonstringSanitized dispute reason code. Unknown reasons become other; raw free text is excluded.
One of
bank_cannot_processcheck_returnedcredit_not_processedcustomer_initiateddebit_not_authorizedduplicatefraudulentgeneralincorrect_account_detailsinsufficient_fundsproduct_not_receivedproduct_unacceptablesubscription_canceledunrecognizedotheramountCentsinteger0–100000000currencystringAlways
USDcreatedAtstring <date-time>can be null
verifiedAtstring <date-time>optionalUTC time Wegopay authenticated and verified this observation, distinct from paidAt and event createdAt.
statusVersionintegeroptional≥ 1Increases when the normalized payment status changes.
observationVersionintegeroptional≥ 1Increases for each applied verified observation including public detail changes. Use this per payment to detect older snapshots; version gaps are normal.
environmentstringoptionalImmutable provider account selection derived from the API key. Omit environment on creation or provide the same environment as the key; a mismatch is rejected. Test keys can only access sandbox payments and live keys can only access live payments.
One of
sandboxlive
{
"version": 1,
"eventId": "01JA2Z4M8Q6V3N5R7T9W1X3Y5B",
"type": "payment.paid",
"createdAt": "2026-10-11T12:01:13Z",
"environment": "sandbox",
"data": {
"id": "7d5c2f1e-4b8a-4c3e-9f21-6a0b8e4d1c55",
"reference": "order-1042",
"status": "paid",
"method": "card",
"amountCents": 1500,
"refundedCents": 0,
"netCents": 1500,
"currency": "USD",
"cardBrand": "visa",
"cardLast4": "4242",
"failureCode": null,
"failureMessage": null,
"createdAt": "2026-10-11T12:00:00Z",
"paidAt": "2026-10-11T12:01:12Z",
"refundedAt": null,
"verifiedAt": "2026-10-11T12:01:12Z",
"statusVersion": 2,
"observationVersion": 3
}
}