Skip to navigation

Webhooks

Receive real-time event notifications at your server without polling.

View as Markdown

Transak uses webhooks to push real-time event notifications to your server. Instead of polling the API for updates, Transak sends event data directly to a URL you provide to ensure faster updates and fewer unnecessary API calls.

Supported Webhook Types

Add or Update Webhook

1

Contact & Submit your webhook request

Webhook URLs can only be added or updated after KYB approval in the production environment.

Follow the steps in the Need help in Integration section. Provide the following details:

FieldDescription
Order Webhook URLYour HTTPS endpoint for order events
KYC Webhook URLYour HTTPS endpoint for KYC events
EnvironmentSTAGING or PRODUCTION

Both Order and KYC webhook URLs must use HTTPS and be publicly accessible before they can be registered.

2

Await confirmation

Our team will review your request and notify you once the webhook URL has been successfully added or updated.

How Delivery Works

Build your webhook endpoint around these rules.

Request

Transak sends each order event as an HTTPS POST request with a JSON body (Content-Type: application/json) to the URL you registered. Redirects are not followed, so register the final URL.

The body is { "data": "<JWT>" }, where data is a JWT signed with your Partner Access Token. See Verifying the Webhook Payload.

Respond with a 2xx status

Return a 2xx status to acknowledge the event. Any other response, including a redirect (3xx), counts as a failed delivery.

Respond first and process the event afterwards: store the request body or put it on a queue, return 200, then do the work.

Retries

Transak sends each webhook once and does not retry a failed delivery. If your endpoint is down or returns an error, find the event later as described in Missed webhooks.

Repeated events

Webhooks have no unique delivery ID. eventID is the event type, not an ID, and the same eventID can be sent more than once for an order: for example, ORDER_PROCESSING is sent for both PROCESSING and PENDING_DELIVERY_FROM_TRANSAK.

Treat webhookData.status as the order’s current status, and make your handler idempotent, so that handling the same webhook twice has no extra effect. To confirm an order’s current status, call Get Order By ID.

Verify the sender

Before you trust an order webhook, verify the JWT in data with your Partner Access Token (HS256). Reject the request if the signature check fails. Each webhook is signed with the access token that is current when it is sent, so after you generate a new Partner Access Token, verify with the new one. See When You Refresh Your Partner Access Token.

Missed webhooks

1

List failed deliveries

Call Get Webhooks with status=failed, and startDate and endDate for the period your endpoint was down, to list the order webhooks that were not delivered.

2

Get the current order status

For each order, call Get Order By ID and update your records with the current status.

Order Webhooks

Notify the partner’s backend in real time when an order’s status changes. These events allow partners to track order creation, status updates, completion, and failures.

Events

ScreenWebhook Event CodeStatusDescriptionResponse JSON
ORDER_CREATEDAWAITING_PAYMENT_FROM_USERWhen the order is created, but the payment has not been received yet.{ webhookData: { id: '37969614-...', ... }, eventID: 'ORDER_CREATED' }
ORDER_PAYMENT_VERIFYINGPAYMENT_DONE_MARKED_BY_USERWhen the user marks the payment as done but it is not received by us yet.
ORDER_PROCESSINGPROCESSINGOrders in the PROCESSING state have passed the checks and the user’s payment information has been validated.{ webhookData: { id: 'e0d9f47a-...', ... }, eventID: 'ORDER_PROCESSING' }
ORDER_PROCESSINGPENDING_DELIVERY_FROM_TRANSAKWhen the payment is received and is being exchanged & transferred via us or our liquidity partner.{ webhookData: { id: 'e0d9f47a-...', ... }, eventID: 'ORDER_PROCESSING' }
ORDER_COMPLETEDCOMPLETEDWhen we have received the payment and the crypto is sent successfully to the user.{ webhookData: { id: 'e0d9f47a-...', ... }, eventID: 'ORDER_COMPLETED' }
ORDER_FAILEDCANCELLEDWhen the user cancels the order.{ webhookData: { id: '08c570cf-...', ... }, eventID: 'ORDER_FAILED' }
ORDER_FAILEDFAILEDWhen the order failed because of a card decline.{ webhookData: { id: '08c570cf-...', ... }, eventID: 'ORDER_FAILED' }
ORDER_REFUNDEDREFUNDEDWhen fiat payment received from the user is refunded back to their payment instrument as cryptocurrency could not be fulfilled due to some reason.{ webhookData: { id: '08c570cf-...', ... }, eventID: 'ORDER_REFUNDED' }
ORDER_FAILEDEXPIREDWhen the user failed to make the payment within the timeframe.{ webhookData: { id: '08c570cf-...', ... }, eventID: 'ORDER_FAILED' }

No webhook is sent when an order moves to ON_HOLD_PENDING_DELIVERY_FROM_TRANSAK. Call Get Order By ID to check its status.

Verifying the Webhook Payload

The webhook data field is a signed JWT that should be verified using your Partner Access Token before you process it on your backend.

KYC Webhooks

Notify partner’s backend in real-time when a user’s KYC verification status changes. These events allow to track KYC submissions, approvals and rejections.

Events

The following Event IDs are triggered during the KYC lifecycle and sent via webhook

Event IDKYC StatusDescription
KYC_SUBMITTED

SUBMITTED

Triggered when a user submits their KYC details

KYC_APPROVED

APPROVED

Triggered when the user’s KYC verification is approved

KYC_REJECTED

REJECTED

Triggered when the user’s KYC verification is rejected

Webhook Response

Schema

kycStatus
stringRequired

The KYC verification status (SUBMITTED, APPROVED, or REJECTED)

eventID
stringRequired

The event identifier (KYC_SUBMITTED, KYC_APPROVED, or KYC_REJECTED)

partnerUserId
stringRequired

The unique identifier for the user in the partner’s system

partnerCustomerId
string

Custom identifier for the customer. Returned only if provided in the Quote API request.

Response Schema
{
"data": {
"kycStatus": "string",
"eventID": "string",
"partnerUserId": "string",
"partnerCustomerId": "string" //Optional
}
}

Sample Response

KYC_SUBMITTED
{
"data": {
"kycStatus": "SUBMITTED",
"eventID": "KYC_SUBMITTED",
"partnerUserId": "0870c29f-75a8-4091-a068-775fa4577172",
"partnerCustomerId": "12345"
}
}
{
"data": {
"kycStatus": "APPROVED",
"eventID": "KYC_APPROVED",
"partnerUserId": "0870c29f-75a8-4091-a068-775fa4577172",
"partnerCustomerId": "12345"
}
}
{
"data": {
"kycStatus": "REJECTED",
"eventID": "KYC_REJECTED",
"partnerUserId": "0870c29f-75a8-4091-a068-775fa4577172",
"partnerCustomerId": "12345"
}
}