Webhook Payloads
This document describes the payload structure for different types of webhooks sent by the OrchestraPay system.
Payment Webhook
Sent when a payment's status changes. Payments can have three main statuses: pending, success, or canceled. Only the pending status is mutable - once a payment gets the success or canceled status, it is guaranteed that it will not change again.
Payment Webhook Parameters
idempotency_keystringUnique key to prevent duplicate webhook processing
uuidstringUnique identifier for the payment
idnumberInternal payment ID
gatewaystringPayment gateway used for the payment
statusstringMain status of the payment (pending, success, or canceled)
sub_statusstringDetailed status of the payment
preflight_idnumberID of the preflight object used to generate this payment
payloadobjectAdditional payment data
amountnumberPayment amount in cents
currencystringThree-letter ISO currency code
step_numbernumberCurrent step in payment flow
last_reasonstringLast status reason or message
webhook_typestringType of webhook (always "payment" for payment webhooks)
{
"idempotency_key": "550e8400-e29b-41d4-a716-446655440000",
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"id": 123,
"gateway": "paystack",
"status": "success",
"sub_status": "success",
"preflight_id": 456,
"payload": {},
"amount": 1000,
"currency": "EGP",
"step_number": 3,
"last_reason": null,
"webhook_type": "payment"
}Refund Webhook
Sent when a refund's status changes. Refunds can have three main statuses: pending, success, or canceled. Only the pending status is mutable - once a refund gets the success or canceled status, it is guaranteed that it will not change again.
Refund Webhook Parameters
idempotency_keystringUnique key to prevent duplicate webhook processing
idnumberInternal refund ID
statusstringMain status of the refund (pending, success, or canceled)
sub_statusstringDetailed status of the refund
transaction_idnumberID of the original payment being refunded
amountnumberRefund amount in cents
currencystringThree-letter ISO currency code
webhook_typestringType of webhook (always "refund" for refund webhooks)
{
"idempotency_key": "550e8400-e29b-41d4-a716-446655440000",
"id": 123,
"status": "success",
"sub_status": "success",
"transaction_id": 456,
"amount": 1000,
"currency": "EGP",
"webhook_type": "refund"
}