Payment status webhooks
Find out which webhooks Datman sends for payment events.
When the status of a payment changes, Datman sends a paymentStatus webhook to inform your server of the change. Use this guide to learn which payment events Datman sends webhooks for, and how to identify them.
Datman sends one kind of webhook for payment events:
paymentStatus, which informs your server that a payment was authorised, refused, adjusted, captured or cancelled, or that a capture failed.
Requirements
Before you begin, take into account the following requirements, limitations, and preparations.
| Requirement | Description |
|---|---|
| Integration type | A Datman integration that takes payments with the hosted payment page. |
| Webhooks | Make sure that: - Your server can receive and accept webhooks. - You send your webhook URL in WebhookUrl when you create a payment session, or in webhook_url in the hosted payment payload.- You have a webhook secret from Datman, so that you can verify the HMACSignature header. |
Identify payment status webhooks
You can identify payment status webhooks and the event they describe by looking at the following fields:
| Parameter | Description | Value |
|---|---|---|
xref | Datman's reference for the payment, in the form O{order_id}M{merchant_id}T{payment_id}. | For example, O88213045M663412T4821937 |
status | The payment event, in lower case. | authorisation, authorisation_adjustment, capture, capture_failed or cancellation |
success | Whether the event succeeded, as a string. | true or false |
Note that order_id is your original order reference and customer_id is your original shopper reference, from the request that created the payment.
Datman sends webhooks for the following payment events:
The following sections provide code samples for the events that trigger webhooks. These samples consider a use case where a shopper pays Example Pizza Ltd (MID 663412) GBP 24.50 for an order. All amounts in this webhook are strings in major units, for example 24.50.
Payment authorised
After the shopper pays, Datman sends a paymentStatus webhook to inform your server of the result of the authorisation. The webhook provides information about the payment, such as:
- The
amountandcurrencyof the payment. - Your
order_idandcustomer_id. - Datman's
xreffor the payment. Save it, because you need it to match later webhooks for the same payment. - Card and check details, such as
card_type,card_bin,last4_digits,avs_result,cvc_resultandthree_ds_authenticated.
When the payment is authorised, the webhook has status authorisation and success true.
Payment authorised
{
"order_id": "ORD-100245",
"amount": "24.50",
"currency": "GBP",
"customer_id": "CUST-55021",
"xref": "O88213045M663412T4821937",
"status": "authorisation",
"success": "true",
"date": "2026-10-15 12:34:56+01:00",
"three_ds_authenticated": "true",
"three_ds_authenticated_response": "Y",
"card_bin": "411111",
"last4_digits": "1111",
"expiry_date": "03/2030",
"avs_result": "4 AVS not supported for this card type",
"cvc_result": "1 Matches",
"card_type": "visa"
}Payment refused
If the payment is refused, the webhook has:
statusauthorisationsuccessfalsereason: why the payment was refused, for example CVC Declined.
Payment refused
{
"order_id": "ORD-100246",
"amount": "24.50",
"currency": "GBP",
"customer_id": "CUST-55021",
"xref": "O88213046M663412T4821938",
"status": "authorisation",
"success": "false",
"date": "2026-10-15 12:34:56+01:00",
"cvc_result": "2 Does not match",
"card_type": "visa",
"reason": "CVC Declined"
}Authorisation adjusted
After you adjust the amount of a pre-authorised payment, Datman sends a paymentStatus webhook with:
statusauthorisation_adjustmentsuccesstrue if the new amount is authorised, or false with areasonif it is not.amount: the new authorised amount.
For example, if Example Pizza Ltd adds a GBP 2.00 tip to the order, the webhook has amount 26.50.
Authorisation adjusted
{
"order_id": "ORD-100245",
"amount": "26.50",
"currency": "GBP",
"customer_id": "CUST-55021",
"xref": "O88213045M663412T4821937",
"status": "authorisation_adjustment",
"success": "true",
"date": "2026-10-15 12:40:02+01:00"
}Payment captured
When a pre-authorised payment is captured, for example after you make a capture request, Datman sends a paymentStatus webhook with:
statuscapturesuccesstruesplit_fee_status: present only if the order has split fees. It contains theoutcomeandmessageof the split fee.
Payment captured
{
"order_id": "ORD-100245",
"amount": "26.50",
"currency": "GBP",
"customer_id": "CUST-55021",
"xref": "O88213045M663412T4821937",
"status": "capture",
"success": "true",
"date": "2026-10-15 13:05:41+01:00"
}Capture failed
If a capture can't be completed, Datman sends a paymentStatus webhook with:
statuscapture_failed, orstatuscapture withsuccessfalse.reason: why the capture failed.
Capture failed
{
"order_id": "ORD-100245",
"amount": "26.50",
"currency": "GBP",
"customer_id": "CUST-55021",
"xref": "O88213045M663412T4821937",
"status": "capture_failed",
"success": "false",
"date": "2026-10-16 13:05:41+01:00"
}Authorisation cancelled
After you reverse a pre-authorisation, Datman sends a paymentStatus webhook with:
statuscancellationsuccesstrue if the authorisation was reversed.
Authorisation cancelled
{
"order_id": "ORD-100245",
"amount": "24.50",
"currency": "GBP",
"customer_id": "CUST-55021",
"xref": "O88213045M663412T4821937",
"status": "cancellation",
"success": "true",
"date": "2026-10-15 12:50:10+01:00"
}Verify the signature
Each paymentStatus webhook carries an HMACSignature header: the HMAC-SHA256 of the request body, computed with your webhook secret and hex-encoded. Verify it before you process the webhook. For the steps and code samples, see Verify webhook signatures.
Note that Datman includes the HMACSignature header only when a webhook secret is set up for your account. We recommend that you make sure that you have a webhook secret before you go live, so that you can verify every webhook.

