> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fintoc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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`.

**`v2`** · Base URL `https://api.fintoc.com/v2`


## OpenAPI

````yaml reference/fintoc-api-v2.json POST /checkout_sessions
openapi: 3.1.0
info:
  title: fintoc-api-v2
  version: v2026-02-01
servers:
  - url: https://api.fintoc.com/v2
security: []
paths:
  /checkout_sessions:
    post:
      tags:
        - Checkout sessions
      summary: Create a checkout session
      description: >-
        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`.
      operationId: checkout-sessions-create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: integer
                  description: >-
                    Amount to charge your customer, in the smallest unit of
                    `currency`. For `payment` flow sessions, provide either
                    `amount` or `line_items`. Omit for `subscription` and
                    `setup` flow sessions, where `amount` does not apply.
                  example: 350000
                business_profile:
                  type: object
                  description: >-
                    Business on whose behalf you collect the payment, for
                    payment aggregators.
                  properties:
                    category:
                      type: string
                      description: >-
                        Six-character merchant category code (MCC) of the
                        business.
                      example: '541100'
                    name:
                      type: string
                      description: Name of the business.
                      example: Test Business
                    tax_id:
                      type: string
                      description: Tax identifier of the business.
                      example: 11.111.111-1
                cancel_url:
                  type: string
                  description: >-
                    URL Fintoc redirects your customer to when the payment is
                    not completed.
                  example: https://merchant.com/cancel
                currency:
                  type: string
                  enum:
                    - CLP
                    - MXN
                  description: >-
                    Three-letter ISO 4217 currency code, in uppercase. One of
                    `CLP` or `MXN`.
                  example: CLP
                customer:
                  type: string
                  description: >-
                    `id` of an existing customer to attach to the session.
                    Cannot be combined with `customer_data`.
                  example: cus_xK9mPq2RkV3WnDQG
                customer_data:
                  type: object
                  description: >-
                    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`).
                  properties:
                    address:
                      type: object
                      description: Address of the customer.
                      properties:
                        city:
                          type: string
                          description: City.
                          example: Santiago
                        country:
                          type: string
                          description: >-
                            Two-letter country code (ISO 3166-1 alpha-2),
                            case-insensitive.
                          example: CL
                        line1:
                          type: string
                          description: Primary address line.
                          example: Av. Providencia 123
                        line2:
                          type: string
                          description: Secondary address line.
                          example: Depto 45
                        postal_code:
                          type: string
                          description: Postal or ZIP code.
                          example: '7500000'
                        state:
                          type: string
                          description: State or region.
                          example: RM
                    email:
                      type: string
                      description: >-
                        Email of the customer. Provide either `email` or
                        `tax_id`.
                      example: customer@example.com
                    metadata:
                      type: object
                      description: Set of key-value pairs to attach to the customer.
                    name:
                      type: string
                      description: Full name or business name of the customer.
                      example: Felipe Castro
                    phone:
                      type: string
                      description: >-
                        Phone number of the customer in E.164 format, including
                        the country code (for example `+56911111111`).
                      example: '+56911111111'
                    tax_id:
                      type: object
                      description: >-
                        Tax identifier of the customer, either a Chilean tax ID
                        (RUT) or a Mexican tax ID (RFC). Provide either `email`
                        or `tax_id`. When provided, both `type` and `value` are
                        required.
                      properties:
                        type:
                          type: string
                          enum:
                            - cl_rut
                            - mx_rfc
                          description: >-
                            Country-specific tax identifier format. One of
                            `cl_rut` for Chilean tax ID (RUT) or `mx_rfc` for
                            Mexican tax ID (RFC).
                          example: cl_rut
                        value:
                          type: string
                          description: >-
                            Country-specific tax identification number. For
                            `cl_rut`, use a Chilean tax ID (RUT) with or without
                            dots and hyphens (for example `11.111.111-1` or
                            `111111111`). For `mx_rfc`, use a Mexican tax ID
                            (RFC).
                          example: 11111111-1
                      required:
                        - type
                        - value
                customer_email:
                  type: string
                  description: Email of your customer, used to send the payment receipt.
                  example: customer@example.com
                expires_at:
                  type: string
                  format: date-time
                  description: >-
                    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.
                  example: '2026-01-14T18:48:25Z'
                flow:
                  type: string
                  enum:
                    - payment
                    - subscription
                    - setup
                  description: >-
                    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`.
                  example: payment
                line_items:
                  type: array
                  description: >-
                    Items to charge for. Required for `subscription` flow
                    sessions. For `payment` flow sessions, provide either
                    `amount` or `line_items`.
                  items:
                    type: object
                    properties:
                      price_data:
                        type: object
                        description: Price of the item.
                        properties:
                          currency:
                            type: string
                            description: >-
                              Three-letter ISO 4217 currency code, in uppercase.
                              `payment` flow items support `CLP` and `MXN`;
                              `subscription` flow items support `CLP`, `CLF`,
                              and `MXN`. Must match the top-level `currency`,
                              except `CLF`, which is allowed in `CLP`
                              subscription sessions.
                            example: CLP
                          product:
                            type: string
                            description: >-
                              `id` of an existing product. Cannot be combined
                              with `product_data`.
                            example: prod_xK9mPq2RkV3WnDQG
                          product_data:
                            type: object
                            description: >-
                              Data of a new product to create. Cannot be
                              combined with `product`.
                            properties:
                              description:
                                type: string
                                description: Description of the product.
                                example: Monthly gym membership.
                              image_url:
                                type: string
                                description: URL of the product image.
                                example: https://merchant.com/images/membership.png
                              name:
                                type: string
                                description: Name of the product.
                                example: Gym membership
                            required:
                              - name
                          recurring:
                            type: object
                            description: >-
                              Billing cadence of the price. Required for
                              `subscription` flow items.
                            properties:
                              interval:
                                type: string
                                description: Billing frequency. One of `month` or `year`.
                                example: month
                              interval_count:
                                type: integer
                                description: Number of intervals between billings.
                                example: 1
                          unit_amount:
                            type: integer
                            description: >-
                              Amount per unit, in the smallest unit of
                              `currency`.
                            example: 350000
                      quantity:
                        type: integer
                        description: Number of units of the item.
                        example: 1
                    required:
                      - price_data
                      - quantity
                metadata:
                  type: object
                  description: Set of key-value pairs to attach to the session.
                payment_method:
                  type: string
                  description: >-
                    `id` of a saved payment method to pay the session with.
                    Requires `customer` and `payment_method_types` of
                    `["bank_transfer"]`.
                  example: pm_xL9mPq2RkV3WnDQG
                subscription:
                  type: string
                  description: >-
                    `id` of an existing subscription whose payment method this
                    session updates once the customer completes it. Only for
                    `setup` flow sessions.
                  example: sub_xL9mPq2RkV3WnDQG
                payment_method_options:
                  type: object
                  description: >-
                    Additional configuration of the session's payment methods,
                    keyed by payment method type. Each key is one of your
                    `payment_method_types`.
                  properties:
                    bank_transfer:
                      type: object
                      description: Options for `bank_transfer`.
                      properties:
                        recipient_account:
                          type: object
                          description: >-
                            Account that receives the payment. Only for
                            `payment` flow sessions.
                        reference_number:
                          type: string
                          description: >-
                            Reference number to attach to the transfer. Only for
                            `payment` flow sessions.
                          example: '1837127'
                        sender_account:
                          type: object
                          description: >-
                            Restrictions on the account your customer pays or
                            sets up the transfer from.
                          properties:
                            holder_id:
                              type: object
                              description: >-
                                Identifier of the account holder, pre-filled in
                                the widget. In `payment` flow `MXN` sessions the
                                value must be a valid Mexican phone number. In
                                `CLP` sessions it must be a valid Chilean tax ID
                                (RUT).
                              properties:
                                value:
                                  type: string
                                  description: Identifier of the account holder.
                                editable:
                                  type: boolean
                                  description: >-
                                    If `false`, your customer cannot change the
                                    pre-filled value in the widget.
                              required:
                                - value
                                - editable
                            institution_id:
                              type: object
                              description: >-
                                Institution your customer must pay or set up the
                                transfer from. You can set this field only when
                                `bank_transfer` is the only value in
                                `payment_method_types`. In `payment` flow, omit
                                it for `MXN` sessions.
                              properties:
                                value:
                                  type: string
                                  description: >-
                                    Identifier of the institution. For `CLP`
                                    sessions the value must be a valid Chilean
                                    bank code.
                                  example: cl_banco_de_chile
                              required:
                                - value
                    pac:
                      type: object
                      description: >-
                        Options for `pac` (automatic recurring bank debit). Only
                        for sessions with `flow` set to `setup` or
                        `subscription` and `currency` set to `CLP`.
                      properties:
                        sender_account:
                          type: object
                          description: >-
                            Restrictions on the account your customer subscribes
                            with.
                          properties:
                            types:
                              type: array
                              description: >-
                                Account types your customer can subscribe with.
                                One of `checking_account`. Omit the field to
                                apply no restriction; an empty array allows
                                none.
                              items:
                                type: string
                                enum:
                                  - checking_account
                                example: checking_account
                            holder_id:
                              type: object
                              description: >-
                                Tax ID of the account holder, pre-filled in the
                                widget. For `CLP` sessions the value must be a
                                valid Chilean tax ID (RUT).
                              properties:
                                value:
                                  type: string
                                  description: Tax ID of the account holder.
                                  example: 11.111.111-1
                                editable:
                                  type: boolean
                                  description: >-
                                    If `false`, your customer cannot change the
                                    pre-filled value in the widget.
                              required:
                                - value
                                - editable
                            institution_id:
                              type: object
                              description: >-
                                Institution your customer must use for the
                                subscription. You can set this field only when
                                `pac` is the only value in
                                `payment_method_types`.
                              properties:
                                value:
                                  type: string
                                  description: >-
                                    Identifier of the institution. For `CLP`
                                    sessions the value must be a valid Chilean
                                    bank code.
                                  example: cl_banco_de_chile
                              required:
                                - value
                    card:
                      type: object
                      description: Options for `card`.
                      properties:
                        types:
                          type: array
                          description: >-
                            Card providers the session accepts. One of `bank` or
                            `hites`. Only for `payment` flow sessions, where it
                            is required if you send
                            `payment_method_options.card`. To apply no
                            restriction, omit the `card` object entirely; do not
                            send an empty array.
                          items:
                            type: string
                            enum:
                              - bank
                              - hites
                            example: bank
                        kinds:
                          type: array
                          description: >-
                            Card kinds the session accepts. One of `credit` or
                            `debit`. Only for `setup` and `subscription` flow
                            sessions. Omit the field to allow every kind; an
                            empty array allows none.
                          items:
                            type: string
                            enum:
                              - credit
                              - debit
                            example: debit
                payment_method_types:
                  type: array
                  description: >-
                    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`. In `MXN` sessions, `subscription` and `setup` flows
                    accept only `card`. Defaults to the types your organization
                    has enabled for the flow.
                  items:
                    type: string
                    enum:
                      - bank_transfer
                      - installments
                      - card
                      - pac
                    example: bank_transfer
                save_payment_method:
                  type: string
                  enum:
                    - disabled
                    - enabled
                  description: >-
                    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`.
                  example: enabled
                success_url:
                  type: string
                  description: >-
                    URL Fintoc redirects your customer to after a successful
                    payment.
                  example: https://merchant.com/success
                ui_mode:
                  type: string
                  enum:
                    - embedded
                  description: >-
                    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`.
                  example: embedded
              required:
                - currency
            examples:
              create_payment_checkout_session:
                summary: Create a payment checkout session
                value:
                  flow: payment
                  amount: 350000
                  currency: CLP
                  payment_method_types:
                    - bank_transfer
                  customer_email: customer@example.com
                  success_url: https://merchant.com/success
                  cancel_url: https://merchant.com/cancel
      responses:
        '201':
          description: The created checkout session.
          content:
            application/json:
              examples:
                checkout_session_created:
                  value:
                    id: cs_li5531onlFDi235
                    object: checkout_session
                    amount: 350000
                    business_profile: null
                    cancel_url: https://merchant.com/cancel
                    created_at: '2026-01-13T18:48:25Z'
                    currency: CLP
                    customer_email: customer@example.com
                    expires_at: '2026-01-14T18:48:25Z'
                    flow: payment
                    line_items: null
                    metadata: {}
                    mode: live
                    payment_method: null
                    payment_method_options:
                      bank_transfer: {}
                    payment_method_types:
                      - bank_transfer
                    payment_resource: null
                    redirect_url: https://pay.fintoc.com/cs_li5531onlFDi235
                    save_payment_method: null
                    session_token: >-
                      eyJhbGciOiJIUzI1NiJ9.eyJpZCI6ImNzX2xpNTUzMSJ9.iV2qAVrqYLuqxF4
                    setup_intent: null
                    status: created
                    subscription: null
                    success_url: https://merchant.com/success
              schema:
                $ref: '#/components/schemas/checkout_session'
        '400':
          description: >-
            Invalid request: a required parameter is missing or invalid for the
            chosen flow.
          content:
            application/json:
              examples:
                missing_amount:
                  value:
                    error:
                      type: invalid_request_error
                      code: missing_parameter
                      param: amount
                      message: 'Missing required param: amount'
                      doc_url: https://docs.fintoc.com/reference/errors
              schema:
                $ref: '#/components/schemas/error_object'
        '401':
          description: 'Unauthorized: the API key is missing or invalid.'
          content:
            application/json:
              examples:
                invalid_api_key:
                  value:
                    error:
                      type: authentication_error
                      message: No valid API key provided.
                      code: invalid_api_key
                      param: null
                      doc_url: https://docs.fintoc.com/reference/errors
              schema:
                $ref: '#/components/schemas/error_object'
        '403':
          description: >-
            Forbidden: the requested flow is not allowed for your organization's
            configuration.
          content:
            application/json:
              examples:
                forbidden_flow:
                  value:
                    error:
                      type: invalid_request_error
                      message: >-
                        Bank transfer setup requires fintoc_collects schema
                        (current: direct).
                      code: forbidden_request
                      param: null
                      doc_url: https://docs.fintoc.com/reference/errors
              schema:
                $ref: '#/components/schemas/error_object'
        '404':
          description: >-
            Not found: the `payment_method`, `customer`, or `subscription`
            referenced in the request does not exist.
          content:
            application/json:
              examples:
                payment_method_not_found:
                  value:
                    error:
                      type: invalid_request_error
                      message: 'No such payment_method: pm_nonexistent'
                      code: missing_resource
                      param: payment_method
                      doc_url: https://docs.fintoc.com/reference/errors
              schema:
                $ref: '#/components/schemas/error_object'
        '422':
          description: >-
            Unprocessable entity: the `subscription` referenced in a `setup`
            flow session is canceled.
          content:
            application/json:
              examples:
                subscription_canceled:
                  value:
                    error:
                      type: invalid_request_error
                      message: 'Subscription is canceled: sub_xL9mPq2RkV3WnDQG'
                      code: subscription_canceled
                      param: subscription
                      doc_url: https://docs.fintoc.com/reference/errors
              schema:
                $ref: '#/components/schemas/error_object'
      security:
        - api_key: []
components:
  schemas:
    checkout_session:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the checkout session.
          example: cs_li5531onlFDi235
        object:
          const: checkout_session
          description: Type of the object. Always `checkout_session`.
        amount:
          type:
            - integer
            - 'null'
          description: >-
            Amount the session charges your customer, in the smallest unit of
            `currency`. For CLP the smallest unit is one peso (CLP has no
            decimals), so `350000` means $350,000 CLP. For MXN the smallest unit
            is one centavo, so `350000` means $3,500.00 MXN. `null` for `setup`
            and `subscription` flow sessions, which do not carry a single
            amount.
          example: 350000
        business_profile:
          type:
            - object
            - 'null'
          description: >-
            Business on whose behalf you collect the payment, for payment
            aggregators. `null` when the session was created without a business
            profile.
          properties:
            category:
              type: string
              description: Six-character merchant category code (MCC) of the business.
              example: '541100'
            name:
              type: string
              description: Name of the business.
              example: Test Business
            tax_id:
              type: string
              description: Tax identifier of the business.
              example: '111111111'
        cancel_url:
          type:
            - string
            - 'null'
          description: >-
            URL Fintoc redirects your customer to when the payment is not
            completed. `null` when the session was created without redirect
            URLs.
          example: https://merchant.com/cancel
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the checkout session was created.
          example: '2026-01-13T18:48:25Z'
        currency:
          type: string
          enum:
            - CLP
            - MXN
          description: >-
            Three-letter ISO 4217 currency code, in uppercase. One of `CLP` or
            `MXN`.
          example: CLP
        customer:
          type: object
          description: >-
            Customer the session belongs to. This key is omitted (not `null`)
            when the session has no customer.
          properties:
            id:
              type: string
              description: Unique identifier of the customer.
              example: cus_xK9mPq2RkV3WnDQG
            object:
              const: customer
              description: Type of the object. Always `customer`.
            address:
              type:
                - object
                - 'null'
              description: >-
                Address of the customer. `null` when not provided. Keys without
                a value are omitted.
              properties:
                city:
                  type: string
                  description: City of the address.
                  example: Santiago
                country:
                  type: string
                  description: Country of the address, as a two-letter ISO 3166-1 code.
                  example: cl
                line1:
                  type: string
                  description: First line of the address.
                  example: Av. Providencia 123
                line2:
                  type: string
                  description: Second line of the address.
                  example: Depto 45
                postal_code:
                  type: string
                  description: Postal code of the address.
                  example: '7500000'
                state:
                  type: string
                  description: State or region of the address.
                  example: RM
            created_at:
              type: string
              format: date-time
              description: ISO 8601 timestamp of when the customer was created.
              example: '2026-01-10T12:30:00Z'
            email:
              type:
                - string
                - 'null'
              description: Email of the customer. `null` when not provided.
              example: customer@example.com
            metadata:
              type: object
              description: Set of key-value pairs attached to the customer.
            mode:
              type: string
              enum:
                - test
                - live
              description: >-
                Mode of the object. `live` objects use real institution data,
                `test` objects use fake data for integration testing.
              example: live
            name:
              type:
                - string
                - 'null'
              description: Name of the customer. `null` when not provided.
              example: Felipe Castro
            phone:
              type:
                - string
                - 'null'
              description: Phone number of the customer. `null` when not provided.
              example: '+56912345678'
            tax_id:
              type:
                - object
                - 'null'
              description: Tax identifier of the customer. `null` when not provided.
              properties:
                type:
                  type: string
                  description: Type of the tax identifier, for example `cl_rut`.
                  example: cl_rut
                value:
                  type: string
                  description: Value of the tax identifier.
                  example: '111111111'
        customer_email:
          type:
            - string
            - 'null'
          description: >-
            Email of your customer, used to send the payment receipt. `null`
            when not provided.
          example: customer@example.com
        expires_at:
          type: string
          format: date-time
          description: >-
            ISO 8601 timestamp of when the checkout session expires. After this
            time your customer can no longer pay the session.
          example: '2026-01-14T18:48:25Z'
        flow:
          type: string
          enum:
            - payment
            - subscription
            - setup
          description: >-
            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).
          example: payment
        line_items:
          type:
            - array
            - 'null'
          description: >-
            Items the session charges for. `null` when the session was created
            without line items.
          items:
            type: object
            properties:
              price:
                type: object
                description: Price of the item.
                properties:
                  currency:
                    type: string
                    enum:
                      - CLF
                      - CLP
                      - MXN
                    description: >-
                      Three-letter ISO 4217 currency code, in uppercase. One of
                      `CLP`, `MXN` or `CLF`.
                    example: CLP
                  product:
                    type: object
                    description: Product the price belongs to.
                    properties:
                      description:
                        type:
                          - string
                          - 'null'
                        description: Description of the product. `null` when not provided.
                        example: Monthly gym membership.
                      image_url:
                        type:
                          - string
                          - 'null'
                        description: URL of the product image. `null` when not provided.
                        example: https://merchant.com/images/membership.png
                      metadata:
                        type: object
                        description: Set of key-value pairs attached to the product.
                      name:
                        type: string
                        description: Name of the product.
                        example: Gym membership
                    required:
                      - description
                      - image_url
                      - metadata
                      - name
                  recurring:
                    type:
                      - object
                      - 'null'
                    description: Billing cadence of the price. `null` for one-time prices.
                    properties:
                      interval:
                        type: string
                        enum:
                          - month
                          - year
                        description: Billing frequency. One of `month` or `year`.
                        example: month
                      interval_count:
                        type: integer
                        description: >-
                          Number of intervals between billings. For example,
                          `interval: month` with `interval_count: 3` bills every
                          3 months.
                        example: 1
                    required:
                      - interval
                      - interval_count
                  unit_amount:
                    type: integer
                    description: Amount per unit, in the smallest unit of `currency`.
                    example: 350000
                required:
                  - currency
                  - product
                  - recurring
                  - unit_amount
              quantity:
                type: integer
                description: Number of units of the item.
                example: 1
            required:
              - price
              - quantity
        metadata:
          type: object
          description: Set of key-value pairs you attached to the session.
        mode:
          type: string
          enum:
            - test
            - live
          description: >-
            Mode of the object. `live` objects use real institution data, `test`
            objects use fake data for integration testing.
          example: live
        payment_method:
          type:
            - string
            - 'null'
          description: >-
            `id` of the saved payment method that pays the session. `null` when
            the session is not paid with a previously saved payment method.
          example: pm_xL9mPq2RkV3WnDQG
        payment_method_options:
          type: object
          description: >-
            Configuration of the session's payment methods, keyed by payment
            method type. Each key matches one of `payment_method_types` and
            holds the options you set when creating the session, such as the
            `recipient_account` for `bank_transfer` or the `kinds` for `card`.
            See [`POST
            /v2/checkout_sessions`](https://docs.fintoc.com/reference/checkout-sessions-create)
            for the full shape.
        payment_method_types:
          type: array
          description: >-
            Payment method types your customer can use to pay the session. One
            or more of `card`, `bank_transfer`, `installments`, and `pac`
            (automatic recurring bank debit).
          items:
            type: string
            enum:
              - bank_transfer
              - installments
              - card
              - pac
            example: bank_transfer
        payment_resource:
          type:
            - object
            - 'null'
          description: >-
            Payment generated by the session. `null` until your customer starts
            a payment attempt.
          properties:
            payment_intent:
              type: object
              description: Payment intent of the session's active payment attempt.
              properties:
                id:
                  type: string
                  description: Unique identifier of the payment intent.
                  example: pi_BO381oEATXonG6bj
                object:
                  const: payment_intent
                  description: Type of the object. Always `payment_intent`.
                amount:
                  type: integer
                  description: >-
                    Amount of the payment intent, in the smallest unit of
                    `currency`. For CLP the smallest unit is one peso (CLP has
                    no decimals), so `100000` means $100,000 CLP. For MXN the
                    smallest unit is one centavo, so `7050` means $70.50 MXN.
                  example: 100000
                business_profile:
                  type:
                    - object
                    - 'null'
                  description: >-
                    Business on whose behalf you collect the payment, for
                    payment aggregators. `null` when the payment was created
                    without a business profile.
                  properties:
                    category:
                      type: string
                      description: >-
                        Six-character merchant category code (MCC) of the
                        business.
                    name:
                      type: string
                      description: Name of the business.
                    tax_id:
                      type: string
                      description: Tax identifier of the business.
                created_at:
                  type: string
                  format: date-time
                  description: ISO 8601 timestamp of when the payment intent was created.
                  example: '2026-01-13T18:48:25Z'
                currency:
                  type: string
                  enum:
                    - CLP
                    - MXN
                  description: >-
                    Three-letter ISO 4217 currency code, in uppercase. One of
                    `CLP` or `MXN`.
                  example: CLP
                customer:
                  type:
                    - object
                    - 'null'
                  description: >-
                    Customer the payment intent belongs to. `null` when the
                    session was created without a customer.
                  properties:
                    id:
                      type: string
                      description: Unique identifier of the customer.
                    object:
                      const: customer
                      description: Type of the object. Always `customer`.
                    address:
                      type:
                        - object
                        - 'null'
                      description: Address of the customer. `null` when not provided.
                      properties:
                        city:
                          type: string
                          description: City of the address.
                        country:
                          type: string
                          description: >-
                            Country of the address, as a two-letter ISO 3166-1
                            code.
                        line1:
                          type: string
                          description: First line of the address.
                        line2:
                          type: string
                          description: Second line of the address.
                        postal_code:
                          type: string
                          description: Postal code of the address.
                        state:
                          type: string
                          description: State or region of the address.
                    created_at:
                      type: string
                      format: date-time
                      description: ISO 8601 timestamp of when the customer was created.
                    email:
                      type:
                        - string
                        - 'null'
                      description: Email of the customer. `null` when not provided.
                    metadata:
                      type: object
                      description: Set of key-value pairs attached to the customer.
                    mode:
                      type: string
                      enum:
                        - test
                        - live
                      description: >-
                        Mode of the object. `live` objects use real institution
                        data, `test` objects use fake data for integration
                        testing.
                      example: live
                    name:
                      type:
                        - string
                        - 'null'
                      description: Name of the customer. `null` when not provided.
                    phone:
                      type:
                        - string
                        - 'null'
                      description: Phone number of the customer. `null` when not provided.
                    tax_id:
                      type:
                        - object
                        - 'null'
                      description: >-
                        Tax identifier of the customer. `null` when not
                        provided.
                      properties:
                        type:
                          type: string
                          description: Type of the tax identifier, for example `cl_rut`.
                        value:
                          type: string
                          description: Value of the tax identifier.
                customer_email:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Email of your customer, used to send payment notifications.
                    `null` when not provided.
                  example: customer@example.com
                error_reason:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Reason the payment failed, was rejected, or expired. `null`
                    while the payment is in progress and when it succeeds.
                  example: insufficient_funds
                expires_at:
                  type:
                    - string
                    - 'null'
                  format: date-time
                  description: >-
                    ISO 8601 timestamp of when the payment expires and can no
                    longer be paid. Only set for cash payments; `null`
                    otherwise.
                metadata:
                  type: object
                  description: Set of key-value pairs attached to the payment intent.
                  example:
                    order_id: '9182'
                mode:
                  type: string
                  enum:
                    - test
                    - live
                  description: >-
                    Mode of the object. `live` objects use real institution
                    data, `test` objects use fake data for integration testing.
                  example: live
                next_action:
                  type:
                    - object
                    - 'null'
                  description: >-
                    Action your customer must complete to continue the payment,
                    as reported by the widget. `null` when no action is pending.
                payment_method:
                  type:
                    - string
                    - 'null'
                  description: >-
                    `id` of the payment method used to pay. `null` when the
                    payment is not paid with a saved payment method.
                  example: pm_1x7vKQ8oEATXonG6
                payment_type:
                  type: string
                  description: Payment type used to pay. One of `bank_transfer` or `cash`.
                  example: bank_transfer
                payment_type_options:
                  type: object
                  description: >-
                    Options specific to the payment type, keyed by payment type.
                    For cash payments, contains a `cash` object with the details
                    of the payment. Empty for bank transfers.
                  properties:
                    cash:
                      type: object
                      description: >-
                        Details of the cash payment. Present only for cash
                        payments.
                      properties:
                        barcode_url:
                          type:
                            - string
                            - 'null'
                          description: >-
                            URL of the barcode your customer scans to pay in
                            cash.
                          example: https://cash.fintoc.com/barcode/9182.png
                        reference_number:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Reference number your customer uses to pay the cash
                            payment.
                          example: '9182037465'
                        voucher_url:
                          type:
                            - string
                            - 'null'
                          description: >-
                            URL of the voucher your customer presents to pay in
                            cash.
                          example: https://cash.fintoc.com/voucher/9182.pdf
                      required:
                        - reference_number
                        - barcode_url
                        - voucher_url
                  example: {}
                recipient_account:
                  type:
                    - object
                    - 'null'
                  description: >-
                    Bank account that receives the payment. `null` for cash
                    payments.
                  properties:
                    holder_id:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Tax identifier of the account holder. Chilean tax ID
                        (RUT) in Chile, Mexican tax ID (RFC) in Mexico.
                    institution_id:
                      type:
                        - string
                        - 'null'
                      description: Identifier of the institution of the account.
                    number:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Number of the account. In Mexico, the standardized
                        Mexican bank account number (CLABE).
                    type:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Type of the account, such as `checking_account` or
                        `sight_account`.
                  required:
                    - holder_id
                    - number
                    - type
                    - institution_id
                reference_id:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Identifier of the transfer assigned by the institution.
                    `null` until the transfer is executed.
                  example: '90123712'
                sender_account:
                  type:
                    - object
                    - 'null'
                  description: >-
                    Bank account your customer pays from. `null` until Fintoc
                    identifies the sender.
                  properties:
                    holder_id:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Tax identifier of the account holder. Chilean tax ID
                        (RUT) in Chile, Mexican tax ID (RFC) in Mexico.
                    institution_id:
                      type:
                        - string
                        - 'null'
                      description: Identifier of the institution of the account.
                    number:
                      type:
                        - string
                        - 'null'
                      description: Number of the account.
                    type:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Type of the account, such as `checking_account` or
                        `sight_account`.
                  required:
                    - holder_id
                    - number
                    - type
                    - institution_id
                status:
                  type: string
                  enum:
                    - created
                    - failed
                    - succeeded
                    - rejected
                    - in_progress
                    - pending
                    - expired
                  description: >-
                    Lifecycle status of the payment intent. One of `created`,
                    `in_progress`, `succeeded`, `rejected`, `failed`, `expired`,
                    or `pending`. `pending` is only used when your organization
                    has the pending status enabled.
                  example: succeeded
                subscription:
                  type:
                    - string
                    - 'null'
                  description: >-
                    `id` of the subscription that originated the payment intent.
                    `null` for one-time payments.
                  example: sub_dJOd4hcZby9XK1Lm
                transaction_date:
                  type:
                    - string
                    - 'null'
                  format: date-time
                  description: >-
                    ISO 8601 timestamp of when the institution executed the
                    transfer. `null` until the transfer is executed.
                  example: '2026-01-13T18:50:25Z'
                widget_token:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Token used to initialize the Fintoc widget for this payment
                    intent. Only returned when the payment intent is created;
                    `null` in every other response.
                  example: pi_BO381oEATXonG6bj_sec_aBcDeFgHiJkLmNoP
              required:
                - id
                - object
                - amount
                - created_at
                - currency
                - customer
                - customer_email
                - error_reason
                - expires_at
                - metadata
                - mode
                - next_action
                - payment_method
                - payment_type
                - payment_type_options
                - recipient_account
                - reference_id
                - sender_account
                - status
                - subscription
                - transaction_date
                - widget_token
          required:
            - payment_intent
        redirect_url:
          type:
            - string
            - 'null'
          description: >-
            URL of the Fintoc-hosted checkout page where your customer completes
            the payment. Redirect your customer to this URL after creating the
            session. `null` for sessions paid through the Fintoc widget instead
            of a redirect.
          example: https://pay.fintoc.com/cs_li5531onlFDi235
        save_payment_method:
          type:
            - string
            - 'null'
          enum:
            - disabled
            - enabled
            - null
          description: >-
            Whether the session offers your customer the option to save their
            payment method for future payments. One of `enabled` or `disabled`.
            Only returned for `payment` flow sessions; `null` when not
            configured.
          example: enabled
        session_token:
          type:
            - string
            - 'null'
          description: >-
            Token used to initialize the Fintoc widget to pay the session.
            `null` for `subscription` and `setup` flow sessions and for payments
            completed outside the widget, like non-embedded card payments.
          example: eyJhbGciOiJIUzI1NiJ9.eyJpZCI6ImNzX2xpNTUzMSJ9.iV2qAVrqYLuqxF4
        setup_intent:
          type:
            - string
            - 'null'
          description: >-
            Unique identifier for the setup intent created by `setup` and
            `subscription` flow sessions. `null` for other flows and until
            Fintoc attempts a setup. Retrieve the setup intent's status and
            error with the setup intent endpoint.
          example: seti_xL9mPq2RkV3WnDQG
        status:
          type: string
          enum:
            - created
            - in_progress
            - expired
            - finished
          description: >-
            Lifecycle status of the session. `created` until your customer
            starts paying, `in_progress` while Fintoc processes the payment, and
            `finished` or `expired` once the session succeeds or expires.
          example: created
        subscription:
          type:
            - string
            - 'null'
          description: >-
            `id` of the subscription started by a `subscription` flow session.
            `null` until the subscription is created and for other flows.
          example: sub_xL9mPq2RkV3WnDQG
        success_url:
          type:
            - string
            - 'null'
          description: >-
            URL Fintoc redirects your customer to after a successful payment.
            `null` when the session was created without redirect URLs.
          example: https://merchant.com/success
      required:
        - id
        - object
        - amount
        - business_profile
        - cancel_url
        - created_at
        - currency
        - customer_email
        - expires_at
        - flow
        - line_items
        - metadata
        - mode
        - payment_method
        - payment_method_options
        - payment_method_types
        - payment_resource
        - redirect_url
        - session_token
        - setup_intent
        - status
        - subscription
        - success_url
    error_object:
      type: object
      properties:
        error:
          type: object
          description: Details of the error that caused the request to fail.
          properties:
            code:
              type: string
              description: >-
                Machine-readable code identifying the specific error, for
                example `invalid_api_key`. Not returned by every error.
              example: invalid_api_key
            doc_url:
              type: string
              description: >-
                URL of a documentation page with more details about the error.
                Not returned by every error.
              example: https://docs.fintoc.com/reference/errors
            message:
              type: string
              description: Human-readable message describing the error.
              example: 'Invalid API Key: invalid-*oken'
            param:
              type:
                - string
                - 'null'
              description: >-
                Name of the request parameter that caused the error. `null` when
                the error cannot be tied to a single parameter, and not returned
                by every error.
              example: amount
            type:
              type: string
              description: >-
                Category of the error, for example `invalid_request_error`,
                `authentication_error`, or `api_error`.
              example: invalid_request_error
          required:
            - type
            - message
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header

````