Payments
Subscribe to payment lifecycle events and reconcile every state transition.
Payments Webhook Events
Payment events are snapshots of the payment when a lifecycle change occurred. A later event for the same payment can contain a newer state, so process transitions by payment ID rather than by delivery order.
Webhook request headers
Every webhook delivery includes headers that describe the request and help your server process retries safely. Header names are case-insensitive.
Content-Type: application/json
X-FiatPe-Timestamp: 1788075601
X-FiatPe-Idempotency: event_reference_xxxxxxxxxxxxxxxx
X-FiatPe-Secret: your_webhook_secretRead it from the request header on your backend. Do not expose it in frontend code, source control, application logs, or error responses.
List of Payments Webhook Events
Payment lifecycle and event ordering
payment.authorized→payment.capturedA failed attempt can be followed by a successful retry. Do not reject a later verified success only because an earlier failure was received. Apply valid forward transitions using the current authoritative state.
{
"mid": "mid_XXXXXXXXXX",
"event": "payment.captured",
"entity": "event",
"contains": [
"payment"
],
"payload": {
"payment": {
"id": "pay_123456789",
"fee": 200,
"tax": 36,
"vpa": "aftab@upi",
"bank": null,
"email": "aftab@mail.com",
"amount": 10000,
"entity": "payment",
"method": "upi",
"status": "captured",
"wallet": null,
"contact": "9960245621",
"currency": "INR",
"metadata": {},
"order_id": "order_123456789",
"created_at": 1788075600,
"error_description": null,
"acquirer_data": {
"rrn": "626543219876",
"account_type": "bank account"
}
}
},
"created_at": 1788075601
}Card network and type values
For card payments, use the values inside the card object to identify the card network and funding type. Values are returned in lowercase.
Handling guidance
- Key state updates by FiatPe payment ID and retain the related order ID.
- Authenticate the webhook before trusting any payload field.
- Treat authorisation as provisional unless capture is not required for your configuration.
- Make success processing idempotent across Checkout callbacks, redirects, polling, and webhooks.
- Preserve failure code, reason, source, and step for support without exposing sensitive data.