DevelopersStart
API overview
The v1 API at a glance. Base URL, applications and their keys, the 23 endpoints, and where to read next.
Your server talks to Fianto through the v1 API. It creates checkout sessions, reads orders, payments, subscriptions and events, and cancels sessions and subscriptions. Every checkout, one-time or subscription, starts with a call from your server.
Base URL
https://api.fianto.xyzEvery path starts with /v1/, for example https://. Request
and response bodies use snake_case field names (order_id, success_url, next_cursor).
Applications and keys
You create applications in the dashboard. Each one has an app id (fian_app_…) and a live secret
(fian_sk_live_…) that works only on the mainnet API, and your server sends both with every request. Before your business is approved, an application has a test secret only.
For the devnet API you create a test secret (fian_sk_test_…) for the same application; see
Testing on devnet. An application also has one
webhook endpoint. A merchant can have up to 10 active applications and 100 in total.
Products and prices are merchant-wide: every application reads the same catalog. Everything else, such as sessions, orders, payments, subscriptions and events, is scoped to the application that calls, so each application sees only its own.
There is no publishable key
Fianto has no browser-safe key. Your server creates every checkout session with the app secret, and
the browser only opens the url your server hands it. By default the @fianto/sdk client throws if
you construct it in a browser.
The endpoints
The v1 API has 23 endpoints. Products and prices are read-only here; you create and end them in
the dashboard. A product or price has a status of ACTIVE or ENDED, with ended_at, and
GET /v1/products and GET /v1/prices take status=ACTIVE, ENDED or ALL.
| Area | Endpoints |
|---|---|
| Application | GET /v1/application |
| Checkout sessions | POST /v1/, GET /v1/, POST /v1/, POST /v1/ |
| Orders | GET /v1/orders, GET /v1/, GET /v1/orders/{id} |
| Payments | GET /v1/payments, GET /v1/payments/{id} |
| Subscriptions | GET /v1/subscriptions, GET /v1/, POST /v1/ |
| Products and prices | GET /v1/products, GET /v1/products/{id}, GET /v1/prices, GET /v1/prices/{id} |
| Invoices | GET /v1/invoices, GET /v1/invoices/{id}, GET /v1/. Read-only; see Invoices and receipts |
| Events | GET /v1/events, GET /v1/events/{id} |
| Webhooks | POST /v1/ |
Every POST needs an Idempotency-Key header. See Idempotency.
Where to go next
Authentication
Send your app id and secret, and roll the secret safely.
Checkout sessions
Create a one-time payment and send the payer to it.
Subscriptions
Sell a recurring price and cancel from your server.
Webhooks
Learn when an order is paid, from Fianto itself.
See also
Was this page helpful? Tell us
fianto.xyz