v1

latestOpenAPI 3.0.02026-07-24103118224.7 KB
Checkout Sessions

Create a checkout session for a one-time payment (recommended)

Recommended way to start a hosted one-time payment. Replaces the deprecated POST /api/checkout/payment.

Returns { sessionId, checkoutUrl } — redirect the buyer to checkoutUrl to pay. The paymentId is created once the buyer submits a payment method during the session. Subscribe to checkout_session.* merchant webhooks — the paymentId is included in the payload once the session is completed (e.g. checkout_session.completed).

post/api/checkout/sessions/one-time-payment

Request body

currency'EUR' | 'USD' required

The currency of the checkout session, this currency will refer to product list prices

successUrlstring

The url to redirect to after a successful payment, we will append the id of the payment in the query parameters as "?paymentId={{PAYMENT_ID}}"

cancelUrlstring nullable

The url to redirect to after the user failed to pay, we will append the paymentId in the query parameters

customerEmailstring

Default customer email pre-filled in the checkout session. @deprecated Prefer customer.email.

statementDescriptorstring

Optional statement descriptor (max 11 characters) shown on the customer's bank statement as 'INFLOWPAY* <descriptor>'. Falls back to the account-level statement descriptor if omitted.

metadatasobject

Custom metadata for the session/payment, key/value pairs (supports nested objects and arrays)

expiresInnumber

Duration in hours before the session expires. 0.75 = 45 minutes, 24 = 1 day. Minimum 0.25 (15 minutes). If not provided, the session will not have an automatic expiration.

isVatIncludedboolean

Whether the VAT is included in the product prices

billingCountrystring

Optional default billing country (ISO 3166-1 alpha-2). When set, the checkout session is pre-filled with this country and VAT is recomputed accordingly. Ignored silently if the country is not supported for tax. @deprecated Prefer customer.billingCountry.

captureMode'AUTOMATIC' | 'MANUAL'

Set to MANUAL to authorize the payment at checkout and capture it later via POST /api/payment/:paymentId/capture. Defaults to AUTOMATIC (immediate capture). Card and wallet payments only.

marketplaceFeeInCentsnumber

Marketplaces only: fixed fee to collect on this payment, in cents. Can only be set by the parent marketplace acting on behalf of a sub-merchant. Defaults to the marketplace's configured fee.

savePaymentMethodboolean

When true, the checkout offers the buyer the option to save their payment method (card / wallet) for future payments. The saved payment method is attached to the merchant's customer matching the buyer's email (created if needed). Pass customer.id to instead anchor it to a specific existing customer, regardless of the email the buyer enters. The buyer must still opt in via a checkbox for a reusable payment method to be stored.

Example request

{
  "currency": "EUR",
  "sessionCustomization": {
    "bgColor": "#ffffff",
    "fontColor": "#000000",
    "backgroundColor": "#ffffff"
  },
  "statementDescriptor": "MY BRAND",
  "expiresIn": 24,
  "billingCountry": "FR",
  "customer": {
    "id": "cus_1a2b3c",
    "email": "buyer@example.com",
    "billingCountry": "FR"
  },
  "captureMode": "AUTOMATIC",
  "marketplaceFeeInCents": 200
}

Response

Checkout session created

sessionIdstring required

Checkout session unique identifier

checkoutUrlstring required

Hosted Checkout V2 URL. Redirect the buyer here to complete the checkout.

Example response

{
  "sessionId": "sess_abc123",
  "checkoutUrl": "https://checkout.inflowpay.com/pay/sess_abc123"
}