curl --request POST \
--url https://hpay-api.host-sl.com/api/v1/escrow/hold \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Idempotency-Key: order-1234-hold' \
--header 'Content-Type: application/json' \
--data '{
"wallet_id": "9a8b7c6d-...",
"amount": 200.00,
"description": "Order #1234 held pending delivery"
}'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
hold = client.escrow.hold(
wallet_id="9a8b7c6d-...",
amount=200.00,
description="Order #1234 held pending delivery",
idempotency_key="order-1234-hold",
)
print(hold["id"], hold["status"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const hold = await client.escrow.hold({
walletId: "9a8b7c6d-...",
amount: 200.0,
description: "Order #1234 held pending delivery",
idempotencyKey: "order-1234-hold",
});
console.log(hold.id, hold.status);
{
"id": "b1f2c3d4-...",
"wallet_id": "9a8b7c6d-...",
"escrow_wallet_id": "5e4f3a2b-...",
"recipient_wallet_id": null,
"application_wallet_id": null,
"amount": 200.0,
"escrow_amount": 200.0,
"application_fee": null,
"transaction_type": "escrow_hold",
"status": "held",
"description": "Funds held in escrow",
"created_at": "2025-01-16T10:30:00Z",
"updated_at": "2025-01-16T10:30:00Z"
}
{
"detail": "Insufficient funds to hold in escrow"
}
{
"detail": "Invalid credentials"
}
{
"detail": "Escrow feature is not enabled for this application"
}
{
"detail": "Sender wallet not found"
}
Escrow
Hold Funds in Escrow
Move funds from a user wallet into the application’s escrow wallet, where they are held until released or refunded.
POST
/
api
/
v1
/
escrow
/
hold
curl --request POST \
--url https://hpay-api.host-sl.com/api/v1/escrow/hold \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Idempotency-Key: order-1234-hold' \
--header 'Content-Type: application/json' \
--data '{
"wallet_id": "9a8b7c6d-...",
"amount": 200.00,
"description": "Order #1234 held pending delivery"
}'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
hold = client.escrow.hold(
wallet_id="9a8b7c6d-...",
amount=200.00,
description="Order #1234 held pending delivery",
idempotency_key="order-1234-hold",
)
print(hold["id"], hold["status"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const hold = await client.escrow.hold({
walletId: "9a8b7c6d-...",
amount: 200.0,
description: "Order #1234 held pending delivery",
idempotencyKey: "order-1234-hold",
});
console.log(hold.id, hold.status);
{
"id": "b1f2c3d4-...",
"wallet_id": "9a8b7c6d-...",
"escrow_wallet_id": "5e4f3a2b-...",
"recipient_wallet_id": null,
"application_wallet_id": null,
"amount": 200.0,
"escrow_amount": 200.0,
"application_fee": null,
"transaction_type": "escrow_hold",
"status": "held",
"description": "Funds held in escrow",
"created_at": "2025-01-16T10:30:00Z",
"updated_at": "2025-01-16T10:30:00Z"
}
{
"detail": "Insufficient funds to hold in escrow"
}
{
"detail": "Invalid credentials"
}
{
"detail": "Escrow feature is not enabled for this application"
}
{
"detail": "Sender wallet not found"
}
Holds a specified amount from a user’s wallet in your application’s escrow wallet. The funds are debited from the sender immediately and held (status
held) until you release them to a recipient or refund them to the sender.
Escrow must be enabled for your application. If it isn’t, this endpoint returns
403. Contact HostPay or enable escrow from your dashboard.Headers
string
Optional but recommended for this money-moving call. Retries with the same
key within 24 hours return the original result instead of creating a duplicate hold.
Request Body
string
required
The unique identifier of the user wallet to hold funds from.
number
required
The amount to hold in escrow, in the application’s base currency. Must be greater than 0.
string
An optional description for the hold (default: “Funds held in escrow”).
Response
string
The unique identifier of the escrow transaction. Use this ID to release or refund the hold.
string
The ID of the sender wallet the funds were held from.
string
The ID of the application escrow wallet now holding the funds.
number
The transaction amount.
number
The amount currently held in escrow for this transaction.
string
The transaction type (
escrow_hold).string
The current status of the escrow transaction (
held).string
ISO 8601 timestamp of when the hold was created.
{
"id": "b1f2c3d4-...",
"wallet_id": "9a8b7c6d-...",
"escrow_wallet_id": "5e4f3a2b-...",
"recipient_wallet_id": null,
"application_wallet_id": null,
"amount": 200.0,
"escrow_amount": 200.0,
"application_fee": null,
"transaction_type": "escrow_hold",
"status": "held",
"description": "Funds held in escrow",
"created_at": "2025-01-16T10:30:00Z",
"updated_at": "2025-01-16T10:30:00Z"
}
{
"detail": "Insufficient funds to hold in escrow"
}
{
"detail": "Invalid credentials"
}
{
"detail": "Escrow feature is not enabled for this application"
}
{
"detail": "Sender wallet not found"
}
curl --request POST \
--url https://hpay-api.host-sl.com/api/v1/escrow/hold \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Idempotency-Key: order-1234-hold' \
--header 'Content-Type: application/json' \
--data '{
"wallet_id": "9a8b7c6d-...",
"amount": 200.00,
"description": "Order #1234 held pending delivery"
}'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
hold = client.escrow.hold(
wallet_id="9a8b7c6d-...",
amount=200.00,
description="Order #1234 held pending delivery",
idempotency_key="order-1234-hold",
)
print(hold["id"], hold["status"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const hold = await client.escrow.hold({
walletId: "9a8b7c6d-...",
amount: 200.0,
description: "Order #1234 held pending delivery",
idempotencyKey: "order-1234-hold",
});
console.log(hold.id, hold.status);