This will allow you to refund an individual payment transaction within the refund period.
Type | Parameters | Values |
POST | cmd* | refund_transaction |
POST | transaction_id* | integer |
POST | refund_amount** | float |
* Required field ** If refund_amount is left empty, the entire transaction amount will be refunded. No need to state the currency, as it will be executed in whatever currency the original transaction was processed in. Here is an example:
'actions' => [ '0' => [ 'cmd' => 'refund_transaction', 'transaction_id' => 738474, 'refund_amount' => 19.95 ] ]
Success message:
{ "refund_transaction":{ "status":"Success", "transaction_refunded":"792354" } }
Result parameters:
Parameters | Values |
transaction_refunded | integer The unique identifier that is the transaction id. |
Type Number | Message | Cause |
247 | Transaction doesn't exist |
|
250 | Transaction outside refund period |
|
251 | Transaction already refunded |
|
253 | This type of transaction cannot be refunded or cancelled |
|
266 | Refund has failed |
|
268 | Invalid amount |
|
{ "status": "Error", "message": "Transaction already refunded", "type": "251" }