Skip to content

Reversal Payment

Note

Not all acquirers/payment brands support reversal and certain reversal type. Before implementing, check with your account manager if reversal is supported in your account.


An endpoint to request a reversal for a transaction.

To initiate transaction reversal, send the request header and body parameters via POST.

POST/reversal

reversal has two types, the FULL and PARTIAL reversal.

Full Reversal

HEADER PARAMETERS

Content-Type optional
string
Default content type of the API.

Authorization required
string
Unique identifier of the integrator.

REQUEST BODY SCHEMA: application/json

transaction_id required
string
Payment transaction reference ID.

notify_user required
string
True or false value. Directs function whether to notify the customer via email.

reason required
string
Note or remark why the transaction is being refunded.

Request Samples

curl
    -X POST "https://test-api.tlpe.io/reversal" \
    -H "Content-Type: application/json" \
    -H "Authorization: {integratorToken}" \
    -d "{
        "transaction_id":"{transactionId}",
        "notify_user":"false",
        "reason":"Cancelled transaction"
    }"

Download Postman request here

200 Successful Response

RESPONSE SCHEMA: application/json

timestamp
string
Transaction timestamp

status
string
HTTP status code

message
string
HTTP status code message/description

path
string
Endpoint path used for the transaction

data
object
Contains transaction-related response

transaction_id
string
Payment reference number of the transaction

status_code
string
API status code

status_description
string
API status code message/description

200 Erroneous Response

RESPONSE SCHEMA: application/json

timestamp
string
Transaction timestamp

status
string
HTTP status code

message
string
HTTP status code message/description

path
string
Endpoint path used for the transaction

data
object
Contains transaction-related response

status_code
string
API status code

status_description
string
API status code message/description

Response Samples

{
"timestamp": "2020-07-14T08:08:04.815+0000",
"status": 200,
"message": "Request processed successfully",
"path": "/reversal",
"data": {
    "transaction_id": "{transactionId}",
    "status_code": "OK.02.00",
    "status_description": "Full reversal successful"
    }
}
{
"timestamp": "2020-07-14T08:08:04.815+0000",
"status": 200,
"message": "Request processed successfully",
"path": "/reversal",
"data": {
    "transaction_id": "{transactionId}",
    "status_code": "OK.02.00",
    "status_description": "Full reversal successful"
    }
}

Partial Reversal

HEADER PARAMETERS

Content-Type optional
string
Default content type of the API.

Authorization required
string
Unique identifier of the integrator.

REQUEST BODY SCHEMA: application/json

transaction_id required
string
Payment transaction reference ID.

notify_user required
string
True or false value. Directs function whether to notify the customer via email.

reason required
string
Note or remark why the transaction is being refunded.

amount required
string
Amount to be refunded. Must not exceed available refundable amount.

Request Samples

curl
    -X POST "https://test-api.tlpe.io/reversal" \
    -H "Content-Type: application/json" \
    -H "Authorization: {integratorToken}" \
    -d "{
        "transaction_id":"{transactionId}",
        "notify_user":"false",
        "reason":"Cancelled transaction",
        "amount": 1.00
    }"
200 Successful Response

RESPONSE SCHEMA: application/json

timestamp
string
Transaction timestamp

status
string
HTTP status code

message
string
HTTP status code message/description

path
string
Endpoint path used for the transaction

data
object
Contains transaction-related response

transaction_id
string
Payment reference number of the transaction

status_code
string
API status code

status_description
string
API status code message/description

200 Erroneous Response

RESPONSE SCHEMA: application/json

timestamp
string
Transaction timestamp

status
string
HTTP status code

message
string
HTTP status code message/description

path
string
Endpoint path used for the transaction

data
object
Contains transaction-related response

status_code
string
API status code

status_description
string
API status code message/description

{
    "timestamp":"2020-07-14T09:29:03.806+0000",
    "status":200,
    "message":"Request processed successfully",
    "path":"/reversal",
    "data":{
        "transaction_id":"{transactionId}",
        "status_code":"OK.04.00",
        "status_description":"Partial reversal successful"
    }
}
{
    "timestamp":"2020-07-14T09:29:49.843+0000",
    "status":200,
    "message":"Request processed successfully",
    "path":"/reversal",
    "data":{
        "status_code":"ER.20.20",
        "status_description":"Unable to process client request due to 'Transaction is already reversed'"
    }
}