Skip to content

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

POSTyour webhook URL

Signed 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 application/json

  • versioninteger

    Always1

  • eventIdstring
  • typestring

    One ofpayment.paidpayment.failedpayment.refundedpayment.partially_refundedpayment.disputedpayment.dispute_wonpayment.dispute_lost

  • createdAtstring <date-time>
  • dataobject

    Merchant-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>
    • referencestring
    • statusstring

      One ofpendingrequiresActionpaidfailedrefundedpartiallyRefundeddisputeddisputeWondisputeLost

    • methodstringcan be null

      One ofcardwalletpix

    • amountCentsinteger500–100000000
    • refundedCentsinteger0–100000000
    • netCentsinteger0–100000000

      Original amount minus cumulative refunds, before processing fees.

    • currencystring

      AlwaysUSD

    • cardBrandstringcan be null
    • cardLast4stringcan be null
    • failureCodestringcan be null
    • failureMessagestringcan be null
    • createdAtstring <date-time>
    • paidAtstring <date-time>can be null
    • refundedAtstring <date-time>can be null
    • cardBinstringoptionalcan be null

      PCI 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 null

      Most-specific PCI Vault issuer match, independent of verified payment status; null when unavailable. Historical events may omit it.

      • bankstringcan be null≤ 128 chars
      • countryCodestringcan be null
      • countryNamestringcan be null≤ 128 chars
      • typestringcan be null≤ 128 chars
      • levelstringcan be null≤ 128 chars
      • categorystringcan be null≤ 128 chars
      • regulatedstringcan be null≤ 128 chars
    • failureIsFinalbooleanoptionalcan be null

      Provider-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 items

      Individual 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 null
      • statusstring

        Provider-reported card-network dispute stage, separate from normalized payment status. Unknown stages become other.

        One ofwarning_needs_responsewarning_under_reviewwarning_closedneeds_responseunder_reviewwonlostpreventedother

      • reasonstring

        Sanitized dispute reason code. Unknown reasons become other; raw free text is excluded.

        One ofbank_cannot_processcheck_returnedcredit_not_processedcustomer_initiateddebit_not_authorizedduplicatefraudulentgeneralincorrect_account_detailsinsufficient_fundsproduct_not_receivedproduct_unacceptablesubscription_canceledunrecognizedother

      • amountCentsinteger0–100000000
      • currencystring

        AlwaysUSD

      • createdAtstring <date-time>can be null
    • verifiedAtstring <date-time>optional

      UTC time Wegopay authenticated and verified this observation, distinct from paidAt and event createdAt.

    • statusVersionintegeroptional≥ 1

      Increases when the normalized payment status changes.

    • observationVersionintegeroptional≥ 1

      Increases for each applied verified observation including public detail changes. Use this per payment to detect older snapshots; version gaps are normal.

  • environmentstringoptional

    Immutable 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 ofsandboxlive

Example eventpayment.paid
{
  "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
  }
}