Skip to content

Partial reverse an APM payment

Request

Perform a partial reversal on the funds taken from a sale.

Security
BasicAuth
Path
paymentIdstringrequired

The identifier of the payment resource.

Headers
Content-Typestringrequired

The content type of the request body.

Value:"application/json"
WP-Api-Versionstringrequired

The API version.

Value:"2024-07-01"
Bodyapplication/jsonrequired
valueobjectrequired

The value of the payment.

referencestring, [ 1 .. 128 ] characters^[a-zA-Z0-9\-]*$
reasonCodestring

Mandatory for Pix payment method, not relevant for other payment methods.

Enum:"BE08""FR01""MD06""SL02"
orderobject

Object that contains the complete list of lines relating to the transaction.

passthroughDatastring, [ 1 .. 10240 ] characters

Passthrough field representing additional payment information. We do not validate this field beyond checking length. Must contain escaped JSON ready for transmission.

{ "reference": "string", "value": { "amount": 12, "currency": "AED" } }

Responses

Request successful

Bodyapplication/json
paymentIdstring

The identifier of the payment resource.

commandIdstring

An action ID generated by us, identifying a single merchant interaction.

Example:"cmdYNdIHBPJwbkjLiykzTx0"
lastEventstring
Enum:"authorized""cancelFailed""cancelled""cancelRequested""sentForSettlement""sentForAuthorization""settlementFailed""chargebackReversed""chargedBack""disputeExpired"
_actionsobject
Response
{ "paymentId": "3Ihrz_xFV1nTRAHhJABserDF09eNdqnSHh2H8qlv7QIZ4iW8JjMy1wo4b2GozzFtfnOUMIZGm4eSqTixJe1tGDzD3NTuoxp7Ud1N920NPyBiaK1MePsYPNh4StVn5GLv9dz9tm3t0o9KS2dze2cQ2iJdjRiX7-j4OEhFc5W4W6hK1prAjyQIHthwfovFL63f", "lastEvent": "sentForRefund", "_links": { "self": { "href": "https://try.access.worldpay-bsh.securedataplatform.co.uk/apmPayments/3Ihrz_xFV1nTRAHhJABserDF09eNdqnSHh2H8qlv7QIZ4iW8JjMy1wo4b2GozzFtfnOUMIZGm4eSqTixJe1tGDzD3NTuoxp7Ud1N920NPyBiaK1MePsYPNh4StVn5GLv9dz9tm3t0o9KS2dze2cQ2iJdjRiX7-j4OEhFc5W4W6hK1prAjyQIHthwfovFL63f" } }, "_actions": {}, "commandId": "cmdfD7kJPxS4EiQhq3zCFcny0" }