Successful Acknowledgement
A delivery is acknowledged only when your server returns a finalHTTP 200 response.
Recommended Receiver Pipeline
To prevent timeouts and handle delivery guarantees effectively, follow this sequence in your receiver:1
Read Raw Bytes
Read the raw HTTP request body from the network stream.
2
Verify Authenticity
Validate the HMAC signature (
X-Signature) and replay controls (X-Nonce).3
Validate Minimum Fields
Ensure required payload fields are present.
4
Atomically Store Record
Insert the idempotency key and raw event into your database.
5
Acknowledge Fast (HTTP 200)
Return
HTTP 200 immediately to acknowledge delivery.6
Process Asynchronously
Execute slower downstream business logic using background queues/workers.
Delivery Identifiers & Idempotency Keys
Different webhook scopes provide different delivery identifiers:| Scope / Family | Identifier Type | Recommended Idempotency Key |
|---|---|---|
| Transaction (USER) | Stable delivery_id | delivery_id |
| Transaction (ACCOUNT) | No delivery_id | txn_id + configured_event_type |
| KYB (USER & PLATFORM) | Stable delivery_id | delivery_id |
| MED (USER & ACCOUNT) | Stable delivery_id | delivery_id |
If a duplicate event arrives after your system has already processed it, return
HTTP 200 immediately after recognizing the key.HTTP Retry Schedule
When a delivery attempt fails, Pagsmile schedules up to 8 total attempts (initial attempt + 7 retries):Retry 1
5 seconds
Retry 2
10 seconds
Retry 3
20 seconds
Retry 4
30 seconds
Retry 5
60 seconds (1m)
Retry 6
120 seconds (2m)
Retry 7
240 seconds (4m)
Receiver Best Practices Checklist
- Make processing idempotent: Always deduplicate incoming requests using stable keys.
- Do not assume global ordering: Events may arrive out of order.
- Preserve raw events: Store the raw payload for audit and reconciliation purposes.
- Respond quickly: Avoid executing heavy database transactions before returning
HTTP 200. - Monitor metrics: Track latency,
non-200response rates, and signature validation failures.