> ## 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 Checkout Session

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


## OpenAPI

````yaml v2023-11-15/reference/fintoc-api.json POST /checkout_sessions
openapi: 3.1.0
info:
  title: fintoc-api
  version: '2023-11-15'
servers:
  - url: https://api.fintoc.com/v1
security:
  - {}
paths:
  /checkout_sessions:
    post:
      summary: Create Checkout Session
      operationId: create-checkout-session
      parameters:
        - name: Authorization
          in: header
          description: Fintoc API Secret Key
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - amount
                - currency
              properties:
                flow:
                  type: string
                  default: payment
                  enum:
                    - payment
                amount:
                  type: integer
                  description: >-
                    Amount to pay, [represented as an integer](doc:currencies).
                    This value must always be greater than 0 and less than
                    7,000,000, which is the maximum amount allowed by any bank.
                  default: 1000
                  format: int32
                currency:
                  type: string
                  description: >-
                    [Currency ISO
                    code](https://www.iso.org/iso-4217-currency-codes.html). For
                    now, we only support CLP and MXN.
                  default: CLP
                customer_email:
                  type: string
                  description: >-
                    A customer email linked to a `Checkout Session`. This is
                    used to notify a user in case of a refund.
                  default: customer@example.com
                expires_at:
                  type: string
                  description: >-
                    ISO 8601 format (YYYY-MM-DD) timestamp that indicates when
                    the session will expire
                metadata:
                  type: string
                  description: >-
                    Set of [key-value](ref:metadata)  pairs that you can attach
                    to an object. This can be useful for storing additional
                    information about the object in a structured format.
                  default: '{"order":"123456"}'
                  format: json
                success_url:
                  type: string
                  description: >-
                    URL to redirect the user in case of payment succeeded.
                    Required if you want to use the redirection payment flow.
                  default: htttps://merchant.com/success
                cancel_url:
                  type: string
                  description: >-
                    URL to redirect the user in case they decide to cancel the
                    payment and return to your website. Required if you want to
                    use the redirection payment flow.
                  default: htttps://merchant.com/cancel
                customer:
                  type: object
                  properties:
                    tax_id:
                      type: object
                      properties:
                        value:
                          type: string
                        type:
                          type: string
                          default: ''
                      description: >-
                        Object that identifies the customer at a fiscal or
                        regulatory level. One of tax_id or email is required
                    name:
                      type: string
                    email:
                      type: string
                    metadata:
                      type: string
                      format: json
                  description: Information about the customer of the session
                payment_method_types:
                  type: array
                  items:
                    type: string
                  description: >-
                    Optional definition of the available payment method(s) for
                    the session. Methods current available are `bank_transfer`
                    and `card`
                payment_method_options:
                  type: object
                  description: >-
                    Optional list of settings to configure the payment method
                    used to complete the payment
                  properties:
                    payment_intent:
                      type: object
                      properties:
                        recipient_account:
                          type: object
                          description: >-
                            Object that points to the recipient account.
                            Required only for Direct Payments
                          properties:
                            holder_id:
                              type: string
                              description: >-
                                Identifier of the owner of the account. In
                                Chile, it corresponds to a RUT and in Mexico
                                it's either an RFC or CURP.
                              default: '183917137'
                            number:
                              type: string
                              description: >-
                                Account number. Does not include hyphens or
                                prefixed zeros
                              default: '123456'
                            type:
                              type: string
                              description: >-
                                Account type. It can be checking_account or
                                sight_account
                              default: checking_account
                            institution_id:
                              type: string
                              description: Account's institution id
                              default: cl_banco_de_chile
                        sender_account:
                          type: object
                          description: Object that points to the sender account
                          properties:
                            holder_id:
                              type: object
                              description: Identifier of the owner of the account
                              properties:
                                value:
                                  type: string
                                  description: >-
                                    In Chile, it corresponds to a RUT and in
                                    Mexico it's either an RFC or CURP.
                                  default: 12345678-9
                                editable:
                                  type: boolean
                                  description: >-
                                    Indicates whether the user is allowed to
                                    change the preset ID
                                  default: true
                            institution_id:
                              type: object
                              properties:
                                value:
                                  type: string
                                  description: Account's institution id.
                                  default: cl_banco_estado
                business_profile:
                  type: object
                  description: >-
                    Enrolled merchant identifier used for category-based
                    billing. It can be set as required in your organization's
                    billing configuration.
                  properties:
                    name:
                      type: string
                      description: >-
                        Enrolled merchant´s name. If set, will be shown as the
                        "Recipient" on the widget screens.
                    tax_id:
                      type: string
                      description: Tax identifier of the enrolled merchant account
                    category:
                      type: string
                      description: >-
                        Enrolled merchant category identifier. In Chile, it
                        corresponds to a 6 character activity code from SII
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false

````