Payment Webhook
When a payment status changes, you’ll receive a webhook with the following payload structure:
{
"event_type": "payment.status_update",
"intent_id": "in_8Ks3Jq1tZxPjYVhRQW2r5",
"status": "SUCCESS",
"transaction_id": "txn_9Ls4Kp2uAxQkZWiSRX3s6",
"amount": 10000,
"currency": "USD",
"receiptId": "receipt_abc123",
"channel": "web",
"customer_id": "cus_Tfd3Jq1tZxPjYVhRQW2r3",
"payment_method": "CARD",
"metadata": {
"subscription_id": "sub_789",
"plan": "premium_annual"
},
"completed_at": "2024-11-04T10:36:30.000Z",
"webhook_id": "wh_6Ns6Mr4wCySm8YkUTZ5u9",
"timestamp": "2024-11-04T10:36:31.000Z"
}
Payment Webhook (Refund Example)
For refund events, the payload includes additional refund information:
{
"event_type": "payment.status_update",
"intent_id": "in_8Ks3Jq1tZxPjYVhRQW2r5",
"status": "REFUNDED",
"transaction_id": "txn_9Ls4Kp2uAxQkZWiSRX3s6",
"amount": 10000,
"currency": "USD",
"refunded_amount": 10000,
"order_id": "order_12345",
"receiptId": "receipt_abc123",
"channel": "web",
"customer_id": "cus_Tfd3Jq1tZxPjYVhRQW2r3",
"payment_method": "CARD",
"metadata": {
"refund_reason_code": "customer_request"
},
"completed_at": "2024-11-04T10:42:00.000Z",
"webhook_id": "wh_6Ns6Mr4wCySm8YkUTZ5u9",
"timestamp": "2024-11-04T10:42:01.000Z"
}
Webhook Fields
The type of event that triggered the webhook. For S2S API, this will be payment.status_update.
The unique identifier of the payment intent.
The unique identifier of the transaction, available when the payment is processed.
The amount that has been refunded, in the smallest currency unit. Only present for refund events.
The unique identifier of the webhook configuration that triggered this event.
The timestamp when the webhook was sent, in ISO 8601 format.