API reference
Webhook deliveries
See each webhook sent to your server, resend one, or send a test.
A webhook delivery is one event sent to your webhook URL. Abuna tries each delivery up to 10 times over about a day. See Receiving webhooks to receive and verify them.
The webhook delivery object
Attributes
idstringUnique identifier for the delivery. Abuna sends it in theX-Abuna-Deliveryheader.event_idstringnullableThe event the delivery sends.event_typestringThe event's type.payloadobjectThe exact body Abuna sends.Show child attributesHide child attributes
idstringThe event's ID.typestringThe event's type.environmentstringliveortest.created_attimestampWhen the event happened.dataobjectThe event'spayload.
urlstringThe URL the delivery goes to.statusstringpendingwhile it waits to be sent or retried,deliveringwhile Abuna sends it,deliveredonce your server answers with a 2xx status, andfailedafter the last attempt fails.attemptsintegerHow many times Abuna has tried to send it.response_statusintegernullableThe HTTP status your server last answered with.last_errorstringnullableWhy the last attempt failed.created_attimestampWhen the delivery was created, in Unix seconds.delivered_attimestampnullableWhen your server accepted it.next_attempt_attimestampWhen Abuna next tries to send it, while it ispending.event_created_attimestampnullableWhen the event happened.
{
"id": "01J9ZQ8D1E2F3G4H5J6K7M8N9P",
"event_id": "01M4047EV16DJZJQKM0ADM4T99",
"event_type": "invoice.paid",
"payload": {
"created_at": 1791005801,
"data": {
"kind": "period",
"amount": 5000,
"credit": 0,
"paid_at": 1791005801,
"currency": "XAF",
"entry_id": "01M4047ETRRSRY6EY5FH0X9XCG",
"metadata": {
"user_id": "42"
},
"invoice_id": "01M4047ETS17EJ5ZR31PWQBWF2",
"period_end": 1793684201,
"period_start": 1791005801,
"invoice_number": "01M4047ETSAJKDQ118H6TN7XG0",
"subscription_id": "01M4047ETPMMZ6EWNJQBD1S7W6"
},
"environment": "test",
"id": "01M4047EV16DJZJQKM0ADM4T99",
"type": "invoice.paid"
},
"url": "https://example.com/webhooks",
"status": "delivered",
"attempts": 1,
"response_status": 200,
"last_error": null,
"created_at": 1727600100,
"delivered_at": 1727600101,
"next_attempt_at": 1727600100,
"event_created_at": 1727600100
}List webhook deliveries
GET/v1/apps/{appID}/webhooks
Lists the app's 50 newest webhook deliveries, newest first.
Query parameters
typestringReturns only deliveries of this event type, likeinvoice.paid.statusstringReturns only deliveries with this status:pending,delivering,delivered, orfailed.
Returns an array of webhook delivery objects. There is no way to page past the newest 50. An unknown status returns 422 with code invalid.
curl 'https://api.abuna.app/v1/apps/01J9ZQ4Y7R3T6V8W2X5B1C0DEF/webhooks?status=failed' \
-H "Authorization: Bearer sk_test_..."[
{
"id": "01J9ZQ8D1E2F3G4H5J6K7M8N9P",
"event_id": "01M4047EV16DJZJQKM0ADM4T99",
"event_type": "invoice.paid",
"payload": {
"created_at": 1791005801,
"data": {
"kind": "period",
"amount": 5000,
"credit": 0,
"paid_at": 1791005801,
"currency": "XAF",
"entry_id": "01M4047ETRRSRY6EY5FH0X9XCG",
"metadata": {
"user_id": "42"
},
"invoice_id": "01M4047ETS17EJ5ZR31PWQBWF2",
"period_end": 1793684201,
"period_start": 1791005801,
"invoice_number": "01M4047ETSAJKDQ118H6TN7XG0",
"subscription_id": "01M4047ETPMMZ6EWNJQBD1S7W6"
},
"environment": "test",
"id": "01M4047EV16DJZJQKM0ADM4T99",
"type": "invoice.paid"
},
"url": "https://example.com/webhooks",
"status": "delivered",
"attempts": 1,
"response_status": 200,
"last_error": null,
"created_at": 1727600100,
"delivered_at": 1727600101,
"next_attempt_at": 1727600100,
"event_created_at": 1727600100
}
]Redeliver a webhook
POST/v1/apps/{appID}/webhooks/{id}/redeliver
Sends a past delivery's body again, as a new delivery for the same event. It goes to your current webhook URL. Use it after you fix your endpoint.
Returns the new delivery with status 201. If the app has no webhook URL, returns 422 with code webhook_url_missing. If it has no delivery with that ID, returns 404 with code not_found.
curl https://api.abuna.app/v1/apps/01J9ZQ4Y7R3T6V8W2X5B1C0DEF/webhooks/01J9ZQ8D1E2F3G4H5J6K7M8N9P/redeliver \
-X POST \
-H "Authorization: Bearer sk_test_..."{
"id": "01J9ZQ8R1S2T3V4W5X6Y7Z8A9B",
"app_id": "01J9ZQ4Y7R3T6V8W2X5B1C0DEF",
"event_id": "01M4047EV16DJZJQKM0ADM4T99",
"event_type": "invoice.paid",
"payload": "eyJjcmVhdGVkX2F0IjoxNzkxMDA1ODAxLCJkYXRhIjp7ImtpbmQiOiJwZXJpb2QiLCJhbW91bnQiOjUwMDAsImNyZWRpdCI6MCwicGFpZF9hdCI6MTc5MTAwNTgwMSwiY3VycmVuY3kiOiJYQUYiLCJlbnRyeV9pZCI6IjAxTTQwNDdFVFJSU1JZNkVZNUZIMFg5WENHIiwibWV0YWRhdGEiOnsidXNlcl9pZCI6IjQyIn0sImludm9pY2VfaWQiOiIwMU00MDQ3RVRTMTdFSjVaUjMxUFdRQldGMiIsInBlcmlvZF9lbmQiOjE3OTM2ODQyMDEsInBlcmlvZF9zdGFydCI6MTc5MTAwNTgwMSwiaW52b2ljZV9udW1iZXIiOiIwMU00MDQ3RVRTQUpLRFExMThINlRON1hHMCIsInN1YnNjcmlwdGlvbl9pZCI6IjAxTTQwNDdFVFBNTVo2RVdOSlFCRDFTN1c2In0sImVudmlyb25tZW50IjoidGVzdCIsImlkIjoiMDFNNDA0N0VWMTZESlpKUUtNMEFETTRUOTkiLCJ0eXBlIjoiaW52b2ljZS5wYWlkIn0=",
"url": "https://example.com/webhooks",
"status": "pending",
"attempts": 0,
"response_status": null,
"last_error": null,
"next_attempt_at": 1727700000,
"leased_until": null,
"created_at": 1727700000,
"delivered_at": null
}Send a test webhook
POST/v1/apps/{appID}/webhooks/test
Sends one signed ping event to your webhook URL now, and tells you how your server answered. It isn't retried, and it doesn't appear in your events or deliveries. Its data is {"message": "A test event sent from the Abuna dashboard."}.
Response attributes
deliveredbooleanWhether your server answered with a 2xx status.response_statusintegernullableThe HTTP status your server answered with. Null if it didn't answer.errorstringnullableWhy the request failed, when your server didn't answer.
Returns 200, even when your server fails the test. If the app has no webhook URL, returns 422 with code webhook_url_missing. You can send 10 tests a minute. After that, it returns 429 with code rate_limited.
curl https://api.abuna.app/v1/apps/01J9ZQ4Y7R3T6V8W2X5B1C0DEF/webhooks/test \
-X POST \
-H "Authorization: Bearer sk_test_..."{
"delivered": true,
"response_status": 200,
"error": null
}