Refunds

Refunding a cryptocurrency transaction will essentially reverse the flow of funds after performing the necessary currency calculations to ensure the correct amount of the underlying asset is returned. Please note that the refund amount will be reduced by the current gas fee.

For example, if a customer originally paid €100 for a product in TRX (Tron) two weeks ago, the refund endpoint will take into account the current exchange rate and gas fee, before returning the resulting amount in TRX.

Create A Refund

POST /account/{accountID}/transaction/{transactionID}/refund

POST
/account/{accountID}/transaction/{transactionID}/refund
curl --location '{API_BASE_URL}/account/{ACCOUNT_ID}/transaction/{TRANSACTION_ID}/refund' \
--header 'X-API-Key: {API_KEY}' \
--header 'X-MID: {MERCHANT_UUID_OR_EXTERNAL_MERCHANT_ID}' \
--header 'Content-Type: application/json' \
--data '{
"amount": {AMOUNT_IN_FLOAT},
"reason": "{REASON}", // OPTIONAL
"gasFeePayer": "{GAS_FEE_PAYER}" // OPTIONAL
}'

gasFeePayer must be one of: merchant or customer. It determines who absorbs the network gas fee for the refund. When omitted, the refund amount is reduced by the current gas fee.

Create Refund Response

The response is an array of refund objects — one per refund leg created for the request.

  • Name
    refundID
    Type
    string
    Description

    Unique identifier for the refund.

  • Name
    assetAmount
    Type
    string
    Description

    Asset amount for the refund.

example response

[
    {
        "refundID": "acd09ac7-612f-4011-ac74-a5e1f4753648",
        "assetAmount": "9.34"
    }
]