This will allow you to refund an individual payment transaction within the refund period.

TypeParametersValues
POSTcmd*refund_transaction
POSTtransaction_id*integer
POSTrefund_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:

ParametersValues
transaction_refundedinteger The unique identifier that is the transaction id.
  Error Cases:
Type NumberMessageCause
247Transaction doesn't exist
  • The transaction you are trying to refund does not exist in our database.
250Transaction outside refund period
  • The transaction refund period has expired.
251Transaction already refunded
  • The transaction you are trying to refund is already refunded.
253This type of transaction cannot be refunded or cancelled
  • The transaction is not a sale or a rebill type, or is a test transaction.
266Refund has failed
  • The refund process encountered an unexpected issue.
268Invalid amount
  • If refund_amount is present, but the format is not float.
An example of an error message:
{
  "status": "Error",
  "message": "Transaction already refunded",
  "type": "251"
}