Payment modificationsPayment modifications

Reverse a pre-authorisation

post/api2.php?action=auth_reversal

Cancels a payment that was authorised but not captured, releasing the hold on the shopper's funds. Identify the payment by its xref (O<order_id>M<merchant_id>T<payment_id>).

Validation errors are returned with HTTP 200 and outcome: failed. When the request reaches the payment provider, its HTTP status is returned: 201 when accepted, or an error status. outcome is then success even if the provider returned an error.

Endpoint destination URL

https://sandbox-payments.datmanpay.com/api2.php?action=auth_reversal

Authorization

ApiTokenAuth
headerapi_token<token>

API token issued by Datman.

Request Parameters

Request Body

application/json
  1. body
xref*string

The payment's reference, O<order_id>M<merchant_id>T<payment_id>.

Match^O([A-Z]*\d+)M(\d+)T(\d+)$
merchant_id*string

The merchant that took the payment, as a string.

Response parameters & Errors

Response Body

The request failed before reaching the payment provider.

application/json
  1. response
outcome*string
message?string
code?integer

An error code, present for some failures.