Send a test event
const url = 'https://api.paywithnablr.com/v1/webhook-endpoints/whe_01M3XX9QZ6J4B1M2N3P4Q5R6S7/test';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.paywithnablr.com/v1/webhook-endpoints/whe_01M3XX9QZ6J4B1M2N3P4Q5R6S7/test \ --header 'Authorization: Bearer <token>'Sends a signed test.ping event to the endpoint now and returns the
delivery with the outcome. A failed test is not retried.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
whe_01M3XX9QZ6J4B1M2N3P4Q5R6S7Responses
Section titled “Responses”The delivery.
object
object
An event type, or test.ping for a test.
The HTTP status your endpoint answered with last time.
For payment.* and payment_link.paid events, the payment (for payment_link.paid, data.payment.id). Absent otherwise.
Why the last attempt failed, in plain words: Couldn't connect,
Timed out after 10 s, TLS certificate problem, Your endpoint answered 500, Your endpoint answered 301. Redirects are not followed, Couldn't find the host (DNS lookup failed), The URL points to a private or internal address. null after a success.
object
This request’s id, also in the X-Request-Id header.
Example
{ "data": { "id": "whd_01M3XXA1B2C3D4E5F6G7H8J9K0", "object": "webhook_delivery", "event_id": "evt_01M3XXB7W2K9QF3N8D4H6J1T5R", "event_type": "payment.succeeded", "status": "pending", "last_error": "Your endpoint answered 500" }}UNAUTHENTICATED: no Authorization: Bearer header. The message
says what to send: your secret key (Bearer sk_test_… or
sk_live_…).
INVALID_API_KEY: the key is unknown, malformed or revoked.
object
object
A sentence for a person. Safe to show to your user.
The code in words, for example Validation failed.
A quotable reference for some failures.
One entry per field that is wrong.
object
For example required, invalid, format, length, unknown, type.
Extra context, such as retry_after_seconds on RATE_LIMITED.
object
object
This request’s id, also in the X-Request-Id header.
Example
{ "error": { "message": "The API key provided is not valid.", "code": "INVALID_API_KEY", "title": "Invalid API key" }, "meta": { "request_id": "01a0fbd4-3b68-75e0-bd33-0b950ddc99a5" }}SECRET_KEY_REQUIRED: you sent a publishable key.
LIVE_MODE_NOT_ENABLED: a live key before your business is verified.
ACCOUNT_RESTRICTED: the account is suspended.
object
object
A sentence for a person. Safe to show to your user.
The code in words, for example Validation failed.
A quotable reference for some failures.
One entry per field that is wrong.
object
For example required, invalid, format, length, unknown, type.
Extra context, such as retry_after_seconds on RATE_LIMITED.
object
object
This request’s id, also in the X-Request-Id header.
Example
{ "error": { "message": "This request needs your secret key. Publishable keys can only be used from a checkout.", "code": "SECRET_KEY_REQUIRED", "title": "Secret key required" }, "meta": { "request_id": "01a0fbd4-3b68-75e0-bd33-0b950ddc99a5" }}NOT_FOUND: no such object in this mode, or it is not yours.
object
object
A sentence for a person. Safe to show to your user.
The code in words, for example Validation failed.
A quotable reference for some failures.
One entry per field that is wrong.
object
For example required, invalid, format, length, unknown, type.
Extra context, such as retry_after_seconds on RATE_LIMITED.
object
object
This request’s id, also in the X-Request-Id header.
Example
{ "error": { "message": "This payment could not be found.", "code": "NOT_FOUND", "title": "Not found" }, "meta": { "request_id": "01a0fbd4-5df3-7308-8497-51f8ed8d7c77" }}RATE_LIMITED: wait Retry-After seconds, then retry.
object
object
A sentence for a person. Safe to show to your user.
The code in words, for example Validation failed.
A quotable reference for some failures.
One entry per field that is wrong.
object
For example required, invalid, format, length, unknown, type.
Extra context, such as retry_after_seconds on RATE_LIMITED.
object
object
This request’s id, also in the X-Request-Id header.
Example
{ "error": { "message": "Too many attempts. Please wait a moment and try again.", "code": "RATE_LIMITED", "title": "Rate limited", "meta": { "retry_after_seconds": 12 } }, "meta": { "request_id": "01a0fbd4-3b68-75e0-bd33-0b950ddc99a5" }}Headers
Section titled “Headers”Seconds to wait.
Unix time when a request will be allowed again.