Skip to main content
POST
Afriex SDK
This endpoint is only available in the sandbox environment and returns a 403 Forbidden response in production.
To test transaction webhooks end to end, let a real sandbox transaction settle instead of firing a synthetic event: it reaches a final status in about 5 minutes and sends TRANSACTION.UPDATED. Pick the outcome with the payment method’s last four digits (0001 fails, 0003 stays pending until you call /simulate), or add SIMULATE_INSTANT anywhere in meta.reference to speed things up to about 30 seconds. Full reference: Testing in Sandbox.

How it works

  1. Create or look up an existing entity in sandbox.
  2. Call this endpoint with the matching event name and the entity’s ID.
  3. Afriex delivers a real, signed webhook to your configured callback URL using that entity as the payload.
Because the payload is a real entity, your handler verifies the signature and processes the event exactly the same way it would in production.

What to pass as entityId

Authorizations

x-api-key
string
header
required

Static business API key issued from the dashboard. A business can provision multiple API keys, each scoped to a configurable set of permissions (e.g. read transactions, create deposits, etc). Permissions are chosen per key at creation time in the dashboard and may be revoked by deleting the key. Manage your keys and their permissions under Developer → API keys in the dashboard.

A request whose key does not carry the permission the target endpoint requires is rejected with 401 Unauthorized, the same response an unrecognised, malformed, revoked or disabled key returns. The API does not distinguish the two cases on the wire.

See the Permissions reference for the permission each endpoint requires.

Headers

x-api-version
string

API version in ISO 8601 format. The only supported version is 2026-05-18, which is also the default when the header is omitted. Any other value is rejected with a 400 Bad Request.

Body

application/json
event
enum<string>
required

The event to fire. POOL_DEPOSIT_REQUEST.REJECTED is delivered by the pool-account flow but cannot be fired from this test endpoint; sending it returns 400.

Available options:
CUSTOMER.CREATED,
CUSTOMER.UPDATED,
CUSTOMER.DELETED,
PAYMENT_METHOD.CREATED,
PAYMENT_METHOD.UPDATED,
PAYMENT_METHOD.DELETED,
TRANSACTION.CREATED,
TRANSACTION.UPDATED,
CHECKOUT_SESSION.CREATED,
POOL_DEPOSIT_REQUEST.REJECTED
entityId
string
required

The identifier of the entity to send in the webhook payload. When event is CHECKOUT_SESSION.CREATED, send the checkoutId returned when you created the session; otherwise must be the 24-character hexadecimal id of the relevant customer, payment method, or transaction (the id returned when it was created).

Example:

"69528240ba52c13b669fb239"

Response

Webhook triggered successfully.

data
object

Details of the queued webhook delivery.