Skip to main content
POST
/
api
/
v1
/
escrow
/
{transaction_id}
/
refund
curl --request POST \
  --url https://hpay-api.host-sl.com/api/v1/escrow/b1f2c3d4-.../refund \
  --header 'api-key: YOUR_API_KEY' \
  --header 'secret-key: YOUR_SECRET_KEY'
{
  "id": "d3e4f5a6-...",
  "wallet_id": "9a8b7c6d-...",
  "escrow_wallet_id": "5e4f3a2b-...",
  "recipient_wallet_id": null,
  "application_wallet_id": null,
  "amount": 200.0,
  "escrow_amount": 0.0,
  "application_fee": null,
  "transaction_type": "escrow_refund",
  "status": "completed",
  "description": "Escrow refunded",
  "created_at": "2025-01-16T12:30:00Z",
  "updated_at": "2025-01-16T12:30:00Z"
}
Refunds funds held by an escrow hold back to the wallet they were held from. Use this when a held transaction should be reversed (e.g., an order was cancelled). The full held amount is returned to the original sender; no escrow fee is applied.

Path Parameters

transaction_id
string
required
The ID of the escrow transaction (returned by the hold endpoint) to refund. Must still be holding funds.
This endpoint takes no request body.

Headers

Idempotency-Key
string
Optional but recommended for this money-moving call. Retries with the same key within 24 hours return the original result instead of refunding twice.

Response

id
string
The unique identifier of the refund transaction.
wallet_id
string
The ID of the original sender wallet the funds were returned to.
amount
number
The amount refunded to the sender.
status
string
The current status of the refund transaction (e.g., completed).
created_at
string
ISO 8601 timestamp of the refund.
{
  "id": "d3e4f5a6-...",
  "wallet_id": "9a8b7c6d-...",
  "escrow_wallet_id": "5e4f3a2b-...",
  "recipient_wallet_id": null,
  "application_wallet_id": null,
  "amount": 200.0,
  "escrow_amount": 0.0,
  "application_fee": null,
  "transaction_type": "escrow_refund",
  "status": "completed",
  "description": "Escrow refunded",
  "created_at": "2025-01-16T12:30:00Z",
  "updated_at": "2025-01-16T12:30:00Z"
}
curl --request POST \
  --url https://hpay-api.host-sl.com/api/v1/escrow/b1f2c3d4-.../refund \
  --header 'api-key: YOUR_API_KEY' \
  --header 'secret-key: YOUR_SECRET_KEY'