Create a checkout session

Creates a checkout session in the live or test mode of the API key used. The flow determines what the session does: payment collects a one-time payment, subscription starts a recurring subscription, and setup saves a payment method for future payments. Required fields depend on the flow. After creating the session, redirect your customer to the session's redirect_url or initialize the Fintoc widget with the session's session_token.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
integer

Amount to charge your customer, in the smallest unit of currency. For payment flow sessions, provide either amount or line_items. For subscription flow sessions, amount is required and must equal the total of line_items. Omit for setup flow sessions.

business_profile
object

Business on whose behalf you collect the payment, for payment aggregators.

string

URL Fintoc redirects your customer to when the payment is not completed.

string
enum
required

Three-letter ISO 4217 currency code, in uppercase. One of CLP or MXN.

Allowed:
string

id of an existing customer to attach to the session. Cannot be combined with customer_data.

customer_data
object

Data of a new customer to create and attach to the session. Cannot be combined with customer. You must provide either email or a complete tax_id (both type and value).

string

Email of your customer, used to send the payment receipt.

date-time

ISO 8601 datetime, in UTC, of when the session expires. Must be at least 10 minutes in the future. Defaults to 24 hours after creation when omitted.

string
enum

Flow the session runs. One of payment (collects a one-time payment), subscription (starts a recurring subscription), or setup (saves a payment method for future payments). Defaults to payment.

Allowed:
line_items
array of objects

Items to charge for. Required for subscription flow sessions. For payment flow sessions, provide either amount or line_items.

line_items
metadata
object

Set of key-value pairs to attach to the session.

string

id of a saved payment method to pay the session with. Requires customer and payment_method_types of ["bank_transfer"].

payment_method_options
object

Additional configuration of the session's payment methods, keyed by payment method type. Each key is one of your payment_method_types. For bank_transfer, set recipient_account (the account that receives the payment) and, optionally, sender_account to restrict the account your customer pays from. For pac, set sender_account. For card, set types.

payment_method_types
array of strings

Payment method types your customer can use to pay the session. Valid values depend on the flow: payment accepts card, bank_transfer, and installments; subscription accepts card and pac (automatic recurring bank debit); setup accepts card, bank_transfer, and pac. Defaults to the types your organization has enabled for the flow.

payment_method_types
Allowed:
string
enum

Whether to offer your customer the option to save their payment method for future payments. One of enabled or disabled. Only valid for payment flow sessions. When enabled, you must also provide customer or customer_data.

Allowed:
string

URL Fintoc redirects your customer to after a successful payment.

string
enum

UI mode for payment flow sessions. Set to embedded to initialize the Fintoc widget with the session's session_token instead of redirecting your customer. When embedded, you can omit both success_url and cancel_url.

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json