This shows the different types of webhook notifications that will be sent to the customer partner webhook URL
Payload
This is a sample webhook payload for different events.
{
"event": "invoice.approved",
"data": {
"invoice_id": "PxZn9UKhP9ALfbN9",
"amount": 1000,
"customer_partner_id": "8SM4pdo6wIXYWFmt",
"credit_limit_id": "MOmoyUYuIPBuRUW1",
"company_id": "8KFkzVJ9862eKSTJ",
"start_date": "2024-03-21T00:00:00.000Z",
"amount_requested": 20000,
"amount_approved": 19000,
"payment_amount": null,
"interest": 15,
"tenure": 30,
"due_date": "2024-04-20T00:00:00.000Z",
"status": "approved",
"payment_status": "pending",
"url": "https://bank54.ams3.digitaloceanspaces.com/Kayode%20Discounting/invoices/1711024230218_dice.jpeg?AWSAccessKeyId=DQ2AGT5UQYQOGX7ITEWP&Expires=1711110630&Signature=0eSg9AtXy3LEOjqC4utmveizE3U%3D",
"file_name": "dice",
"reason": null,
"created_at": "2024-03-21T12:30:30.000Z",
"updated_at": "2024-03-21T12:34:10.000Z",
"company": {
"id": "8KFkzVJ9862eKSTJ",
"credit_limit_id": "MOmoyUYuIPBuRUW1",
"company_name": "apple",
"is_active": true,
"created_at": "2024-03-21T12:26:11.000Z",
"updated_at": "2024-03-21T12:28:02.000Z"
}
}
{
"event": "invoice.declined",
"data": {
"invoice_id": "PxZn9UKhP9ALfbN9",
"customer_partner_id": "8SM4pdo6wIXYWFmv",
"credit_limit_id": "MOmoyUYuIPBuRUW1",
"company_id": null,
"start_date": null,
"amount_requested": 15000,
"amount_approved": null,
"payment_amount": null,
"interest": null,
"tenure": null,
"due_date": null,
"status": "declined",
"payment_status": null,
"url": "https://bank54.ams3.digitaloceanspaces.com/Kayode%20Discounting/invoices/1711024230093_dice.jpeg?AWSAccessKeyId=DQ2AGT5UQYQOGX7ITEWP&Expires=1711110630&Signature=s4Xn9t8ZX1Lu9Y9Huc%2F9USv5K1k%3D",
"file_name": "dice",
"reason": "Testing",
"created_at": "2024-03-21T12:30:30.000Z",
"updated_at": "2024-03-21T12:32:18.000Z",
"company": null
}
{
"event": "invoice.paid",
"data": {
"invoice_id": "PxZn9UKtP9ALfbN9",
"payment_type": "invoice",
"customer_partner_id": "8SM4pdo6wIXYWFmv",
"credit_limit_id": "MOmoyUYuIPBuRUW1",
"amount_requested": 20000,
"amount_approved": 19000,
"payment_amount": 19238.94,
"due_at": "2024-04-20T00:00:00.000Z",
"status": "completed",
}
Events
Event | Description |
---|---|
invoice.approved | An invoice was approved |
invoice.declined | An invoice was declined |
invoice.paid | A payment was made for an invoice |