POST
/
instant-refund-hash
Get instant refund hash for the given swap.
curl --request POST \
  --url https://{environment}.garden.finance/v2/instant-refund-hash \
  --header 'Content-Type: application/json' \
  --header 'garden-app-id: <api-key>' \
  --data '
{
  "order_id": "<string>"
}
'
{
  "status": "Ok",
  "error": "<string>",
  "result": "<string>"
}
This is the v2 API. v3 is the current version. See the v3 reference.v2 continues to work and is not being switched off. A date will be announced well before anything changes.
The hashes to sign for a Bitcoin instant refund — one per UTXO backing the source leg. Use them to refund an order before the atomic swap’s timelock expires. Bitcoin only: other chains refund through Execute HTLC Action with action=refund.
This endpoint was previously documented as GET /orders/{order}/instant-refund-hash. That form never existed — the implementation has always taken the order id in a POST body.

Authorizations

garden-app-id
string
header
required

If you do not yet have an app ID, please follow these steps.

Body

application/json
order_id
string
required

Response

One hash per UTXO, in input order.

status
enum<string>
Available options:
Ok,
Error
error
string | null
result
string