Grant and revoke access from webhooks.
Fianto sends your server a signed event for every payment and subscription change, with your own order ID. Verify the signature, record the event once, and change the customer's access from it. When in doubt, the Solana transaction is the record that counts.
The events that change access
| Event | Means | Typical action |
|---|---|---|
order. | A one-off payment settled | Fulfil the order or add credits |
subscription. | The first period is paid | Grant access |
subscription. | A renewal settled | Extend to the new period end |
subscription. | The first renewal attempt failed | Your choice: keep or limit access |
subscription. | A cancel takes effect at period end | Keep access until then |
subscription. | A scheduled cancel no longer applies | Nothing to undo |
subscription. | Cancelled, ended or unpaid | Revoke access |
Each event carries the object as it is now: status, current_, your order_ and metadata, and the payment with its transaction signature. Other events cover checkout sessions, expired orders, duplicate payments and your endpoint's verification.
Set up the endpoint
Add your endpoint's https URL in the dashboard. Fianto first sends it an endpoint. event with a challenge; answer HTTP 200 with that challenge echoed back, and the endpoint is verified. Only a verified endpoint receives events. Keep the endpoint's whsec_ secret on your server, and store each event before you act on it, so a slow job never makes Fianto wait.
Verify every delivery
Deliveries follow the Standard Webhooks format: webhook-id, webhook-timestamp and webhook-signature headers, signed with HMAC-SHA256 using your endpoint's whsec_ secret, so off-the-shelf verifiers work. Refuse a delivery whose signature does not match, or whose timestamp is more than five minutes old. Answer with any 2xx status once the event is stored.
Retries, duplicates and order
If your endpoint does not answer 2xx, Fianto tries again after about 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours, each varied by up to a fifth so retries do not arrive in step: eight attempts over about 28 hours. The same event can arrive more than once and out of order, so deduplicate on webhook-id and compare timestamps before you overwrite newer state.
Missed something? GET /v1/events lists the last 90 days of events, and GET /v1/orders/lookup finds an order by your own order ID.
The transaction is the record
A webhook reports a payment; the Solana transaction is the payment. Each payment event carries its signature, so you can check any of them on a Solana explorer before acting on a large amount. Before going live, verify your endpoint in the dashboard and send it a signed test..
