Post
/api/pay/v1/transactions/BL-2MUXYN2QLP/refunds
This endpoint refunds a transaction which has been authorised and settled (only applicable for card transactions).
Parameters
transaction_id
(string, required): Transaction ID returned as resvalue in return url after the Payment request.
Request Body
partial_refund
(boolean, optional): If the transaction is a partial refund, then set it to true. Default value is false.
amount
(float, optional): Amount is required if it is a partial refund. The amount cannot be greater than the original received amount minus any already refunded amount.
reference
(string, optional): Reference for the refund. Default is the original transaction_unique.
Response Body
success
: (boolean) Indicates whether the cancellation was successful.message
: (string) Provides a message related to the cancellation status.amount
: (string) Represents the amount associated with the cancelled transaction.reference
: (string) Contains a note or reference related to the cancellation.transaction_id
: (string) Identifies the cancelled transaction with a unique ID.
Security
HTTP
Type bearer
Header parameters
Authorization
string
ExampleBearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtZXJjaGFudF9pZCI6NDM5OCwic2VjcmV0X2tleSI6IjYzMTBlNDhiZGQwZTQzODE0NTlhNjJiNDZkMmM0ZmQ2ZThhYjY1YTJhNGQ1MjA1YzZjM2RkZWJmYmJhZWJiZjgiLCJleHAiOjE3MjA3MDcyNjZ9.91qa4veQ9xGVM-Jc_3_i_vaykEdYarRwUzb-37aLD0c
Body parameters
object
Example{
"partial_refund": true,
"amount": 1
}
Responses
200
Successful response