Skip to main content

Refund

The API method Refund enables you to perform a partial or fully refund of a captured/settled transaction.

API Parameters

FieldDescriptionTypeLengthMandatory
transactionIdUnique transaction identifier.String36Yes
modifiedAmountAdditional transaction data.Object-Only for partial refunds.
modifiedAmount.descriptionDescription of the i.e. the reason for the payment.String127No
modifiedAmount.currencyCodeThe 3-letter currency ISO-4217 code.String3Only for partial refunds.
modifiedAmount.amountRefund transaction amount.Decimal18,2Only for partial refunds.
modificationIdYour unique reference for the requested modification. Used to distinguish between retry and new modification.String36Yes
merchantKeyMerchnat identifier.String36Yes
customReferencesFor external party usagecustomReferencesObjectNo
info

The request must have the following headers:

Content-Type: application/json

Accept-Language: en-US

Origin: { Origin }

Example

Request

Path:

POST {Base URL}/payment/refund

Header:

Content-Type: application/json
Accept-Language: en-US
{
"merchantKey": "31928de9-1344-469f-b0eb-8e5d0fef3d21",
"transactionId": "933a0fab-80a0-42c5-b010-c71174f4ab32",
"modificationId": "f7c55bb3-0002-4363-9a33-56af8d5e691e",
"modifiedAmount": {
"description": "SMP-Transaction-01"
"amount": 25,
"currencyCode": "EUR"
}
}
info

In retry situations, please make sure to always use the same modificationID as provided in the initial request. SmartPay uses the modificationID to reccognize retrys and will always provide you this the same result as in the initial request posted with the same modificationID.

Response on success

Status Code:

200 (OK)

Header:

Content-Type: application/json
Accept-Language: en-US
{
"reconciliationReferenceId": "RTEvocd9ZkGirboB8haVlw",
"description": "SMP-UAT-02*k2t3gn",
"paymentStatus": "CAPTURED",
"creationDate": "2020-12-15T14:35:44.532Z",
"lastStatusDate": "2020-12-15T14:36:45.031Z",
"transactionOverview": {
"amount": 35.99,
"currencyCode": "EUR",
"mit": false,
"transactionId": "933a0fab-80a0-42c5-b010-c71174f4ab32",
"paymentMethod": "IDEAL"
},
"modification": {
"modificationData": {
"type": "REFUND",
"modificationId": "Refund-1234",
"reconciliationReferenceId": "FJ9wbkRjJZsRYCrjgaGGY"
},
"modificationAmount": {
"description": "SMP-Transaction-01"
"amount": 35.99,
"currencyCode": "EUR"
},
"status": "REFUNDED",
"creationDate": "2020-12-15T14:35:44.532Z",
"statusHistory": [
{
"status": "REFUND_PENDING",
"statusDate": "2020-12-15T14:36:44.328Z",
"modificationAmount": {
"amount": 35.99,
"currencyCode": "EUR"
}
},
{
"status": "REFUNDED",
"statusDate": "2020-12-15T14:36:44.852Z",
"modificationAmount": {
"amount": 35.99,
"currencyCode": "EUR"
}
}
]
}
}
info

We unified the modification API responses. Please refer to the modification API response model for further details on API responses and error handling.