---
title: "Trigger a test webhook (sandbox-only)"
method: POST
path: "/api/v1/webhooks/trigger"
tags: ["Sandbox helpers"]
---

# Trigger a test webhook (sandbox-only)

`POST /api/v1/webhooks/trigger`

## Request

- Base URL: `https://sandbox.api.afriex.com`
- URL: `https://sandbox.api.afriex.com/api/v1/webhooks/trigger`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/afriex/apis/afriex-business-api/docs/api/v1/webhooks/trigger/post.ts> (a function with typed inputs; its response is checked against the schema)

Fires a real signed webhook to the business's configured callback URL using a real entity (customer, payment method, or transaction) as the payload. Useful for testing webhook handlers in sandbox without manufacturing the underlying activity. **This endpoint is only available in the sandbox environment and will return a `403 Forbidden` response in production.** The business must have a webhook callback URL configured, or the request is rejected with `400`.

## Request body

- object
  - `event` 'CUSTOMER.CREATED' | 'CUSTOMER.UPDATED' | 'CUSTOMER.DELETED' | 'PAYMENT_METHOD.CREATED' | 'PAYMENT_METHOD.UPDATED' | 'PAYMENT_METHOD.DELETED' | 'TRANSACTION.CREATED' | 'TRANSACTION.UPDATED' | 'POOL_DEPOSIT_REQUEST.REJECTED', required: The webhook event identifier.
  - `entityId` string, required: The identifier of the entity to send in the webhook payload. Must be the 24-character hexadecimal id of the relevant customer, payment method, or transaction (the id returned when it was created).

## Response `200`

Webhook triggered successfully.

- object
  - `data` object: Details of the queued webhook delivery.
    - `queued` boolean: Always true; the webhook delivery was queued.
    - `event` 'CUSTOMER.CREATED' | 'CUSTOMER.UPDATED' | 'CUSTOMER.DELETED' | 'PAYMENT_METHOD.CREATED' | 'PAYMENT_METHOD.UPDATED' | 'PAYMENT_METHOD.DELETED' | 'TRANSACTION.CREATED' | 'TRANSACTION.UPDATED' | 'POOL_DEPOSIT_REQUEST.REJECTED': The webhook event identifier.
    - `entityId` string: The id of the entity used as the webhook payload.
    - `deliveryUrl` string: The business webhook callback URL the event was queued to.

## Other responses

- `400`: Invalid request body, or the business has no webhook callback URL configured.
- `401`: Unauthorized - Invalid business API key.
- `403`: Forbidden - This endpoint is not available in the production environment.
- `404`: No customer, payment method or transaction with `entityId` belongs to the calling business.
- `500`: Server error.
- `503`: Temporarily unavailable: an upstream service failed or timed out, or the API is momentarily offline. Retry with backoff and honour the Retry-After header when present.

---

[API](https://skmtc.dev/afriex/apis/afriex-business-api.md) - [All operations](https://skmtc.dev/afriex/apis/afriex-business-api/llms.txt) - [OpenAPI document](https://skmtc.dev/afriex/apis/afriex-business-api/revisions/d94198b6c256?raw)
