DevelopersWebhooks

Event types

Every Fianto webhook event, when it fires, and an example payload for each.

8 min read

Fianto sends 22 event types, plus endpoint.verification for checking your URL. Every event has the envelope { id, type, timestamp, network, data }; this page shows each one in full. data for each type is defined by the webhooks section of Fianto's OpenAPI document. The ids, amounts and dates below are examples.

Reading the payloads

  • Amounts (amount, fee_amount, network_fee_amount, total_amount, duplicate.amount, period.amount_due, period.fee_due, period.network_fee_due, refunded_amount, refund.amount, refund.applied_amount, dispute.amount, refund_item.amount) are strings in base units of the record's currency, with 6 decimals: "25000000" is 25 USDC, or $25.00 when currency is "USD" (a card payment). The SDK's money.format("25000000", currency) gives "25.00 USDC" or "$25.00". One exception: a transfer.refund_due item of kind sol counts lamports (9 decimals), not USDC. Invoice events use the same base units for subtotal, tax_amount, total, credited_amount, amount, amount_paid and amount_due, in USD, with USDC valued at 1.00 USD.
  • Fees in these examples are placeholders. The fee_amount and fee_due values below are for illustration only; they are not Fianto's fee.
  • Ids carry their type in the prefix: fian_cs_ checkout session, fian_ord_ order, fian_pay_ payment, fian_cus_ customer, fian_sub_ subscription, fian_plan_ on-chain plan, fian_price_ price, fian_inv_ document, fian_xpay_ recorded transfer, fian_ref_ card refund, fian_dsp_ card dispute, fian_tri_ transfer refund item, evt_ event. order_id is your own id.
  • Statuses are UPPERCASE; mode is lowercase. Invoice events use lowercase values throughout.
  • Absent values are null, not missing keys. period and failure appear only on the subscription events that say so. One exception: network_fee_amount (checkout session, order and subscription events) and period.network_fee_due are missing on events created before the network fee existed (October 2026; for order events, before one-time payments carried it), including when such an event is delivered again or read from GET /v1/events. Treat a missing value as "0".
  • Discount codes. Checkout session, order and subscription events carry list_amount, discount_amount and discount (null without a code). They are missing on events created before discount codes (October 2026). See Discount codes.
  • Card or crypto. A payment says how it was paid: gateway solana or stripe, method crypto or card. A card payment has no chain transaction (signature null), no wallet (customer.wallet null), fees of "0" and currency "USD". Branch with method === 'card', then else: events created before card payments (November 2026) have no gateway or method keys, and they are crypto. The card form of an event is shown under Card payments.
  • Keys added in November 2026 are missing on events created before them, delivered again or read from GET /v1/events: an order's or a session's payment.gateway and payment.method, and an order's refund_status and refunded_amount (such an order reads "none" and "0"). A subscription event's gateway, method and card are missing on events created before card subscriptions; such a subscription is crypto, with no card.
  • Card subscriptions. A card subscription sends the same subscription.* events, with method: "card", gateway: "stripe", card ({ brand, last4 }, the newest saved card, either half can be null) and customer.wallet null. Its charge's payment.signature is null. A failed charge's failure.reason can also be CARD_DECLINED, CARD_EXPIRED, CARD_UNUSABLE, AUTHENTICATION_REQUIRED, GATEWAY_ERROR or GATEWAY_UNAVAILABLE. See Card payments.
  • Pay by transfer. A payment the payer made by transfer is a crypto payment like any other: gateway solana, method crypto, with its signature. It has no payer wallet, so customer.wallet is null, and customer.id is set only when the payer gave an email. Money of a transfer that the payer is owed back is sent as transfer.refund_due.
  • customer.id is null until a payment settles. On a session that expired or was cancelled, customer.wallet is the wallet that prepared a transaction on the checkout page, or null when none did. An expired order's customer.id and customer.wallet are null.

What the payer paid

amount is your price. fee_amount is Fianto's service fee, which the payer pays on top when it is above zero. network_fee_amount is the network fee in USDC, which the payer also pays on top: on an order and a payment session, the one fixed when the order's checkout was created ("0" on one from before one-time payments carried it); on a subscription, and on a subscription session, the plan's network fee, taken with every charge. total_amount is amount plus fee_amount plus network_fee_amount: the USDC the payer paid, or pays each period. The Solana network fee, and on a subscribe the account rent, are not in these amounts: Fianto pays them. The fee figures on this page are placeholders, not Fianto's fee; the network fee shown is 0.01 USDC. A card payment has no service fee and no network fee: fee_amount and network_fee_amount are "0", and total_amount equals amount, in US dollars.

Handle every type you do not recognise by answering 2xx: Fianto may add event types later.

Checkout sessions

These three use the same checkout session object. In a subscription session, mode is subscription, interval is set, and subscription names the subscription once it exists.

checkout.session.completed

The session's payment finalized while the session was still OPEN. Sent for payment and subscription sessions; the payer saw success earlier, at confirmed. A payment that finalizes after its session expired or was cancelled does not send it.

{  "id": "evt_227f61d4801bb92e65e33c0bae85b244",  "type": "checkout.session.completed",  "timestamp": "2026-09-28T10:02:14.000Z",  "network": "mainnet",  "data": {    "id": "fian_cs_1K9jcgxlKycOIAfvD0RL2P3PSblw",    "object": "checkout_session",    "mode": "payment",    "status": "COMPLETED",    "order_id": "order_1001",    "amount": "25000000",    "fee_amount": "250000",    "network_fee_amount": "10000",    "total_amount": "25260000",    "currency": "USDC",    "list_amount": "25000000",    "discount": null,    "discount_amount": "0",    "interval": null,    "subscription": null,    "customer": {      "id": "fian_cus_0cJCFTfDw8ZkPLbdr7m2d62PU0SL",      "wallet": "FxLsWPrqTpmc1yHrKoYj8SE75mAzavKwPDen7Y2xF7pw",      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": "fian_pay_5caFRGUqMblmAgHXQ22uKn0hcZSj",      "status": "SUCCEEDED",      "signature": "dbmKAFCAkMz8B2QTsHWkF1GtGVWQkjqXszoGh3XqDsyqsE26ftxJBSAeCpymBVfFGAjA8k6wG52JoKUcwo4nyMN",      "gateway": "solana",      "method": "crypto"    },    "metadata": {      "cart": "c_881"    },    "expires_at": "2026-09-28T10:30:00.000Z",    "created_at": "2026-09-28T10:00:00.000Z",    "completed_at": "2026-09-28T10:02:14.000Z",    "expired_at": null,    "canceled_at": null  }}

checkout.session.expired

No payment was accepted for the session. Fianto's expiry check (every 30 seconds) expired it after expires_at, or a new create for the same order_id replaced the lapsed session, or a payment failed after its USDC reached your wallet, which expires the session at once, before expires_at. A payment in flight keeps a session from expiring. Do not read this event as "the payer kept their money": before you ask the payer to pay again, check the dashboard's Payments chip "Money moved".

{  "id": "evt_c9a125b2741eff78036b22f90bddd07f",  "type": "checkout.session.expired",  "timestamp": "2026-09-28T10:30:21.000Z",  "network": "mainnet",  "data": {    "id": "fian_cs_1K9jcgxlKycOIAfvD0RL2P3PSblw",    "object": "checkout_session",    "mode": "payment",    "status": "EXPIRED",    "order_id": "order_1001",    "amount": "25000000",    "fee_amount": "250000",    "network_fee_amount": "10000",    "total_amount": "25260000",    "currency": "USDC",    "list_amount": "25000000",    "discount": null,    "discount_amount": "0",    "interval": null,    "subscription": null,    "customer": {      "id": null,      "wallet": null,      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": null,      "status": null,      "signature": null,      "gateway": null,      "method": null    },    "metadata": {      "cart": "c_881"    },    "expires_at": "2026-09-28T10:30:00.000Z",    "created_at": "2026-09-28T10:00:00.000Z",    "completed_at": null,    "expired_at": "2026-09-28T10:30:21.000Z",    "canceled_at": null  }}

checkout.session.canceled

You cancelled the session with POST /v1/checkout-sessions/{id}/cancel, or the payer cancelled on the checkout page. Fianto also cancels a subscription session whose link is out of date because your wallet or Fianto's treasury changed since it was created; the payer sees checkout_link_outdated. No order event is sent; in payment mode the order stays PENDING.

{  "id": "evt_32f7ffebb3d612d37358b990889026a1",  "type": "checkout.session.canceled",  "timestamp": "2026-09-28T10:04:09.000Z",  "network": "mainnet",  "data": {    "id": "fian_cs_1K9jcgxlKycOIAfvD0RL2P3PSblw",    "object": "checkout_session",    "mode": "payment",    "status": "CANCELED",    "order_id": "order_1001",    "amount": "25000000",    "fee_amount": "250000",    "network_fee_amount": "10000",    "total_amount": "25260000",    "currency": "USDC",    "list_amount": "25000000",    "discount": null,    "discount_amount": "0",    "interval": null,    "subscription": null,    "customer": {      "id": null,      "wallet": null,      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": null,      "status": null,      "signature": null,      "gateway": null,      "method": null    },    "metadata": {      "cart": "c_881"    },    "expires_at": "2026-09-28T10:30:00.000Z",    "created_at": "2026-09-28T10:00:00.000Z",    "completed_at": null,    "expired_at": null,    "canceled_at": "2026-09-28T10:04:09.000Z"  }}

Orders

Orders exist only for one-time payments (mode: payment).

order.paid

The order's payment finalized: the order is PAID and the payment SUCCEEDED. Fulfil the order here. Also sent when a payment for an expired or cancelled session still finalizes, unless you have opened a newer session for the order since.

{  "id": "evt_25eaf6aa00802f4e758d9dbfb332941a",  "type": "order.paid",  "timestamp": "2026-09-28T10:02:14.000Z",  "network": "mainnet",  "data": {    "id": "fian_ord_4zXwxAivgnEyzWwFpTvsTp16x3OZ",    "object": "order",    "order_id": "order_1001",    "checkout_session_id": "fian_cs_1K9jcgxlKycOIAfvD0RL2P3PSblw",    "status": "PAID",    "amount": "25000000",    "fee_amount": "250000",    "network_fee_amount": "10000",    "total_amount": "25260000",    "currency": "USDC",    "list_amount": "25000000",    "discount": null,    "discount_amount": "0",    "refund_status": "none",    "refunded_amount": "0",    "customer": {      "id": "fian_cus_0cJCFTfDw8ZkPLbdr7m2d62PU0SL",      "wallet": "FxLsWPrqTpmc1yHrKoYj8SE75mAzavKwPDen7Y2xF7pw",      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": "fian_pay_5caFRGUqMblmAgHXQ22uKn0hcZSj",      "signature": "dbmKAFCAkMz8B2QTsHWkF1GtGVWQkjqXszoGh3XqDsyqsE26ftxJBSAeCpymBVfFGAjA8k6wG52JoKUcwo4nyMN",      "gateway": "solana",      "method": "crypto"    },    "metadata": {      "cart": "c_881"    },    "created_at": "2026-09-28T10:00:00.000Z",    "paid_at": "2026-09-28T10:02:14.000Z",    "expired_at": null  }}

Fulfil on order.paid, not earlier

The payer's checkout page shows success at confirmed, before the order is paid. order.paid comes only at finalized. An order that is EXPIRED is not final either: it can still become PAID.

order.expired

Sent with checkout.session.expired when Fianto's expiry check expires the order's session, or when a payment for it failed after its USDC reached your wallet. Not sent when a new create for the same order_id replaced the lapsed session: the order is reopened instead. An EXPIRED order can still become PAID if a late payment finalizes.

{  "id": "evt_a50d09fe1700e019e00a05b9f5287263",  "type": "order.expired",  "timestamp": "2026-09-28T10:30:21.000Z",  "network": "mainnet",  "data": {    "id": "fian_ord_4zXwxAivgnEyzWwFpTvsTp16x3OZ",    "object": "order",    "order_id": "order_1001",    "checkout_session_id": "fian_cs_1K9jcgxlKycOIAfvD0RL2P3PSblw",    "status": "EXPIRED",    "amount": "25000000",    "fee_amount": "250000",    "network_fee_amount": "10000",    "total_amount": "25260000",    "currency": "USDC",    "list_amount": "25000000",    "discount": null,    "discount_amount": "0",    "refund_status": "none",    "refunded_amount": "0",    "customer": {      "id": null,      "wallet": null,      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": null,      "signature": null,      "gateway": null,      "method": null    },    "metadata": {      "cart": "c_881"    },    "created_at": "2026-09-28T10:00:00.000Z",    "paid_at": null,    "expired_at": "2026-09-28T10:30:21.000Z"  }}

order.duplicate_payment

A transfer carrying the session's reference arrived that is not the order's own payment, while the order was already PAID or another payment for it was under way. duplicate names that transfer's signature and amount. Other stray transfers are recorded on the order without a webhook.

{  "id": "evt_977902996383ed2ca3ee2951991d7070",  "type": "order.duplicate_payment",  "timestamp": "2026-09-28T10:06:40.000Z",  "network": "mainnet",  "data": {    "id": "fian_ord_4zXwxAivgnEyzWwFpTvsTp16x3OZ",    "object": "order",    "order_id": "order_1001",    "checkout_session_id": "fian_cs_1K9jcgxlKycOIAfvD0RL2P3PSblw",    "status": "PAID",    "amount": "25000000",    "fee_amount": "250000",    "network_fee_amount": "10000",    "total_amount": "25260000",    "currency": "USDC",    "list_amount": "25000000",    "discount": null,    "discount_amount": "0",    "refund_status": "none",    "refunded_amount": "0",    "customer": {      "id": "fian_cus_0cJCFTfDw8ZkPLbdr7m2d62PU0SL",      "wallet": "FxLsWPrqTpmc1yHrKoYj8SE75mAzavKwPDen7Y2xF7pw",      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": "fian_pay_5caFRGUqMblmAgHXQ22uKn0hcZSj",      "signature": "dbmKAFCAkMz8B2QTsHWkF1GtGVWQkjqXszoGh3XqDsyqsE26ftxJBSAeCpymBVfFGAjA8k6wG52JoKUcwo4nyMN",      "gateway": "solana",      "method": "crypto"    },    "metadata": {      "cart": "c_881"    },    "created_at": "2026-09-28T10:00:00.000Z",    "paid_at": "2026-09-28T10:02:14.000Z",    "expired_at": null,    "duplicate": {      "signature": "yKGVjQGUX1vNVsmDXJEXzWZ6PTJzuybo5Bi7GtVGyu5KQtPqfeBxRam9jZJv4cphmcLHSw14akfnsT9Jov38wn5",      "amount": "25000000"    }  }}

The payer paid twice

A crypto duplicate's USDC is in your wallet: to give it back, send it from your wallet yourself (the v1 API has no refund endpoint). A card duplicate is refunded in full automatically: its duplicate has signature: null and gateway: "stripe".

Payments

payment.refunded and payment.disputed carry the payment, with its gateway, method, card, refund_status and refunded_amount. A refund or a dispute never changes the payment's status: a refunded payment stays SUCCEEDED.

payment.refunded

Each time a payment's refunded_amount moves, and only then, on both rails: a refund succeeded, a refund that had succeeded failed later, a card dispute was lost, or a lost dispute was won late. refund.applied_amount is the move (always more than 0) and refund.status its direction.

{  "id": "evt_5b1e0c7a92d84f36a0e7c4b1d9f2a861",  "type": "payment.refunded",  "timestamp": "2026-11-21T14:30:00.000Z",  "network": "mainnet",  "data": {    "payment": {      "id": "fian_pay_7Qm2LwTzR4eXbN1kC8sVd0aYhPfJ",      "object": "payment",      "status": "SUCCEEDED",      "order_id": "order_1002",      "checkout_session_id": "fian_cs_3TcWq9NxKe7LrB2mZy5VaQ1oPsDf",      "amount": "25000000",      "fee_amount": "0",      "network_fee_amount": "0",      "total_amount": "25000000",      "refund_status": "partial",      "refunded_amount": "10000000",      "created_at": "2026-11-20T09:12:04.000Z",      "succeeded_at": "2026-11-20T09:12:04.000Z",      "failed_at": null,      "gateway": "stripe",      "method": "card",      "currency": "USD",      "card": {        "brand": "visa",        "last4": "4242"      },      "customer": {        "id": "fian_cus_8HrPq2VsXy6ZaWt3LmN4kBc1DeFg",        "wallet": null,        "email": "ada@example.com"      },      "signature": null,      "slot": null,      "block_time": null    },    "refund": {      "id": "fian_ref_4c8e1a0f7b2d49e6a3f05c9d18b7e2a4",      "amount": "10000000",      "applied_amount": "10000000",      "status": "succeeded",      "gateway": "stripe"    }  }}
refund.statusWhat happenedrefunded_amount
succeededA refund succeededgoes up by applied_amount
dispute_lostA card dispute was lost, or a lost dispute's amount went upgoes up by applied_amount
failedA refund that had succeeded failed later (a card one up to 30 days after)goes down by applied_amount
reversedA lost dispute was won late, or its amount went downgoes down by applied_amount
  • refund.id is a card refund's fian_ref_…, a recorded crypto refund's id, or the dispute's fian_dsp_… for dispute_lost and reversed. refund.gateway is stripe or solana.
  • Follow applied_amount, never amount. amount is the refund's or the dispute's own amount on succeeded and dispute_lost, and it can be more than the figure moved.
  • The current figure is GET /v1/payments/{id}. Seed a running total once from it (refunded_amount), then add each event's signed applied_amount, once per event id. A seed is exact only when none of that payment's events was in flight while you read it, so compare your total with GET /v1/payments/{id} to be sure. If your total differs from refunded_amount while none of that payment's events is in flight, re-seed it from GET /v1/payments/{id}.
  • Sum by event id, never pair by refund.id. One card refund can be two succeeded events with the same refund.id; count both.
  • Never undo a dispute_lost when its reversed arrives. A refund that succeeds or fails while a lost dispute already covers that money moves nothing and sends nothing; the dispute's later reversed carries it, so a reversed need not equal the dispute_lost.
  • Never line events up by timestamp. It is when Fianto wrote the event, before the change committed, and events can arrive late, twice or out of order.

The SDK's refundDelta(event.data) returns the signed move. See Card payments.

payment.disputed

A card payment's cardholder opened a dispute, and each time the dispute's status changes: needs_response, under_review, won, lost, accepted (the merchant accepted it, so it counts as lost) or closed (an inquiry closed without a chargeback, or prevented). Card payments only.

{  "id": "evt_9e3d7b1c5a0f42e8b6d1c3a7f9e0b254",  "type": "payment.disputed",  "timestamp": "2026-11-25T08:00:00.000Z",  "network": "mainnet",  "data": {    "payment": {      "id": "fian_pay_2DkLs8QwRt5YuIo3PaZx9CvBnM1E",      "object": "payment",      "status": "SUCCEEDED",      "order_id": "order_1003",      "checkout_session_id": "fian_cs_6YhGt2FrDe8WsQa1ZxCv4BnMk9Lj",      "amount": "25000000",      "fee_amount": "0",      "network_fee_amount": "0",      "total_amount": "25000000",      "refund_status": "none",      "refunded_amount": "0",      "created_at": "2026-11-20T09:12:04.000Z",      "succeeded_at": "2026-11-20T09:12:04.000Z",      "failed_at": null,      "gateway": "stripe",      "method": "card",      "currency": "USD",      "card": {        "brand": "visa",        "last4": "4242"      },      "customer": {        "id": "fian_cus_8HrPq2VsXy6ZaWt3LmN4kBc1DeFg",        "wallet": null,        "email": "ada@example.com"      },      "signature": null,      "slot": null,      "block_time": null    },    "dispute": {      "id": "fian_dsp_0a7f3c9e1b5d42a8c6e0f2b4d8a1c3e5",      "status": "needs_response",      "amount": "25000000",      "due_by": "2026-12-09T23:59:59.000Z"    }  }}

When it moves refunded_amount, a lost dispute also sends payment.refunded with dispute_lost, and a late win sends it with reversed. Disputes are answered in the dashboard: the v1 API has no endpoint for disputes.

Subscriptions

The seven subscription events share one subscription object. interval is MONTH (every 30 days, period_hours: 720) or YEAR (every 365 days). A crypto subscription's customer.wallet is always set. A subscription event created before November 2026 has no gateway, method or card keys; such a subscription is crypto, with no card.

subscription.created

The subscribe transaction finalized, or for a card subscription the first card charge succeeded. The subscription starts ACTIVE with its first period already paid: period describes that period and payment is the subscribe payment. The session also sends checkout.session.completed if it was still OPEN.

{  "id": "evt_83ec8108fd794c1da842ba575bf48e61",  "type": "subscription.created",  "timestamp": "2026-09-28T10:00:31.000Z",  "network": "mainnet",  "data": {    "id": "fian_sub_1543enRaYWeBHUQnvfZU4M4He6NO",    "object": "subscription",    "status": "ACTIVE",    "order_id": "sub_user_42_pro",    "price_id": "fian_price_2NCT7hYJqQnFadrhpQLHC50tjj6Z",    "product_name": "Pro plan",    "interval": "MONTH",    "period_hours": 720,    "current_period_index": 0,    "current_period_start": "2026-09-28T10:00:00.000Z",    "current_period_end": "2026-10-28T10:00:00.000Z",    "cancel_at_period_end": false,    "cancel_at": null,    "cancel_reason": null,    "merchant_cancel_requested": false,    "end_reason": null,    "started_at": "2026-09-28T10:00:00.000Z",    "ended_at": null,    "created_at": "2026-09-28T10:00:00.000Z",    "metadata": {      "plan": "pro"    },    "amount": "10000000",    "fee_amount": "100000",    "network_fee_amount": "10000",    "total_amount": "10110000",    "currency": "USDC",    "list_amount": "10000000",    "discount": null,    "discount_amount": "0",    "gateway": "solana",    "method": "crypto",    "card": null,    "plan_id": "fian_plan_1vRG2vTS0AW2RvlHnpHoAm3CMuqn",    "customer": {      "id": "fian_cus_0cJCFTfDw8ZkPLbdr7m2d62PU0SL",      "wallet": "FxLsWPrqTpmc1yHrKoYj8SE75mAzavKwPDen7Y2xF7pw",      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": "fian_pay_1julpAQPFgoyXMFPOySxNG1gfJ6b",      "status": "SUCCEEDED",      "signature": "237o8YbZpUMvK9tEQyGU894yJB1fprp4ETw2zqoZ2fMHw5MR5fFRodksYz7bmuMpdw6WWNgArzEAHmeP9WP6cRV6"    },    "period": {      "index": 0,      "start": "2026-09-28T10:00:00.000Z",      "end": "2026-10-28T10:00:00.000Z",      "amount_due": "10000000",      "fee_due": "100000",      "network_fee_due": "10000",      "status": "PAID"    }  }}

subscription.renewed

A renewal charge finalized. period is the period it paid and payment is that charge. A PAST_DUE subscription is ACTIVE again.

{  "id": "evt_e26bb0554992eb494bec6ac8674decfb",  "type": "subscription.renewed",  "timestamp": "2026-10-28T10:02:40.000Z",  "network": "mainnet",  "data": {    "id": "fian_sub_1543enRaYWeBHUQnvfZU4M4He6NO",    "object": "subscription",    "status": "ACTIVE",    "order_id": "sub_user_42_pro",    "price_id": "fian_price_2NCT7hYJqQnFadrhpQLHC50tjj6Z",    "product_name": "Pro plan",    "interval": "MONTH",    "period_hours": 720,    "current_period_index": 1,    "current_period_start": "2026-10-28T10:00:00.000Z",    "current_period_end": "2026-11-27T10:00:00.000Z",    "cancel_at_period_end": false,    "cancel_at": null,    "cancel_reason": null,    "merchant_cancel_requested": false,    "end_reason": null,    "started_at": "2026-09-28T10:00:00.000Z",    "ended_at": null,    "created_at": "2026-09-28T10:00:00.000Z",    "metadata": {      "plan": "pro"    },    "amount": "10000000",    "fee_amount": "100000",    "network_fee_amount": "10000",    "total_amount": "10110000",    "currency": "USDC",    "list_amount": "10000000",    "discount": null,    "discount_amount": "0",    "gateway": "solana",    "method": "crypto",    "card": null,    "plan_id": "fian_plan_1vRG2vTS0AW2RvlHnpHoAm3CMuqn",    "customer": {      "id": "fian_cus_0cJCFTfDw8ZkPLbdr7m2d62PU0SL",      "wallet": "FxLsWPrqTpmc1yHrKoYj8SE75mAzavKwPDen7Y2xF7pw",      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": "fian_pay_6jsJFde77WW4tOHiaJG7UJ3yTiEY",      "status": "SUCCEEDED",      "signature": "3eEw7VXVXdLLjXGCDoe2TzjSr6N7C5gYPFpyVGdB5HxTvUxBEia3nfTERAB8cLwjW24yC6k4tcKC63paf8YMK5sH"    },    "period": {      "index": 1,      "start": "2026-10-28T10:00:00.000Z",      "end": "2026-11-27T10:00:00.000Z",      "amount_due": "10000000",      "fee_due": "100000",      "network_fee_due": "10000",      "status": "PAID"    }  }}

subscription.payment_failed

Sent on every counted renewal failure: INSUFFICIENT_FUNDS, DELEGATION_REVOKED, ACCOUNT_FROZEN or ACCOUNT_CLOSED, and for a card subscription CARD_DECLINED, CARD_EXPIRED, CARD_UNUSABLE or AUTHENTICATION_REQUIRED. failure gives the reason, how many counted failures the period has had, and the next attempt (null when none is left). payment is the failed charge, or all null when the failure was found before anything was sent.

{  "id": "evt_61d60a317212139638347d537f9485b3",  "type": "subscription.payment_failed",  "timestamp": "2026-10-28T10:02:05.000Z",  "network": "mainnet",  "data": {    "id": "fian_sub_1543enRaYWeBHUQnvfZU4M4He6NO",    "object": "subscription",    "status": "PAST_DUE",    "order_id": "sub_user_42_pro",    "price_id": "fian_price_2NCT7hYJqQnFadrhpQLHC50tjj6Z",    "product_name": "Pro plan",    "interval": "MONTH",    "period_hours": 720,    "current_period_index": 0,    "current_period_start": "2026-09-28T10:00:00.000Z",    "current_period_end": "2026-10-28T10:00:00.000Z",    "cancel_at_period_end": false,    "cancel_at": null,    "cancel_reason": null,    "merchant_cancel_requested": false,    "end_reason": null,    "started_at": "2026-09-28T10:00:00.000Z",    "ended_at": null,    "created_at": "2026-09-28T10:00:00.000Z",    "metadata": {      "plan": "pro"    },    "amount": "10000000",    "fee_amount": "100000",    "network_fee_amount": "10000",    "total_amount": "10110000",    "currency": "USDC",    "list_amount": "10000000",    "discount": null,    "discount_amount": "0",    "gateway": "solana",    "method": "crypto",    "card": null,    "plan_id": "fian_plan_1vRG2vTS0AW2RvlHnpHoAm3CMuqn",    "customer": {      "id": "fian_cus_0cJCFTfDw8ZkPLbdr7m2d62PU0SL",      "wallet": "FxLsWPrqTpmc1yHrKoYj8SE75mAzavKwPDen7Y2xF7pw",      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": null,      "signature": null,      "status": null    },    "failure": {      "reason": "INSUFFICIENT_FUNDS",      "attempt_no": 1,      "next_attempt_at": "2026-10-28T11:00:00.000Z"    }  }}

subscription.past_due

The first counted failure while the subscription was ACTIVE, with attempts left: it is now PAST_DUE. Sent once, alongside subscription.payment_failed, with the same failure. Fianto keeps retrying; a successful renewal makes it ACTIVE again.

{  "id": "evt_0cdbd8eaea8b6f9c6f0e69d846353b14",  "type": "subscription.past_due",  "timestamp": "2026-10-28T10:02:05.000Z",  "network": "mainnet",  "data": {    "id": "fian_sub_1543enRaYWeBHUQnvfZU4M4He6NO",    "object": "subscription",    "status": "PAST_DUE",    "order_id": "sub_user_42_pro",    "price_id": "fian_price_2NCT7hYJqQnFadrhpQLHC50tjj6Z",    "product_name": "Pro plan",    "interval": "MONTH",    "period_hours": 720,    "current_period_index": 0,    "current_period_start": "2026-09-28T10:00:00.000Z",    "current_period_end": "2026-10-28T10:00:00.000Z",    "cancel_at_period_end": false,    "cancel_at": null,    "cancel_reason": null,    "merchant_cancel_requested": false,    "end_reason": null,    "started_at": "2026-09-28T10:00:00.000Z",    "ended_at": null,    "created_at": "2026-09-28T10:00:00.000Z",    "metadata": {      "plan": "pro"    },    "amount": "10000000",    "fee_amount": "100000",    "network_fee_amount": "10000",    "total_amount": "10110000",    "currency": "USDC",    "list_amount": "10000000",    "discount": null,    "discount_amount": "0",    "gateway": "solana",    "method": "crypto",    "card": null,    "plan_id": "fian_plan_1vRG2vTS0AW2RvlHnpHoAm3CMuqn",    "customer": {      "id": "fian_cus_0cJCFTfDw8ZkPLbdr7m2d62PU0SL",      "wallet": "FxLsWPrqTpmc1yHrKoYj8SE75mAzavKwPDen7Y2xF7pw",      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": null,      "signature": null,      "status": null    },    "failure": {      "reason": "INSUFFICIENT_FUNDS",      "attempt_no": 1,      "next_attempt_at": "2026-10-28T11:00:00.000Z"    }  }}

Renewals charge the payer's wallet

Each renewal pulls your price and, when they are above zero, the service fee and the network fee from the payer's wallet. Fianto does not charge missed periods later.

subscription.cancel_scheduled

A cancellation was scheduled for the period end: you cancelled with at: period_end, or you ended the subscription's price (its plan) in the dashboard (both cancel_reason MERCHANT_CANCELED), or the payer cancelled from the portal or on Solana (PAYER_CANCELED; a cancel made outside the portal is picked up within about 5 minutes). Also sent when the payer resumes while your own period-end cancel stands, which becomes MERCHANT_CANCELED. Not sent again while a cancel is already scheduled.

{  "id": "evt_66c9ac2cde6346a19e1d5683c17686bc",  "type": "subscription.cancel_scheduled",  "timestamp": "2026-10-03T16:20:11.000Z",  "network": "mainnet",  "data": {    "id": "fian_sub_1543enRaYWeBHUQnvfZU4M4He6NO",    "object": "subscription",    "status": "ACTIVE",    "order_id": "sub_user_42_pro",    "price_id": "fian_price_2NCT7hYJqQnFadrhpQLHC50tjj6Z",    "product_name": "Pro plan",    "interval": "MONTH",    "period_hours": 720,    "current_period_index": 0,    "current_period_start": "2026-09-28T10:00:00.000Z",    "current_period_end": "2026-10-28T10:00:00.000Z",    "cancel_at_period_end": true,    "cancel_at": "2026-10-28T10:00:00.000Z",    "cancel_reason": "PAYER_CANCELED",    "merchant_cancel_requested": false,    "end_reason": null,    "started_at": "2026-09-28T10:00:00.000Z",    "ended_at": null,    "created_at": "2026-09-28T10:00:00.000Z",    "metadata": {      "plan": "pro"    },    "amount": "10000000",    "fee_amount": "100000",    "network_fee_amount": "10000",    "total_amount": "10110000",    "currency": "USDC",    "list_amount": "10000000",    "discount": null,    "discount_amount": "0",    "gateway": "solana",    "method": "crypto",    "card": null,    "plan_id": "fian_plan_1vRG2vTS0AW2RvlHnpHoAm3CMuqn",    "customer": {      "id": "fian_cus_0cJCFTfDw8ZkPLbdr7m2d62PU0SL",      "wallet": "FxLsWPrqTpmc1yHrKoYj8SE75mAzavKwPDen7Y2xF7pw",      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": null,      "signature": null,      "status": null    }  }}

subscription.cancel_withdrawn

The payer resumed their cancelled subscription from another app that supports it. Fianto sees the resume only when the cancellation would have taken effect, at the period end, and sends this instead of subscription.ended: the scheduled cancel is cleared and renewals resume. If you had also cancelled at period end, you get subscription.cancel_scheduled instead.

{  "id": "evt_1722c3105cbff3124326ad46b28deb67",  "type": "subscription.cancel_withdrawn",  "timestamp": "2026-10-28T10:00:40.000Z",  "network": "mainnet",  "data": {    "id": "fian_sub_1543enRaYWeBHUQnvfZU4M4He6NO",    "object": "subscription",    "status": "ACTIVE",    "order_id": "sub_user_42_pro",    "price_id": "fian_price_2NCT7hYJqQnFadrhpQLHC50tjj6Z",    "product_name": "Pro plan",    "interval": "MONTH",    "period_hours": 720,    "current_period_index": 0,    "current_period_start": "2026-09-28T10:00:00.000Z",    "current_period_end": "2026-10-28T10:00:00.000Z",    "cancel_at_period_end": false,    "cancel_at": null,    "cancel_reason": null,    "merchant_cancel_requested": false,    "end_reason": null,    "started_at": "2026-09-28T10:00:00.000Z",    "ended_at": null,    "created_at": "2026-09-28T10:00:00.000Z",    "metadata": {      "plan": "pro"    },    "amount": "10000000",    "fee_amount": "100000",    "network_fee_amount": "10000",    "total_amount": "10110000",    "currency": "USDC",    "list_amount": "10000000",    "discount": null,    "discount_amount": "0",    "gateway": "solana",    "method": "crypto",    "card": null,    "plan_id": "fian_plan_1vRG2vTS0AW2RvlHnpHoAm3CMuqn",    "customer": {      "id": "fian_cus_0cJCFTfDw8ZkPLbdr7m2d62PU0SL",      "wallet": "FxLsWPrqTpmc1yHrKoYj8SE75mAzavKwPDen7Y2xF7pw",      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": null,      "signature": null,      "status": null    }  }}

subscription.ended

The subscription is ENDED. end_reason says why: MERCHANT_CANCELED (you cancelled with at: now, or your period-end cancel, or the cancel from ending its price, took effect), PAYER_CANCELED (the payer's cancel took effect, or the payer's new subscription from the same wallet replaced this one) or PAYMENT_FAILED (the 4th counted failure, sent with failure). A scheduled cancel waits for a renewal charge that is in flight.

{  "id": "evt_d7049bfb68672e6f9949344f1230dff7",  "type": "subscription.ended",  "timestamp": "2026-10-12T09:15:00.000Z",  "network": "mainnet",  "data": {    "id": "fian_sub_1543enRaYWeBHUQnvfZU4M4He6NO",    "object": "subscription",    "status": "ENDED",    "order_id": "sub_user_42_pro",    "price_id": "fian_price_2NCT7hYJqQnFadrhpQLHC50tjj6Z",    "product_name": "Pro plan",    "interval": "MONTH",    "period_hours": 720,    "current_period_index": 0,    "current_period_start": "2026-09-28T10:00:00.000Z",    "current_period_end": "2026-10-28T10:00:00.000Z",    "cancel_at_period_end": false,    "cancel_at": null,    "cancel_reason": null,    "merchant_cancel_requested": false,    "end_reason": "MERCHANT_CANCELED",    "started_at": "2026-09-28T10:00:00.000Z",    "ended_at": "2026-10-12T09:15:00.000Z",    "created_at": "2026-09-28T10:00:00.000Z",    "metadata": {      "plan": "pro"    },    "amount": "10000000",    "fee_amount": "100000",    "network_fee_amount": "10000",    "total_amount": "10110000",    "currency": "USDC",    "list_amount": "10000000",    "discount": null,    "discount_amount": "0",    "gateway": "solana",    "method": "crypto",    "card": null,    "plan_id": "fian_plan_1vRG2vTS0AW2RvlHnpHoAm3CMuqn",    "customer": {      "id": "fian_cus_0cJCFTfDw8ZkPLbdr7m2d62PU0SL",      "wallet": "FxLsWPrqTpmc1yHrKoYj8SE75mAzavKwPDen7Y2xF7pw",      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": null,      "signature": null,      "status": null    }  }}

A cancel from you changes nothing on Solana

When you cancel, the payer's subscription stays live on Solana, and a charge already in flight can still land after subscription.ended. Cancelling refunds nothing and cannot be undone.

Invoices

These five events follow the documents Fianto makes in the merchant's name; see Invoices and receipts. They go to the endpoint of the application the document belongs to: yours for the document of a payment made through your application, the Shop application's for a document the merchant wrote in the dashboard. All but invoice.payment_recorded carry the document object. It never holds the buyer's company name, address, tax ID or company number. total is the merchant's price: the service fee and the network fee are not part of it.

invoice.issued

A document was issued: the invoice or payment receipt of a payment (one-time, subscription or renewal), an invoice or payment request the merchant finalized (status open), a replacement invoice after company details were added (replaces names the old one), a paid payment request's own receipt, or a document for a transfer the merchant recorded. A receipt has number null.

{  "id": "evt_5d0c8a3e91f24b7a8c6e2d4f1a9b3c70",  "type": "invoice.issued",  "timestamp": "2026-09-28T10:02:20.000Z",  "network": "mainnet",  "data": {    "id": "fian_inv_3hQm7Rk2XbV9cTnL4pWs8d",    "object": "invoice",    "number": "INV-0042",    "kind": "invoice",    "document_type": "invoice",    "status": "paid",    "source": "checkout",    "issue_date": "2026-09-28",    "due_date": null,    "currency": "USD",    "subtotal": "20830000",    "tax_amount": "4170000",    "total": "25000000",    "credited_amount": "0",    "customer": {      "id": "fian_cus_0cJCFTfDw8ZkPLbdr7m2d62PU0SL",      "wallet": "FxLsWPrqTpmc1yHrKoYj8SE75mAzavKwPDen7Y2xF7pw",      "email": "ada@example.com",      "reference": "user_42"    },    "payment": {      "id": "fian_pay_5caFRGUqMblmAgHXQ22uKn0hcZSj",      "signature": "dbmKAFCAkMz8B2QTsHWkF1GtGVWQkjqXszoGh3XqDsyqsE26ftxJBSAeCpymBVfFGAjA8k6wG52JoKUcwo4nyMN"    },    "order_id": "order_1001",    "subscription_id": null,    "replaces": null,    "credits": null,    "created_at": "2026-09-28T10:02:20.000Z",    "network": "mainnet"  }}

invoice.paid

An invoice or payment request the merchant wrote is now paid: its payment through the link finalized, or transfers the merchant recorded cover it. For a payment request, its payment also gets its own receipt, sent as invoice.issued. A payment that lands on a voided document sends no event.

{  "id": "evt_8b41e6f20c9d4a5fb3e7a1c2d8f60e19",  "type": "invoice.paid",  "timestamp": "2026-10-03T14:11:52.000Z",  "network": "mainnet",  "data": {    "id": "fian_inv_7Ws2pLx9QeR4nTb6KdYc1m",    "object": "invoice",    "number": "INV-0043",    "kind": "invoice",    "document_type": "invoice",    "status": "paid",    "source": "manual",    "issue_date": "2026-10-01",    "due_date": "2026-10-15",    "currency": "USD",    "subtotal": "400000000",    "tax_amount": "80000000",    "total": "480000000",    "credited_amount": "0",    "customer": {      "id": "fian_cus_7VhJ2mQx8LcRt4NzWp1KdS6yFb3E",      "wallet": "9kTqZ3rVn8WcHx2LmP5sYd7JfB4gQa6eRt1uNo8iKc2M",      "email": "billing@example.com",      "reference": null    },    "payment": {      "id": "fian_pay_2RtYb8KxQm4VnL7cWp3HdJ9sZf6A",      "signature": "4hNq8vTzWk2RmYc6JpLx9FbG3dSa7EuQ1tKo5iMn2PcVr8XwHy6Bj4LsDf9Ag3Qe7Zt2Uk5Nm8Rv1Wc6Yp4Tx"    },    "order_id": null,    "subscription_id": null,    "replaces": null,    "credits": null,    "created_at": "2026-10-01T09:30:05.000Z",    "network": "mainnet"  }}

invoice.payment_recorded

A transfer the merchant recorded (external_payment_id, fian_xpay_…) was applied to an invoice or payment request. amount is that transfer, amount_paid what the document has received so far, and amount_due what is still open ("0" once it is paid). When the transfer makes the document paid, invoice.paid follows. This payload is not the document object.

{  "id": "evt_2f6a9c1d7e3b48c0a5d9e8f1b2c4a6d3",  "type": "invoice.payment_recorded",  "timestamp": "2026-10-05T08:40:17.000Z",  "network": "mainnet",  "data": {    "id": "fian_inv_7Ws2pLx9QeR4nTb6KdYc1m",    "number": "INV-0043",    "external_payment_id": "fian_xpay_6Gk1Tr8Qn3VbXw5Lp2HsZc",    "amount": "200000000",    "amount_paid": "200000000",    "amount_due": "280000000",    "signature": "5LmQ2xTp8VnWc4RyHk7JdB3sZf9Ga6EuKt1Mo8iNr2PcYv5XwBj7Ls4Df3Ag9Qe6Zt2Uk8Nm1Rv5Wc3Yp7Tx4Hq",    "network": "mainnet"  }}

invoice.voided

The merchant voided an open invoice or payment request in the dashboard. An invoice's credit note is sent first, as credit_note.issued; a payment request gets none. Its link stops taking payments.

{  "id": "evt_c37e0b9a5d1f46e2b8a4c6d9e0f1a2b5",  "type": "invoice.voided",  "timestamp": "2026-10-06T16:05:44.000Z",  "network": "mainnet",  "data": {    "id": "fian_inv_1Zr8Nc4KpT6wQy2Vm9XhLs",    "object": "invoice",    "number": "INV-0044",    "kind": "invoice",    "document_type": "invoice",    "status": "void",    "source": "manual",    "issue_date": "2026-10-02",    "due_date": "2026-10-16",    "currency": "USD",    "subtotal": "150000000",    "tax_amount": "0",    "total": "150000000",    "credited_amount": "150000000",    "customer": {      "id": null,      "wallet": null,      "email": "billing@example.com",      "reference": null    },    "payment": {      "id": null,      "signature": null    },    "order_id": null,    "subscription_id": null,    "replaces": null,    "credits": null,    "created_at": "2026-10-02T11:20:00.000Z",    "network": "mainnet"  }}

credit_note.issued

A credit note was issued against an invoice: in full when the merchant voided it or when company details were added (then invoice.issued follows for the replacement), or for the amount of a refund once Fianto found it on Solana, or of a card refund that succeeded. object and kind are credit_note, status is issued, credits names the invoice, and payment is null.

{  "id": "evt_e91d4c7b2a0f4835b6c8d1e3f5a7b9c2",  "type": "credit_note.issued",  "timestamp": "2026-10-06T16:05:44.000Z",  "network": "mainnet",  "data": {    "id": "fian_inv_4Bq9Hs2LxV7mTc5Nw8RkPd",    "object": "credit_note",    "number": "CN-0004",    "kind": "credit_note",    "document_type": "invoice",    "status": "issued",    "source": "manual",    "issue_date": "2026-10-06",    "due_date": null,    "currency": "USD",    "subtotal": "150000000",    "tax_amount": "0",    "total": "150000000",    "credited_amount": "0",    "customer": {      "id": null,      "wallet": null,      "email": "billing@example.com",      "reference": null    },    "payment": {      "id": null,      "signature": null    },    "order_id": null,    "subscription_id": null,    "replaces": null,    "credits": "fian_inv_1Zr8Nc4KpT6wQy2Vm9XhLs",    "created_at": "2026-10-06T16:05:44.000Z",    "network": "mainnet"  }}

Transfers

Pay by transfer is offered on one-time payment sessions whose payment_methods include crypto. When money of a transfer reaches your wallet that the payer is owed back, Fianto records a refund item and sends this event for it. It goes to the endpoint of the application the checkout session belongs to.

transfer.refund_due

A refund item was released to you: sent exactly once per item, never again for the same item (a redelivery re-sends the same event id). kind says why the payer is owed money: overpaid (more than the total arrived), short (the window ended before the total arrived: nothing was paid), late (money arrived after the window), duplicate (the order was paid another way) or sol (SOL was sent). An item held for screening sends nothing until it is released, then sends this event.

{  "id": "evt_4a7c1e9b3d5f40a2b8c6e0d2f4a6b8c1",  "type": "transfer.refund_due",  "timestamp": "2026-12-02T09:41:07.000Z",  "network": "mainnet",  "data": {    "refund_item": {      "id": "fian_tri_9d2b7e4a1c6f48e0b3a5d7c9e1f2a4b6",      "kind": "overpaid",      "amount": "2000000",      "created_at": "2026-12-02T09:41:07.000Z"    },    "checkout_session_id": "fian_cs_1K9jcgxlKycOIAfvD0RL2P3PSblw",    "order_id": "order_1001",    "payer_email": "ada@example.com"  }}
  • order_id is your own order id, the one you gave when you created the checkout session.
  • payer_email is there only when the payer gave an email; otherwise the key is missing.
  • refund_item.amount is in USDC base units ("2000000" is 2 USDC), except for kind: "sol", where it is in lamports (9 decimals). The payload has no currency: read the unit from kind. The SDK's usdc.format fits a USDC item; the SDK has no SOL formatter.
  • One event per item. Record each refund_item.id you have handled and skip ids you have already seen.
  • In the SDK, onTransferRefundDue is this event's typed callback from @fianto/sdk 0.8.0. With 0.7.0 the event still reaches onEvent.

You refund the payer

Fianto does not send this money back: you refund the payer yourself. The event tells you who and how much; the v1 API has no refund endpoint.

Testing and verification

test.event

You asked for a test delivery: POST /v1/webhook/test-event, npx @fianto/cli trigger test.event, or the dashboard's Send test event button (10 per hour per application, shared). It needs a verified URL; otherwise the request fails with 409 webhook_endpoint_not_active and no event is kept. It carries no business data.

{  "id": "evt_95fc71f3d3e580b81e4eda0132024f74",  "type": "test.event",  "timestamp": "2026-09-28T09:58:00.000Z",  "network": "mainnet",  "data": {    "message": "This is a test event from Fianto."  }}

endpoint.verification

You set a webhook URL or clicked Verify again. Signed like every delivery, but the body has no id. Answer within 5 seconds with HTTP 200 and {"challenge": "<the value you received>"}. The SDK handlers answer it for you.

{  "type": "endpoint.verification",  "timestamp": "2026-09-28T09:55:00.000Z",  "network": "mainnet",  "data": {    "challenge": "MDmHk3jIHMLD8hMUILAlz9cKk5ZkF5BKKsek3kOD6j4"  }}

See also

Was this page helpful? Tell us

fianto.xyz

On this page