Documentation Index
Fetch the complete documentation index at: https://docs.hg.cash/llms.txt
Use this file to discover all available pages before exploring further.
What gets delivered
HG.Cash enqueues an asynchronousPOST to:
- Your user’s default webhook URL (configured in HG.Cash Settings alongside the webhook signing secret), or
- A
webhookUrlyou pass per operation where the API or form allows it — for example creating a ledger transaction via the REST API (POST /api/v1/transactions) or a transaction request from the transfers flow when that field is available.
Content-Type: application/json and the request body is a single flat JSON object (not nested under { "transaction": ... }).
Payload shape and examples live in the API reference (open the API reference tab, then Webhooks):
- Transaction requests (cash-out pipeline,
typeis always"request"): Transaction Request Status Updated — schemaTransactionRequestStatusWebhookwith a full example payload. - Ledger / account movements (money in or out of your HG.Cash accounts;
typeis your movement / transaction type name such asinboundoroutbound): Account movement — schemaAccountMovementWebhookwith a full example payload.
type: "request")
Callbacks are sent when HG.Cash updates a transaction request’s status or when a request is cancelled. You may not receive a webhook as soon as a request is created while it is only PENDING; integrate defensively against ordering and duplicates.
Ledger transactions
When a ledger transaction row is ingested from webhooks/API and your resolved URL applies, HG.Cash can notify immediately after persistence; type is the business type name, not "request".
Signing secret (X-HG-Webhook-Signature)
If your HG.Cash profile has a webhook signing secret set, HG.Cash signs the exact raw JSON body:
- Algorithm:
HMAC-SHA256over the UTF-8 bytes of the body string HG.Cash will send (JSON.stringifyequivalent of the payload object). - Header:
X-HG-Webhook-Signature. - Format:
sha256=<hex>where<hex>is lowercase hex (64 chars).
- Read the raw request body as delivered — do not re-serialize parsed JSON unless you replicate every key order/spacing HG.Cash used.
- Compute
hex = HMAC_SHA256(secret, rawBody_utf8)and compare securely to header value after stripping the optionalsha256=prefix (case insensitive). - Reject mismatches (
401/403on your side is fine).
X-HG-Webhook-Signature header omitted entirely.
Retries
Failed deliveries (non-2xx HTTP status, network errors, or timeouts) are retried automatically with this policy:
| Setting | Value |
|---|---|
| Max attempts | 4 (includes the first try) |
| Backoff factor | 5 |
| Minimum wait between attempts | 500 ms |
| Maximum wait between attempts | 30 s |
| Jitter | Off (no randomization) |
Operational expectations
- Respond with
2xxquickly so the delivery counts as successful; otherwise you may receive repeatPOSTs until attempts are exhausted or one succeeds. - Prefer idempotent handlers keyed by HG.Cash
idandstatustransitions you care about — redeliveries or duplicate emits are possible alongside provider quirks.

