Skip to content

Send a test event

POST/v1/test/webhooks/ping

Test mode only. Emits a test.ping event and delivers it to one endpoint, or to every test-mode endpoint that is not disabled.

Send your API key as a bearer token in the Authorization header. Secret API key: Authorization: Bearer ctp_live_sk_…. A publishable key (ctp_…_pk_…) is accepted by these operations only, which serve reference data: getRate, listAssets, listNetworks (each marked x-publishable-key: true). Every other operation refuses it with 403 publishable_key_not_allowed, whatever Origin the request carries: that header binds browsers, not other clients, and nothing on this API relies on it.

Name Type Description
Idempotency-Key string Makes the request safe to retry: the same key with the same request replays the first response (Idempotent-Replayed: true) for 24 hours; the same key with a different request is 422 idempotency_key_reused; while the first request is still running, 409 idempotency_request_in_progress with Retry-After. Only POST honours it. At most 255 characters. Pattern ^[!-~]+$.

The body is optional.

Field Type Description
webhook_endpoint_id string Only this endpoint. At most 100 characters.
Terminal window
curl -X POST "https://api.ctpeway.com/v1/test/webhooks/ping" \
-H "Authorization: Bearer $CTPEWAY_API_KEY" \
-H "Idempotency-Key: <a-unique-key>"
Field Type Description
event object An event, exactly as it is delivered to webhook endpoints.
event.id string evt_….
event.type string
event.api_version string
event.created integer Unix time in seconds.
event.livemode boolean
event.data object
event.data.object map of string to any See webhooks.v1.json for the schema of each type.
deliveries array of objects
deliveries[].id string 24 hexadecimal characters.
deliveries[].event_id string
deliveries[].event_type string
deliveries[].invoice_id optional string The invoice the event is about, if any. 24 hexadecimal characters.
deliveries[].payment_id optional string The payment the event is about, if any. 24 hexadecimal characters.
deliveries[].webhook_endpoint_id string 24 hexadecimal characters.
deliveries[].trigger string event: the original delivery. resend: a redelivery. test: a test ping. One of event, resend, test.
deliveries[].status string One of pending, succeeded, failed.
deliveries[].attempts integer
deliveries[].attempt_log array of objects
deliveries[].attempt_log[].at string (date-time)
deliveries[].attempt_log[].http_status optional integer
deliveries[].attempt_log[].error optional string Why the attempt failed, e.g. http_500, timeout.
deliveries[].attempt_log[].duration_ms integer
deliveries[].attempt_log[].request object What was sent. The body is the event itself (GET /events/{id}), the same on every attempt.
deliveries[].attempt_log[].request.headers map of string to string The headers the attempt was sent with, by lowercase name. ctpeway-signature shows its timestamp and [redacted] in place of the signature itself.
deliveries[].attempt_log[].response optional object What the endpoint answered. Present only where one delivery is read by its id, never in lists, and only for an attempt the endpoint answered.
deliveries[].attempt_log[].response.headers map of string to string Response headers by lowercase name. Headers that carry a credential (set-cookie, authorization, …) are never kept.
deliveries[].attempt_log[].response.body optional string The first 4,096 characters of the response body, with secret-looking JSON fields replaced by [redacted].
deliveries[].attempt_log[].response.body_truncated boolean The body was longer than what is kept.
deliveries[].next_attempt_at optional string (date-time)
deliveries[].last_attempt_at optional string (date-time)
deliveries[].delivered_at optional string (date-time)
deliveries[].created_at string (date-time)
{
"event": {
"id": "string",
"type": "string",
"api_version": "string",
"created": 0,
"livemode": true,
"data": {
"object": {}
}
},
"deliveries": [
{
"id": "0123456789abcdef01234567",
"event_id": "string",
"event_type": "string",
"invoice_id": "0123456789abcdef01234567",
"payment_id": "0123456789abcdef01234567",
"webhook_endpoint_id": "0123456789abcdef01234567",
"trigger": "event",
"status": "pending",
"attempts": 0,
"attempt_log": [
{
"at": "2026-01-01T00:00:00.000Z",
"http_status": 0,
"error": "string",
"duration_ms": 0,
"request": {
"headers": {}
},
"response": {
"headers": {},
"body": "string",
"body_truncated": true
}
}
],
"next_attempt_at": "2026-01-01T00:00:00.000Z",
"last_attempt_at": "2026-01-01T00:00:00.000Z",
"delivered_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z"
}
]
}

The values are placeholders generated from the schema. They show the shape, not real data.

A failed request answers with the error format described under Errors.

Besides the codes any endpoint can return, this endpoint can answer with these code values: