Transaction Refund

caution

Transaction Refund can only be performed when a transaction has been charged/settled and is in a CHARGE state. Any transaction which is not yet settled/charged should be cancelled via the Transaction Reversal function.

You will encounter scenario where it is required to refund a consumer; Either for the full transaction amount in the case of a return of goods, or in some cases for a reduced amount such as a gesture of goodwill. Our Gateway solution allows you to manage this yourself using the tokenId, but this requires additional integration effort.

To simplify the process, our Checkout solution has the ability for a merchant to perform a refund against the transaction id, removing the requirement to store the consumers tokenId. The refund request can be for any value up to the value of the original transaction. Only one refund can be processed against each id and therefore if additional refunds are required to be made these will have to be completed using the token, via the the Gateway.

Transaction Refund Request

MethodPOST
Transaction Settlement
Field NameStateData TypeDescription
idMandatoryStringId of the transaction that neeed to be refunded.
amountOptionalDecimal

Value of transaction to refund. This value cannot be higher than the original authorisation amount. If not supplied the full original transaction amount will be refunded.

reasonOptionalString

Descriptive text detailing the reason for the refund that is stored against the refund in the “Reporting” and “Settlement” APIs.

merchantCustomDataOptional

String

Max 1024 bytes

Free text field for integrated system to pass custom data that will be stored against the transaction. This data will be returned in the result and available via the “Reporting” API and when using DNA Payments acquiring service the “Settlement” API.

Example Refund Request

Example Refund Request
Accept: application/json
Content-Type: application/json
Authorization: Bearer 7KlGv*jFigCc3eReLY1h0yI8O31ZgqITFqyUH6om5w=Vjan=SYnUgeiLQp*_b-c3
{
"id": "6fce7714-6109-40d8-b408-0c6700509b6b",
"amount": 9.99
}

Transaction Refund Response

Transaction Refund Response
Field NameData TypeDescription
accountIdStringUnique reference for the store processing the transaction.
amountDecimalTotal amount of the original order/authorisation including decimal places where applicable.
currencyStringCurrency of the transaction.
GBPPound Sterling
idStringUnique transaction ID.
invoiceIdStringOrder/invoice/transaction/basket number generated by the host website, as passed in the request.
messageStringMessage confirming the processing result of the transaction request. 
authDateTimeUTCdateTime

Time the refund was processed.

Format: YYYY-MM-DDTHH:MM:SS.ZZZZZZZZZZZ

errorCodeIntegerProvides additional detail should an error have occurred with the transaction.
0No error occurred.
A full list of Error Codes can be found here.
paymentMethodStringPayment method used in the refund.
cardCard payment
paypalPayPal payment
applepayApple Pay payment
googlepayGoogle Pay payment
paybybankappPay by Bank App payment
ecospendEcospend (Open Banking) payment
responseCodeStringReturned by the acquirer detailing the result of the transaction. A full list of Response Codes can be found here.
rrnStringUnique reference allocated by us to the authorisation.
successBooleanConfirms whether the transaction has been successful.
trueTransaction approved.
falseTransaction not approved.
settledBooleanConfirms whether the transaction has been submitted for overnight settlement.
trueTransaction settled.
falseTransaction not settled.
parentTransactionIdStringTransaction Id of the original Sale transaction which was subject to this refund request.

Example Responses

Example Successful Refund Response
{
"accountId": "uuid000001",
"amount": 1,
"authDateTimeUTC": "2021-05-07T12:42:32.960316497Z",
"currency": "GBP",
"responseCode": 0,
"id": "7f704ff0-80be-4a1b-9ec5-5fd0d4079561",
"invoiceId": "ReadyToBeRefunded",
"message": "Completed successfully",
"parentTransactionId": "4ad2939f-2f51-40aa-af63-f7df02070d1d",
"paymentMethod": "card",
"responseCode": "00",
"rrn": "e83f55bc-5276-4f36-906b-a5aad12c3466",
"settled": true,
"success": true
}