{
"event": "reward.provision",
"test": false,
"idempotency_key": "9f1c3a2e-5b7d-4e21-9a0c-1f2d3e4b5a67",
"redemption_id": "9f1c3a2e-5b7d-4e21-9a0c-1f2d3e4b5a67",
"reward_id": "3f2b1c9e-7d4a-4f1b-8c2e-9a0d1e2f3b4c",
"business_id": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
"user_id": "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081",
"asset_type": "code",
"requested_at": "2026-08-05T12:00:00.000Z"
}{
"type": "code",
"value": "NETFLIX-XYZ123",
"expires_at": "2026-12-31T23:59:59Z"
}Provision a digital reward you implement this
Rigaly calls you. This is the endpoint you host at
digital_webhook_url for a reward whose digital_asset_source is
external. It is called once per redemption, at redemption time, and
must return the value the customer receives.
Headers on every call:
| Header | |
|---|---|
X-Rigaly-Event | Always reward.provision |
X-Rigaly-Timestamp | Unix seconds |
X-Rigaly-Signature | t=<unix>,v1=<hex> where the hex is HMAC_SHA256(secret, "{t}.{raw body}") |
Idempotency-Key | The redemption’s UUID (test_<uuid> for test calls) |
User-Agent | Rigaly-Webhooks/1.0 |
The same Idempotency-Key must return the same value. Store the key
with the value you minted and replay it on a repeat call — never mint a
new one. This is what makes the call safe to repeat.
Operational envelope: HTTPS only, redirects are not followed, 5 second
timeout, no in-request retries, response body capped at 64 KB, and a
per-reward circuit breaker that stops calling for 60 seconds after 5
consecutive failures. Anything other than a 2xx with a valid body fails
the redemption with DIGITAL_PROVISION_FAILED (502) — and because points
are only deducted after the value is secured, the customer is left
untouched: no points taken, no fee charged.
Full walkthrough with signature verification in four languages: external provisioning.
{
"event": "reward.provision",
"test": false,
"idempotency_key": "9f1c3a2e-5b7d-4e21-9a0c-1f2d3e4b5a67",
"redemption_id": "9f1c3a2e-5b7d-4e21-9a0c-1f2d3e4b5a67",
"reward_id": "3f2b1c9e-7d4a-4f1b-8c2e-9a0d1e2f3b4c",
"business_id": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
"user_id": "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081",
"asset_type": "code",
"requested_at": "2026-08-05T12:00:00.000Z"
}{
"type": "code",
"value": "NETFLIX-XYZ123",
"expires_at": "2026-12-31T23:59:59Z"
}Body
Body Rigaly POSTs to your digital_webhook_url. IDs only — no customer PII.
reward.provision "reward.provision"
true for calls from POST /rewards/{id}/webhook/test. Return a throwaway value for these.
false
Also sent as the Idempotency-Key header. The same key must always return the same value — never mint a new one on a retry.
"9f1c3a2e-5b7d-4e21-9a0c-1f2d3e4b5a67"
null on test calls.
The Rigaly customer. null on test calls.
The reward's digital_asset_type — your response's type must match it exactly.
code, link Response
The minted value. Any 2xx status is accepted.
What your endpoint must return with a 2xx status, within 5 seconds and under 64 KB.
Must equal the reward's digital_asset_type; a mismatch is rejected and the redemption cancelled.
code, link "code"
The code, or an http(s) URL when type is link.
1 - 500"NETFLIX-XYZ123"
Optional. Must be in the future if present.
"2026-12-31T23:59:59Z"