Webhook Events
This page catalogs webhook event types, payload shapes, and delivery behavior. For registration, headers, and security, start with Webhooks. For HMAC verification steps, see Webhook Signature Verification.
Envelope format
Every delivered webhook uses the same top-level structure:
Code
Fluxis signs the entire parsed JSON body (the object containing data), not the inner data object alone and not raw request bytes. Optional fields omitted from the payload (Go omitempty) affect the signature—always verify against the JSON you actually received.
Delivery headers
| Header | Description |
|---|---|
X-Request-Signature | Hex-encoded HMAC-SHA256 |
X-Request-Timestamp | Unix timestamp (seconds) |
Content-Type | application/json |
Reject requests older than 300 seconds. See the signature verification guide for the full algorithm.
Event types
Webhooks are registered per account via POST /v1/account/{accountID}/webhook. Each webhook lists the event types it receives in event_types, and receives only those. Choose them on create, change them with PUT /v1/account/{accountID}/webhook/{webhookID}/event-types, or edit them in the dashboard under Developers → Webhooks. See Webhooks.
| Event type | notification_type in payload | Delivery status |
|---|---|---|
payment_request | payment_request_status_update | Active |
subscription | subscription_invoice_settled, subscription_updated, subscription_paused, subscription_resumed, subscription_cancelled, subscription_expired | Alpha — accounts enabled for subscriptions |
One event type can carry several notices, so always switch on data.notification_type and ignore the ones you do not handle.
Webhooks created before event types could be chosen receive every type. Edit their event_types to narrow what they receive.
payment_request events
Delivered to webhooks whose event_types include payment_request.
When they fire
Fluxis sends a webhook when the payment request status changes to:
| Status | Trigger |
|---|---|
processing | On-chain deposit detected; finality check queued |
completed | Full payment received |
underpaid | Payment received but below requested amount |
overpaid | Payment received above requested amount |
Statuses such as pending, created, expired, failed, and confirmed do not trigger payment_request webhooks today.
Payload fields
Code
| Field | Description |
|---|---|
notification_type | Always payment_request_status_update |
payment_request_id | Fluxis payment request UUID |
payment_request_type | fixed, dynamic, pre_loaded, or open |
external_reference_id | Your order reference (optional; omitted when unset) |
status | Current payment request status |
point_of_sale_id | POS that created the payment request |
account_id | Owning account (optional; omitted when unset) |
Integration guidance
- Treat
processingas "payment detected" — wait for a terminal status before fulfilling goods - Handle
underpaidandoverpaidper your POS configuration - Use
external_reference_idto map events back to your order system
Subscription events
Sent for subscriptions in alpha, to accounts enabled for them. Delivered to webhooks whose event_types include subscription. See Subscriptions.
Every subscription notice starts with the same fields:
| Field | Description |
|---|---|
notification_type | Which notice this is, from the sections below |
notice_id | Unique per notice and the same on a repeated delivery. The key to deduplicate on |
subscription_id | The subscription the notice is about |
point_of_sale_id, account_id | Where the subscription was created |
collection_method | email_invoice or wallet_mandate |
subscription_status | The subscription right after the change: active, paused or cancelled |
Timestamps are unix seconds. Amounts are decimal strings.
subscription_invoice_settled
Sent once a payer's payment for an invoice is applied, normally within a minute of the payment being confirmed. It tells you both that the money arrived and what it did to the subscription.
Code
| Field | Description |
|---|---|
payment_request_id | The invoice that was paid. The same id the payment_request notices carry for this payment |
period_index | Which period was paid. 0 is the first invoice |
amount, asset | What the invoice billed, as a decimal string and a unique asset id. The payer may have chosen another token the point of sale accepts; look up payment_request_id to see what was paid |
activated | true when this was the first invoice, which is what activates the subscription |
next_charge_at | When the next invoice falls due. Omitted when no further invoice will be issued |
settled_at | When Fluxis applied the payment |
A payment applied while the subscription is paused is notified the same way, with subscription_status: "paused". A payment that arrives after the subscription was cancelled is not: that money is recorded but never reactivates the subscription; contact Fluxis to resolve it.
subscription_updated
Sent when you change a subscription's terms, or withdraw a change that was waiting. It is sent when you make the change, not when it takes effect.
Code
| Field | Description |
|---|---|
previous_terms | What the invoice at effective_period_index would have billed: a change already waiting, or the terms in force |
new_terms | What it will bill instead. When these are the terms already in force, a waiting change was withdrawn |
effective_period_index, effective_at | The first invoice the change applies to, and when it falls due |
updated_at | When you made the change |
subscription_paused
Sent when you pause a subscription. subscription_status is paused.
Code
subscription_resumed
Sent when you resume a paused subscription. next_charge_at is when the next new invoice falls due; periods that fell inside the pause are not billed.
Code
subscription_cancelled
Sent when billing stops, whoever stopped it.
Code
| Field | Description |
|---|---|
period_index | The first period that will not be billed. 0 when cancelled before the first invoice was paid |
cancellation_reason | The same value the subscription returns, such as merchant_cancelled or invoice_unpaid |
cancelled_by | Who stopped billing: merchant when you cancelled, system when a period ran out unpaid |
cancelled_at | When the subscription was cancelled |
subscription_expired
Sent when the first invoice was never paid before expires_at, so nothing was agreed. Separate from a cancellation so you can tell a customer who never started from one who left. The subscription reads status: cancelled with cancellation_reason: expired.
Code
Delivery
- Within about a minute of the change.
- At least once. The same notice can arrive twice. Deduplicate on
notice_id. - Not always in order. A pause and a resume made a minute apart can arrive resume first. Order notices by their own timestamps (
paused_at,resumed_at,updated_at), or read the subscription withGET /v1/subscriptions/{id}. - One attempt per webhook, no retry. If your endpoint was down, read the subscription.
- No payer email. Notices never carry the payer's email or other personal data; the subscription id leads to everything else.
- Payment notices too. Each invoice is a payment request, so a webhook that also receives
payment_requestgetspayment_request_status_updatefor it too.
Testing webhooks
Send a signed test payload to your endpoint:
Code
Without a body, the test sends a sample of the webhook's first event type. To pick another of its types, send:
Code
An event type the webhook does not receive is rejected with HTTP 400. The samples are:
| Event type | Sample | How to tell it is a test |
|---|---|---|
payment_request | payment_request_status_update | status is pending, which no real notice carries |
subscription | subscription_invoice_settled | data.test is true |
Ids in a sample are random and match nothing in your account. Verify the sample with the same algorithm as production events—see Webhook Signature Verification. The test fails with an error when your endpoint does not answer HTTP 200.
Status → webhook matrix
| Payment request status | Webhook sent? |
|---|---|
pending | No |
created | No |
processing | Yes |
completed | Yes |
underpaid | Yes |
overpaid | Yes |
confirmed | No |
expired | No |
failed | No |
Related documentation
- Webhooks — registration, secrets, best practices
- Webhook Signature Verification — HMAC-SHA256 verification
- Payment Requests — full status lifecycle