Capture a pre-authorised payment
/api2.php?action=captureCaptures a payment that was only authorised (a pre-auth). The amount can be equal to or less than the authorised amount. Identify the payment by its xref (O<order_id>M<merchant_id>T<payment_id>), which you receive in the payment status webhook.
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=captureApiTokenAuthapi_token<token>API token issued by Datman.
Request Parameters
application/json- body
xref*stringThe payment's reference, O<order_id>M<merchant_id>T<payment_id>.
^O([A-Z]*\d+)M(\d+)T(\d+)$merchant_id*stringThe merchant that took the payment, as a string.
amount*numberThe amount to capture, or the new authorised amount for an adjustment, in major units.
0.01 <= valuesplit_fee?array<>|Adjustment only. New split fees; when omitted the existing splits are kept.
Response parameters & Errors
The request failed before reaching the payment provider.
application/json- response
outcome*stringmessage?stringcode?integerAn error code, present for some failures.

