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,
"card": null,
"email": "aftab@mail.com",
"amount": 10000,
"entity": "payment",
"method": "upi",
"status": "captured",
"provider": null,
"contact": "9960245621",
"currency": "INR",
"metadata": {},
"order_id": "order_123456789",
"created_at": 1788075600,
"error_description": null,
"error_code": null,
"acquirer_data": {
"rrn": "626543219876",
"account_type": "bank account"
}
}
},
"created_at": 1788075601
}Payment error fields
error_code and error_description are populated when a payment fails. For successful or non-failed payment events, both fields are returned as null.
error_code for broad programmatic handling and preserveerror_description for logs and support. Continue to tolerate additional error codes introduced in the future.Payment method field
The payment object’s method field identifies the payment method used for the transaction.
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.