Refunds
Refund a succeeded transaction. Lydian recalculates the amount of the underlying asset to return using the current exchange rate and reduces it by the current gas fee (unless gasFeePayer overrides who pays). A transaction must have succeeded (status 1) to be refunded.
For the end-to-end refund workflow, see Refund a Payment.
Create A 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
"receiverAddress": "{WALLET_ADDRESS}" // 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.
receiverAddress is an optional destination wallet address for the refund.
When provided, it must not be blank.
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"
}
]
