Skip to main content
Webhooks push HTTP notifications to your server when something happens in Scrip: a balance changes, a redemption completes, or an event finishes. Register a URL and Scrip delivers a signed webhook event to it.

Choose an endpoint

Create an endpoint

Register a URL and the webhook events you want to receive. Subscribe only to the types you handle. "enabled_events": ["*"] receives every type.
The API returns 201 Created with a secret starting with whsec_. Store it immediately; you cannot retrieve it later. Creating an endpoint does not replay the response when you retry with the same Idempotency-Key. If you lose the response, list your endpoints to find the one created, rotate its secret, and store the new secret before using the endpoint.
URLs must use HTTPS with a publicly resolvable hostname. Private IPs, localhost, .local, and .internal domains are rejected. To receive deliveries on your own machine, see Develop locally.

Verify a delivery

Every delivery carries two signatures over the same raw body: the Standard Webhooks headers and the Scrip-Signature header. Verify either one. A stock Standard Webhooks library needs the least code.

Verify with a Standard Webhooks library

Pass the endpoint secret to a stock Standard Webhooks library with the whsec_ prefix included. The library checks the signature and rejects timestamps more than five minutes old. Pass the raw request body, not parsed and re-serialized JSON.
Return 2xx only after verification passes. Return 400 or 401 on failure.

Verify Scrip-Signature

To verify Scrip-Signature (t={unix_seconds},v1={hex_hmac}) directly without a library, compute HMAC-SHA256 over {t}.{raw_body} with your whsec_... secret:

Develop locally

Scrip delivers only to public HTTPS URLs, so localhost does not work as an endpoint. Run a tunnel to forward a public HTTPS URL to your machine, register it, and send a test delivery.
1

Start your receiver

Run your handler on a local port, for example 3000.
2

Open a tunnel

Use a tunnel such as ngrok or Cloudflare Tunnel to get a public https:// URL:
3

Register the tunnel URL

Create an endpoint with the tunnel URL (such as https://a1b2-203-0-113-7.ngrok-free.app/webhooks/scrip) and store the secret from the response.
4

Send a test delivery

Ask Scrip to send one signed sample to the endpoint:
The API returns 202 with the new delivery and a Location header. The sample is signed like a real delivery and marked "test": true, so your handler can tell it apart. A disabled or paused endpoint returns 409 endpoint_not_active.
Tunnel URLs change when you restart the tunnel. Update the endpoint with PATCH, or archive it when you finish so Scrip stops delivering to a closed tunnel.

Read the payload

Every delivery sends a JSON envelope:

Payload policy

  • Ignore fields you do not recognize. Adding a field never changes api_version.
  • A breaking change gets a new api_version date. Renaming, removing, or retyping a field is breaking. The date is fixed when the webhook event is created, so retried deliveries keep their original contract shape.
  • Field names match the public API. One exception: event.reversed line amounts are requested, recovered, and shortfall (the reversal API returns requested_amount, recovered_amount, and shortfall_amount).
  • Optional fields are omitted when absent (never sent as explicit null).
  • Amounts are decimal strings ("100.00"). Fiat amounts are {"amount_minor": 2500, "currency": "USD"}.
  • Related resources use their public ID, such as redemption_id, reversal_id, and event_id.

Webhook event types

GET /v1/webhook-event-types returns every supported type with a sample payload. See Event payloads for exact data schemas.

Movement and lifecycle webhook events

  • Movement webhook events (balance.*, transfer.completed, and program.*) report one ledger journal entry and include journal_entry_id and amount. Apply these if you mirror participant or group balances from webhooks.
  • Lifecycle webhook events (redemption.*, fulfillment_account.*, funding_source.*, reward.*, participant.*, and event.*) report a resource changing state and include the resource ID and its status.
Payloads identify participants by participant_id. participant.created and event.completed also carry external_id; for other types, read it from GET /v1/participants/{participant_id}. Deduplicate deliveries by the webhook-id header.

Movement webhook events

Lifecycle webhook events

Reward status webhook events

reward.status_changed fires whenever a reward moves between DRAFT, ACTIVE, OUT_OF_STOCK, and ARCHIVED (via PATCH or automatic inventory exhaustion/restoration; creating a reward does not emit it). Treat OUT_OF_STOCK as live inventory state, not a terminal state. See Inventory management.

Gift-card webhook events

On redemption.fulfillment_succeeded (data.type: "GIFT_CARD"), call Create a claim link (webhook payloads never include claim links). On funding_source.low (reason: "ORDER_BLOCKED"), add funds in the dashboard and Scrip retries automatically. On fulfillment_account.status_changed, inspect status_reason in the dashboard. See Handle a pending order.

Event outcome

event.completed carries data.outcome: the net balance movements, tags added or removed, tier changes, and counter changes made by the event across every participant, group, or program it touched (attribute changes are omitted). You can render user notifications like “You earned the First purchase badge and 100 points” directly from this delivery without polling the event back.
  • Net changes only: A tag added then removed, a counter or tier that ends where it started, or a movement that nets to zero is omitted.
  • 50-item cap: If an event changes more than 50 total items across all entities (event participant first, then other participants, groups, and programs), Scrip returns the first 50 and sets outcome.truncated: true. Call GET /v1/events/{event_id}/impact for the uncapped list, or if Scrip could not build outcome (in which case data carries only event_id, organization_id, and program_id).
  • Scope: Fires for every completed event (including scheduled system events such as tier_evaluation), never for direct API writes such as balance operations or PATCH /v1/participants/{participant_id}.
See the full event.completed payload for field-by-field details.

Retries

Scrip retries every response except 2xx and 410 Gone, plus network errors and timeouts, using exponential backoff (up to 8 attempts over ~10.5 hours): After 8 attempts, the delivery is marked FAILED. You can resend any terminal delivery to replay it.

Response handling

Return 2xx within 30 seconds and process heavy work asynchronously. Scrip times out each attempt after 30 seconds and stores the first 4 KB of your response body.

Delivery states

Delivery error codes

Failed attempts carry a stable error_code alongside last_error (cleared on success): consumer_response_timeout, connection_error, tls_error, consumer_4xx, consumer_5xx, rate_limited, gone, endpoint_archived, and marshal_error.

Pausing and disabling an endpoint

Disabling an endpoint pauses it without failing queued deliveries (PENDING). When you re-enable it ({"status": "ACTIVE"}), overdue deliveries resume within 30 seconds. Only archiving an endpoint fails queued deliveries. Scrip also pauses or disables failing endpoints automatically: Webhook events that fire while an endpoint is DISABLED create no delivery and cannot be resent. See Recover events missed while disabled.

Manage an endpoint

Disable and re-enable

Send {"status": "ACTIVE"} to resume. The same request updates url, description, enabled_events, and metadata.

Rotate secret

Returns 200 with the new secret. The old secret stops working immediately, and this response is the only time Scrip shows the new secret. Retrying this call rotates the secret again, even with the same Idempotency-Key.

Archive

Archiving is permanent: queued deliveries fail with error_code: "endpoint_archived", and later reads return 404 webhook_endpoint_not_found.

Recover a delivery

Scrip keeps DELIVERED and FAILED deliveries for 30 days after their last update, then deletes them. PENDING deliveries stay until they finish.

Resend a delivery

Replay any terminal delivery (DELIVERED or FAILED). Resend creates a new PENDING delivery with an incremented resend_seq and leaves the original delivery untouched so you retain full attempt history:

Recover events missed while disabled

  • Queued before disable: Stay PENDING and resume automatically within 30 seconds after you set status to ACTIVE.
  • Occurred while DISABLED: No deliveries were created. Catch up directly via the API from your last processed timestamp:
    • GET /v1/events?created_after=2027-01-15T09:00:00Z&limit=100
    • GET /v1/journal-entries?created_after=2027-01-15T09:00:00Z&limit=100
    • GET /v1/participants/{participant_id}/balances

If a request fails

Delivery guarantees

Webhook events are recorded atomically with the change they report (failed writes emit nothing) and fire at most once per journal entry, redemption state, reversal, fulfillment, event, participant creation, or status/tier change. Delivery is at-least-once: if your handler returns 2xx but the acknowledgment is lost, Scrip may deliver the same event again. Deduplicate using the webhook-id header or envelope id.

Event processing

When events complete or fail, and what to wait for.

Pending redemptions

redemption.pending, redemption.completed, and redemption.failed.

Event payloads

Full data schemas for every webhook event type.