Environments

Test and production separation

halfin separates test and live data at the API-key level. A test key can only see test invoices, balances, payouts, and webhook deliveries. A live key can only see live resources.

Base URL

The current API base URL is:

https://api.halfin.xyz/api

Use sk_test_... keys while building and sk_live_... keys only from production server-side code.

Switching Environments

Merchant API requests do not need an environment query parameter. The key determines the environment.

Public data endpoints can accept an environment filter when the response depends on live or test offerability:

curl -G https://api.halfin.xyz/api/v1/currencies \
  --data-urlencode "environment=test"

Going Live

Before switching to a live key, verify webhook signatures, idempotency keys, and payout approval rules in test mode.