This webhook occurs when a payment attempt is unsuccessful, typically due to reasons like insufficient funds or invalid payment details. It helps notify the customer about the failure and may include error codes for troubleshooting. It enables businesses to prompt users to retry the payment or provide alternative payment options.
Example of Request Payload Object (payment_failed)
Copy {
"id": "424b6daa-2a01-4b42-864f-9385d3df1ebf",
"type": "payment_failed",
"testMode": true,
"data": {
"user": {
"id": "34dfdeab-001c-4ded-ac23-13566d266224",
"email": "test@fungies.io",
"object": "user",
"username": null,
"internalId": null
},
"items": [],
"order": {
"id": "cfc87241-85e6-412f-bdff-8d7df85749b5",
"fee": 0,
"tax": 0,
"value": 0,
"number": "0vVTf4eFvOR0HpMR",
"object": "order",
"status": "PAID",
"userId": "34dfdeab-001c-4ded-ac23-13566d266224",
"country": "US",
"currency": "USD",
"createdAt": 1732372298451,
"totalItems": 0,
"orderNumber": "0vVTf4eFvOR0HpMR",
"currencyDecimals": 2
},
"payment": {
"id": "cfc87241-85e6-412f-bdff-8d7df85749b5",
"fee": 0,
"tax": 0,
"type": "one_time",
"value": 0,
"number": "0vVTf4eFvOR0HpMR",
"object": "payment",
"status": "PAID",
"userId": "34dfdeab-001c-4ded-ac23-13566d266224",
"orderId": "cfc87241-85e6-412f-bdff-8d7df85749b5",
"currency": "USD",
"createdAt": 1732372298451,
"orderNumber": "0vVTf4eFvOR0HpMR",
"currencyDecimals": 2
},
"customer": {
"id": "34dfdeab-001c-4ded-ac23-13566d266224",
"email": "test@fungies.io",
"object": "user",
"username": null,
"internalId": null
}
},
"idempotencyKey": "424b6daa-2a01-4b42-864f-9385d3df1ebf"
}