API reference
Webhooks
Common headers
Every endpoint on this page takes these headers.
| Name | Description |
|---|---|
ZeroPoint-Accountheader, string or null | Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header. |
Stripe-Accountheader, string or null | Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...). |
Common responses
Every endpoint on this page can answer with these.
| Status | Description | Body |
|---|---|---|
| 400 | Invalid request. A parameter, header or body field failed validation (code parameter_invalid, with param naming it), or another invalid_request code this operation's description lists. Fix the request; do not retry it unchanged. | ErrorResponse |
| 401 | The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header. | ErrorResponse |
| 403 | The key is valid but may not do this: platform_suspended, insufficient_scope, live_mode_unavailable, or a permission code this operation's description lists (for example processor_currency_unsupported). | ErrorResponse |
| 429 | Too many requests (rate_limited). Wait for the Retry-After header, then retry. | ErrorResponse |
List webhook endpoints
GET/
Lists your endpoints, newest first. Use it to find an id.
Arguments: limit, cursor.
Returns a list of webhook_endpoint objects (never the secret).
Errors: authentication errors only.
Next step: GET /v1/webhooks/{id}/deliveries to debug delivery.
Parameters
| Name | Description |
|---|---|
limitquery, integer | Items per page, default 20. |
cursorquery, string or null | next_cursor from the previous page. |
starting_afterquery, string or null | Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both. |
ending_beforequery, string or null | Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ListOut_WebhookEndpointOut_ |
Example
curl -X GET "https://api.zeropointapp.com/v1/webhooks" \
-H "Authorization: Bearer zp_test_..."Register a webhook endpoint
POST/
Registers an HTTPS URL that receives signed event POSTs; an empty event_types means every payment event, and billing events (checkout, invoice, subscription, customer, payment method) are sent only to endpoints that list them or use ["*"]. Use it once per environment before you rely on events.
Arguments: url (public https), event_types (up to 50; ["*"] alone or a list of: checkout.session.completed, checkout.session.expired, customer.created, customer.deleted, customer.subscription.created, customer.subscription.deleted, customer.subscription.updated, customer.updated, invoice.marked_uncollectible, invoice.paid, invoice.payment_failed, invoice.payment_succeeded, invoice.upcoming, invoice.voided, merchant.state_changed, payment.canceled, payment.expired, payment.failed, payment.needs_attention, payment.processing, payment.reversed_late, payment.succeeded, payment_method.attached, payment_method.detached, refund.failed, refund.succeeded, terminal.offline, terminal.online, webhook.test), description.
Returns the webhook_endpoint object including secret exactly once; store it and verify every delivery with it (see the webhooks guide).
Errors: idempotency_key_required, webhook_url_invalid (http, localhost, or a private address), parameter_invalid (unknown event type, or ["*"] mixed with types).
Next step: POST /v1/webhooks/{id}/test to receive a signed webhook.test event and verify your signature code.
Parameters
| Name | Description |
|---|---|
Idempotency-Keyheader, string or null | Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request. |
Request body
| Field | Description |
|---|---|
urlstringRequired | HTTPS URL on a public host. |
event_typesarray of string | Subscribe to these types. Empty means every payment event; billing events (checkout, invoice, subscription, customer, payment method) are sent only to endpoints that list them or use [""]. [""] must be the only entry. Valid: checkout.session.completed, checkout.session.expired, customer.created, customer.deleted, customer.subscription.created, customer.subscription.deleted, customer.subscription.updated, customer.updated, invoice.marked_uncollectible, invoice.paid, invoice.payment_failed, invoice.payment_succeeded, invoice.upcoming, invoice.voided, merchant.state_changed, payment.canceled, payment.expired, payment.failed, payment.needs_attention, payment.processing, payment.reversed_late, payment.succeeded, payment_method.attached, payment_method.detached, refund.failed, refund.succeeded, terminal.offline, terminal.online, webhook.test. |
descriptionstring or null | |
stripe_signature_headerboolean or null | Optional, default false. true: each delivery also carries Stripe-Signature (the same value as ZeroPoint-Signature) for code that verifies with Stripe's webhooks.constructEvent. Leave it off for a URL that also receives real Stripe deliveries during a migration. |
stripe_compatible_payloadboolean or null | Optional, default false. true: a checkout session whose payment is being confirmed is delivered with payment_status unpaid and zeropoint_payment_status processing, so code copied from Stripe's fulfilment guide grants nothing early. |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Successful Response | WebhookEndpointCreated |
| 409 | Conflict with the current state: idempotency_in_progress (another request with this Idempotency-Key is still running; wait for Retry-After), or a conflict code this operation's description lists. | ErrorResponse |
| 413 | The request body is over 1048576 bytes, its Content-Length is not a number, or it is sent chunked (code payload_too_large). Every write method is checked, before routing. Send a smaller body with a Content-Length. | ErrorResponse |
| 422 | This Idempotency-Key was already used with a different request body (code idempotency_key_reused). Send the original body to retry, or a new key for a new request. | ErrorResponse |
Example
curl -X POST "https://api.zeropointapp.com/v1/webhooks" \
-H "Authorization: Bearer zp_test_..." \
-H "Idempotency-Key: <Idempotency-Key>" \
-H "Content-Type: application/json" \
-d '{
"url": <url>
}'Retrieve a webhook endpoint
GET/
Returns one endpoint.
Arguments: webhook_id (whk_...).
Returns the webhook_endpoint object without the secret.
Errors: resource_missing.
Next step: PATCH to change it.
Parameters
| Name | Description |
|---|---|
webhook_idpath, stringRequired |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | WebhookEndpointOut |
| 404 | No such resource for this platform (resource_missing), or another not_found code this operation's description lists. | ErrorResponse |
Example
curl -X GET "https://api.zeropointapp.com/v1/webhooks/{webhook_id}" \
-H "Authorization: Bearer zp_test_..."Update a webhook endpoint
PATCH/
Changes url, event_types, description, or active. Use active=false to pause deliveries without losing the secret.
Arguments: any subset of those fields.
Returns the updated webhook_endpoint.
Errors: resource_missing, webhook_url_invalid, parameter_invalid.
Next step: POST /v1/webhooks/{id}/test.
Parameters
| Name | Description |
|---|---|
webhook_idpath, stringRequired |
Request body
| Field | Description |
|---|---|
urlstring or null | |
event_typesarray of string or null | |
descriptionstring or null | |
activeboolean or null | |
stripe_signature_headerboolean or null | |
stripe_compatible_payloadboolean or null |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | WebhookEndpointOut |
| 404 | No such resource for this platform (resource_missing), or another not_found code this operation's description lists. | ErrorResponse |
| 413 | The request body is over 1048576 bytes, its Content-Length is not a number, or it is sent chunked (code payload_too_large). Every write method is checked, before routing. Send a smaller body with a Content-Length. | ErrorResponse |
Example
curl -X PATCH "https://api.zeropointapp.com/v1/webhooks/{webhook_id}" \
-H "Authorization: Bearer zp_test_..." \
-H "Content-Type: application/json" \
-d '{}'Delete a webhook endpoint
DELETE/
Deletes the endpoint; queued deliveries to it are marked dead.
Returns {object, id, deleted:true}.
Errors: resource_missing.
Next step: register a new one.
Parameters
| Name | Description |
|---|---|
webhook_idpath, stringRequired |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | DeletedOut |
| 404 | No such resource for this platform (resource_missing), or another not_found code this operation's description lists. | ErrorResponse |
| 413 | The request body is over 1048576 bytes, its Content-Length is not a number, or it is sent chunked (code payload_too_large). Every write method is checked, before routing. Send a smaller body with a Content-Length. | ErrorResponse |
Example
curl -X DELETE "https://api.zeropointapp.com/v1/webhooks/{webhook_id}" \
-H "Authorization: Bearer zp_test_..."Rotate the signing secret
POST/
Issues a new secret. Deliveries are signed with both the new and the old secret (two v1= values) for 24 hours so you can roll your receivers.
Arguments: webhook_id.
Returns the webhook_endpoint with the new secret (shown once).
Errors: idempotency_key_required, resource_missing.
Next step: update your receiver, then POST /v1/webhooks/{id}/test.
Parameters
| Name | Description |
|---|---|
webhook_idpath, stringRequired | |
Idempotency-Keyheader, string or null | Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | WebhookEndpointCreated |
| 404 | No such resource for this platform (resource_missing), or another not_found code this operation's description lists. | ErrorResponse |
| 409 | Conflict with the current state: idempotency_in_progress (another request with this Idempotency-Key is still running; wait for Retry-After), or a conflict code this operation's description lists. | ErrorResponse |
| 413 | The request body is over 1048576 bytes, its Content-Length is not a number, or it is sent chunked (code payload_too_large). Every write method is checked, before routing. Send a smaller body with a Content-Length. | ErrorResponse |
| 422 | This Idempotency-Key was already used with a different request body (code idempotency_key_reused). Send the original body to retry, or a new key for a new request. | ErrorResponse |
Example
curl -X POST "https://api.zeropointapp.com/v1/webhooks/{webhook_id}/rotate-secret" \
-H "Authorization: Bearer zp_test_..." \
-H "Idempotency-Key: <Idempotency-Key>"Send a signed test event
POST/
Delivers one webhook.test event to this endpoint right now, signed like a real one, and waits up to 5 seconds for your response. Use it to prove your signature verification.
Arguments: webhook_id.
Returns the webhook_delivery with status delivered (2xx) or failed (response_status and last_error say why).
Errors: resource_missing, rate_limited (429 with Retry-After, nothing sent: another test or verify run of yours is still in progress, the service is busy with other runs, or you have used the budget of 10 test and verify runs per endpoint, 30 per account, or 30 seconds of waiting on your receiver, in any 10 minutes), sandbox_daily_limit_exceeded (409 with Retry-After, test mode: today's test-event ceiling is reached).
Next step: fix your receiver until status is delivered, then run a payment and watch payment.* events. Sample billing events, test mode only: send a body with event_type (a billing type such as invoice.paid) and merchant_id (a test merchant of your platform) to get one sample of that type instead, marked "sample": true beside data.object, built from the documented payload with ids that answer 404, to this endpoint only. The endpoint must subscribe to the type (list it or use ["*"]): billing events are opt-in. A sample proves your parser, never your business effects; use the real sandbox flows for those. Same budget as webhook.test. Extra errors with event_type: live_mode_unavailable (403, live key), parameter_invalid (400: not a billing type, merchant_id missing, or the endpoint does not subscribe to the type), resource_missing (merchant_id not a test merchant of yours). Any body without event_type is ignored and sends webhook.test, as it always has.
Parameters
| Name | Description |
|---|---|
webhook_idpath, stringRequired |
Request body
| Field | Description |
|---|---|
event_typestring or null | Optional, test mode only. A billing event type: send one shape-only sample of it instead of webhook.test. The endpoint must subscribe to the type. |
merchant_idstring or null | A test merchant of your platform. Required with event_type. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | DeliveryOut |
| 404 | No such resource for this platform (resource_missing), or another not_found code this operation's description lists. | ErrorResponse |
| 409 | Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request. | ErrorResponse |
| 413 | The request body is over 1048576 bytes, its Content-Length is not a number, or it is sent chunked (code payload_too_large). Every write method is checked, before routing. Send a smaller body with a Content-Length. | ErrorResponse |
Example
curl -X POST "https://api.zeropointapp.com/v1/webhooks/{webhook_id}/test" \
-H "Authorization: Bearer zp_test_..." \
-H "Content-Type: application/json" \
-d '{}'Score a webhook receiver
POST/
Runs the webhook scorecard against this endpoint right now: a signed webhook.test event (must get a 2xx within 5 seconds), the same event id again (must still be accepted: dedupe by ZeroPoint-Event-Id and answer 2xx), and one delivery with a bad signature (must be refused with a non-2xx). Use it after /test succeeds and before you rely on events.
Arguments: webhook_id.
Returns a webhook_scorecard with passed and one check per line; delivery_id and replay_delivery_id point at the two deliveries it made (the bad-signature probe is not a delivery). Each send gets 5 seconds, and when the first one fails or is not fast the run stops there: the other two checks say not run and replay_delivery_id is null.
Errors: resource_missing, rate_limited (429 with Retry-After, nothing sent: another test or verify run of yours is still in progress, the service is busy with other runs, or you have used the budget of 10 test and verify runs per endpoint, 30 per account, or 30 seconds of waiting on your receiver, in any 10 minutes; one verify is one run), sandbox_daily_limit_exceeded (409 with Retry-After, test mode: today's test-event ceiling is reached).
Next step: fix the failing check and run it again. The hosted /sandbox/webhook-sink passes the first three checks only, because it never verifies signatures.
Parameters
| Name | Description |
|---|---|
webhook_idpath, stringRequired |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | WebhookScorecardOut |
| 404 | No such resource for this platform (resource_missing), or another not_found code this operation's description lists. | ErrorResponse |
| 409 | Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request. | ErrorResponse |
| 413 | The request body is over 1048576 bytes, its Content-Length is not a number, or it is sent chunked (code payload_too_large). Every write method is checked, before routing. Send a smaller body with a Content-Length. | ErrorResponse |
Example
curl -X POST "https://api.zeropointapp.com/v1/webhooks/{webhook_id}/verify" \
-H "Authorization: Bearer zp_test_..."List deliveries to an endpoint
GET/
Lists delivery attempts to this endpoint, newest first, with status, response_status, and last_error. Use it to debug why a webhook did not arrive.
Arguments: webhook_id, limit, cursor.
Returns a list of webhook_delivery objects.
Errors: resource_missing.
Next step: POST /v1/deliveries/{id}/redeliver after fixing your receiver.
Parameters
| Name | Description |
|---|---|
webhook_idpath, stringRequired | |
limitquery, integer | Items per page, default 20. |
cursorquery, string or null | next_cursor from the previous page. |
starting_afterquery, string or null | Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both. |
ending_beforequery, string or null | Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ListOut_DeliveryOut_ |
| 404 | No such resource for this platform (resource_missing), or another not_found code this operation's description lists. | ErrorResponse |
Example
curl -X GET "https://api.zeropointapp.com/v1/webhooks/{webhook_id}/deliveries" \
-H "Authorization: Bearer zp_test_..."Retrieve a delivery
GET/
Returns one delivery attempt record.
Arguments: delivery_id (dlv_...).
Returns a webhook_delivery.
Errors: resource_missing.
Next step: redeliver if it failed.
Parameters
| Name | Description |
|---|---|
delivery_idpath, stringRequired |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | DeliveryOut |
| 404 | No such resource for this platform (resource_missing), or another not_found code this operation's description lists. | ErrorResponse |
Example
curl -X GET "https://api.zeropointapp.com/v1/deliveries/{delivery_id}" \
-H "Authorization: Bearer zp_test_..."Redeliver an event
POST/
Queues a fresh delivery of the same event to the same endpoint; it is sent within a few seconds. Use it after fixing a receiver bug.
Arguments: delivery_id.
Returns the new webhook_delivery (status pending).
Errors: resource_missing, rate_limited (429 with Retry-After, nothing queued: the endpoint already has 10 or more deliveries waiting for their first attempt; Retry-After is the rest of the pause when the endpoint is paused after repeated failures).
Next step: GET /v1/deliveries/{new_id} to confirm status delivered.
Parameters
| Name | Description |
|---|---|
delivery_idpath, stringRequired |
Responses
| Status | Description | Body |
|---|---|---|
| 202 | Successful Response | DeliveryOut |
| 404 | No such resource for this platform (resource_missing), or another not_found code this operation's description lists. | ErrorResponse |
| 413 | The request body is over 1048576 bytes, its Content-Length is not a number, or it is sent chunked (code payload_too_large). Every write method is checked, before routing. Send a smaller body with a Content-Length. | ErrorResponse |
Example
curl -X POST "https://api.zeropointapp.com/v1/deliveries/{delivery_id}/redeliver" \
-H "Authorization: Bearer zp_test_..."List events
GET/
Lists the event ledger in id order, newest first. Use it to reconcile without webhooks or to see what fired.
Arguments: merchant_id, type, types (repeatable, up to 50: events of any of these types, e.g. types=invoice.paid&types=customer.created; not with type), since (unix seconds), limit, cursor.
Returns a list of event objects whose data.object is the full object at the time.
Errors: parameter_invalid.
Next step: GET /v1/events/{id} for one event.
Parameters
| Name | Description |
|---|---|
merchant_idquery, string or null | |
typequery, string or null | |
typesquery, array of string or null | Repeatable. Events of any of these types. Not with type. |
sincequery, integer or null | Unix seconds; events at or after. Up to 2100-01-01. |
limitquery, integer | Items per page, default 20. |
cursorquery, string or null | next_cursor from the previous page. |
starting_afterquery, string or null | Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both. |
ending_beforequery, string or null | Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ListOut_EventOut_ |
| 404 | No such resource for this platform (resource_missing), or another not_found code this operation's description lists. | ErrorResponse |
Example
curl -X GET "https://api.zeropointapp.com/v1/events" \
-H "Authorization: Bearer zp_test_..."Retrieve an event
GET/
Returns one event with data.object.
Arguments: event_id (evt_...).
Errors: resource_missing.
Next step: act on data.object.
Parameters
| Name | Description |
|---|---|
event_idpath, stringRequired |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | EventOut |
| 404 | No such resource for this platform (resource_missing), or another not_found code this operation's description lists. | ErrorResponse |
Example
curl -X GET "https://api.zeropointapp.com/v1/events/{event_id}" \
-H "Authorization: Bearer zp_test_..."