Callbacks
Callbacks are mandatory for asynchronous finalization. When a payment reaches a final state,
GoDigital sends a POST to your callbackUrl (or the callback URL configured on your merchant
profile).
Endpoint requirements
| Requirement | Description |
|---|---|
| Protocol | HTTPS only |
| Method | POST |
| Content type | application/json |
| Response | Return HTTP 200 as soon as the callback is accepted for processing |
| Idempotency | Safely handle duplicate callbacks for the same transactionId |
| Timeout handling | GoDigital retries on timeouts and non-2xx responses |
Payload
Code
Read data.transactionStatus, not status
The top-level status and code describe the callback delivery and are SUCCESS / PGW-0000
even when the payment failed. The payment result is in data.transactionStatus
(SUCCESS, FAILED or REVERSED), with the reason in data.message.
Signature headers
| Header | Description |
|---|---|
X-Callback-Id | Unique callback delivery identifier. |
X-Callback-Timestamp | Callback creation timestamp. |
X-Callback-Content-SHA256 (optional) | SHA-256 of the raw body, Base64-encoded. |
X-Callback-Signature (optional) | Base64 HMAC-SHA256 signature using your callback secret. |
Signature validation is optional and enabled per merchant during onboarding.
Acknowledge the callback
Code
Acknowledge first, then process in the background. Slow handlers cause timeouts and retries.
Retry policy
If your endpoint does not return HTTP 200 within the configured timeout, or returns a non-2xx
status, GoDigital schedules retries. Repeated failures are visible in the callback logs available
to you and to GoDigital administrators.
Example handler
Express.js

