Checkout Sessions

Create a Fluveo-hosted payment page for a single purchase.

Status: contracted_test. The six canonical Checkout Session operations are in the generated API Reference. Only sk_test_* mode is promised. See API coverage.

A Checkout Session represents one customer’s journey through the Fluveo-hosted payment page. You create it server-side, redirect the customer to its url, and retrieve it on return to confirm the outcome. For the end-to-end flow, see the Checkout overview.

Create

POST /v1/checkout/sessions

FieldRequiredNotes
modeyespayment (single charge). subscription / setup are not available yet.
success_urlyesWhere to redirect after success. Include {CHECKOUT_SESSION_ID} to receive the id back.
cancel_urlyesWhere to redirect on cancellation.
line_itemsyes[{ price_data: { currency, unit_amount, product_data: { name } }, quantity }]
customernoReuse an existing customer.
customer_emailnoUsed for the receipt.
payment_method_typesnoRestrict the methods offered.
metadatanoUp to 50 key/value pairs.
expires_atnoUnix timestamp; min 30 minutes, max 24 hours.
curl
$curl -s -X POST https://api.fluveo.dev/v1/checkout/sessions \
> -u "$FLUVEO_API_KEY:" -H "Content-Type: application/json" \
> -d '{
> "mode": "payment",
> "success_url": "https://example.com/thanks?session_id={CHECKOUT_SESSION_ID}",
> "cancel_url": "https://example.com/cart",
> "line_items": [{ "price_data": { "currency": "usd", "unit_amount": 4242, "product_data": { "name": "Demo Plan" } }, "quantity": 1 }]
> }'

The session object

1{
2 "id": "cs_R9k8AzB2xQRH9Jf",
3 "object": "checkout.session",
4 "mode": "payment",
5 "url": "https://pay.fluveo.com/c/cs_R9k8AzB2xQRH9Jf",
6 "status": "open",
7 "payment_status": "unpaid",
8 "amount_total": 4242,
9 "currency": "usd",
10 "success_url": "https://example.com/thanks",
11 "cancel_url": "https://example.com/cart",
12 "expires_at": 1769498745,
13 "created": 1769412345,
14 "livemode": false
15}
  • status: opencomplete (or expired).
  • payment_status: unpaidpaid.

Retrieve (confirm the outcome)

GET /v1/checkout/sessions/{id} — call this when the customer returns to your success_url. Fulfill only when payment_status is paid — don’t trust the redirect by itself. Merchant-public Events and WebhookEndpoints are currently unavailable, so re-retrieve the session from your server until it reaches a terminal state; do not make fulfillment depend on a public webhook.

curl
$curl -s https://api.fluveo.dev/v1/checkout/sessions/cs_… -u "$FLUVEO_API_KEY:"