Skip to main content
POST
/
api
/
v1
/
webhooks
/
trigger
Trigger a test webhook (sandbox-only)
curl --request POST \
  --url https://sandbox.api.afriex.com/api/v1/webhooks/trigger \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "entityId": "69528240ba52c13b669fb239"
}
'
{
  "data": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.afriex.com/llms.txt

Use this file to discover all available pages before exploring further.

Fire a real signed webhook from sandbox using an existing entity as the payload. Use this to test your webhook handler without having to manufacture the underlying activity.
This endpoint is only available in the sandbox/staging environment and returns a 403 Forbidden response in production.

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

Event familyentityId
CUSTOMER.*The customer ID
PAYMENT_METHOD.*The payment method ID
TRANSACTION.*The transaction ID
CHECKOUT_SESSION.*The checkout session ID

Authorizations

x-api-key
string
header
required

Static business API key from the dashboard

Body

application/json
event
enum<string>
required

The webhook event identifier.

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

The 24-character MongoDB ObjectId of the customer, payment method, or transaction to send in the webhook payload.

Example:

"69528240ba52c13b669fb239"

Response

Webhook triggered successfully.

data
object

Provider-specific details of the dispatched webhook.