> ## 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 payment intent

> Creates a payment intent in the `live` or `test` mode of the API key used. A payment intent represents your intention of collecting a payment from a customer, in CLP for Chilean organizations or MXN for Mexican organizations. The response includes a `widget_token`, only returned on creation, used to initialize the Fintoc widget so the customer can complete the payment.

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

<Info>
  **Only create a Payment Intent for a Cash Payment**

  This request to create a Payment Intent should only be used for [cash payments](/docs/payments/cash-payment-direct-api). For all other payment methods, you should create a Checkout Session instead.
  See more details here: [https://docs.fintoc.com/reference/create-checkout-session](/reference/payments-api/checkout-sessions/checkout-sessions-create)
</Info>


## OpenAPI

````yaml reference/fintoc-api.json POST /payment_intents
openapi: 3.1.0
info:
  title: fintoc-api
  version: v2026-02-01
servers:
  - url: https://api.fintoc.com/v1
security: []
paths:
  /payment_intents:
    post:
      tags:
        - Payment intents (cash only)
      summary: Create a payment intent
      description: >-
        Creates a payment intent in the `live` or `test` mode of the API key
        used. A payment intent represents your intention of collecting a payment
        from a customer, in CLP for Chilean organizations or MXN for Mexican
        organizations. The response includes a `widget_token`, only returned on
        creation, used to initialize the Fintoc widget so the customer can
        complete the payment.
      operationId: payment-intents-create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: integer
                  example: 100000
                  description: >-
                    A positive integer representing the amount to pay, in the
                    smallest unit of the currency (for example, `100000` for
                    100000 CLP, since CLP has no minor unit, or `7050` for 70.50
                    MXN).
                currency:
                  type: string
                  enum:
                    - CLP
                    - MXN
                  example: CLP
                  description: >-
                    Three-letter ISO 4217 currency code. One of `CLP` or `MXN`.
                    Must match the currency of your organization's country.
                customer_email:
                  type: string
                  example: jon.snow@example.com
                  description: >-
                    Email address of the customer. Fintoc uses it for payment
                    notifications, including refund notices. Invalid addresses
                    are discarded without failing the request.
                expires_at:
                  type:
                    - string
                    - integer
                  example: '2024-12-31T23:59:59Z'
                  description: >-
                    ISO 8601 datetime in UTC or Unix timestamp of when the
                    payment expires and can no longer be paid. Must be in the
                    future, and only valid when `payment_type` is `cash`.
                    Defaults to 3 days after creation.
                metadata:
                  type: object
                  example:
                    order_id: '9182'
                  description: >-
                    Set of key-value pairs you can attach to the payment intent.
                    Supports up to 50 keys, with key names up to 40 characters
                    and values up to 500 characters. Arrays and nested objects
                    are not allowed.
                payment_type:
                  type: string
                  enum:
                    - bank_transfer
                    - cash
                  description: >-
                    Payment type the customer uses to pay. One of
                    `bank_transfer` (bank transfer in Chile and Mexico) or
                    `cash` (cash deposit at a sale point, Mexico only). Defaults
                    to `bank_transfer`.
                recipient_account:
                  type: object
                  description: >-
                    Bank account that receives the payment. Chile only, and only
                    if your organization uses direct payments; organizations
                    that collect through Fintoc must omit it.
                  properties:
                    holder_id:
                      type: string
                      example: '111111111'
                      description: Tax identifier (RUT) of the account holder.
                    institution_id:
                      type: string
                      example: cl_banco_de_chile
                      description: Identifier of the institution of the account.
                    number:
                      type: string
                      description: Number of the account.
                      example: '123456789'
                    type:
                      type: string
                      enum:
                        - checking_account
                        - savings_account
                        - sight_account
                        - rut_account
                        - line_of_credit
                        - credit_card
                      example: checking_account
                      description: Type of the account.
                  required:
                    - holder_id
                    - institution_id
                    - number
                    - type
                reference_number:
                  type: string
                  description: >-
                    Numeric reference attached to the SPEI transfer. Mexico
                    only.
                sender_account:
                  type: object
                  description: >-
                    Bank account the customer pays from. Chile only. Fintoc uses
                    it to validate transfer limits when creating the payment
                    intent.
                  properties:
                    holder_id:
                      type: string
                      example: '111111111'
                      description: Tax identifier (RUT) of the account holder.
                    institution_id:
                      type: string
                      example: cl_banco_de_chile
                      description: Identifier of the institution of the account.
              required:
                - amount
                - currency
            examples:
              create_clp_payment_intent:
                summary: Create a CLP payment intent
                value:
                  amount: 100000
                  currency: CLP
                  customer_email: jon.snow@example.com
                  metadata:
                    order_id: '9182'
                  recipient_account:
                    holder_id: '111111111'
                    institution_id: cl_banco_de_chile
                    number: '123456789'
                    type: checking_account
              create_mxn_cash_payment_intent:
                summary: Create an MXN cash payment intent
                value:
                  amount: 150000
                  currency: MXN
                  expires_at: '2024-12-31T23:59:59Z'
                  payment_type: cash
      responses:
        '201':
          description: >-
            Payment intent created. The `widget_token` is only returned in this
            response.
          content:
            application/json:
              examples:
                payment_intent_created:
                  value:
                    id: pi_BO381oEATXonG6bj
                    object: payment_intent
                    amount: 100000
                    business_profile: null
                    created_at: '2021-10-15T15:23:11.474Z'
                    currency: CLP
                    customer: null
                    customer_email: jon.snow@example.com
                    error_reason: null
                    expires_at: null
                    metadata:
                      order_id: '9182'
                    mode: live
                    next_action: null
                    payment_method: null
                    payment_type: bank_transfer
                    payment_type_options: {}
                    recipient_account:
                      holder_id: '111111111'
                      institution_id: cl_banco_de_chile
                      number: '123456789'
                      type: checking_account
                    reference_id: null
                    sender_account: null
                    status: created
                    subscription: null
                    transaction_date: null
                    widget_token: pi_BO381oEATXonG6bj_sec_aBcDeFgHiJkLmNoP
              schema:
                $ref: '#/components/schemas/payment_intent'
        '400':
          description: >-
            Invalid request: a required parameter is missing or has an invalid
            value, the `recipient_account` is invalid, the amount is outside the
            permitted limits, or your organization cannot create `live` payment
            intents without a payout account.
          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
                invalid_recipient_account:
                  value:
                    error:
                      type: invalid_request_error
                      code: invalid_payment_recipient_account
                      param: recipient_account.type
                      message: 'Invalid payment recipient_account: invalid type "vista"'
                      doc_url: https://docs.fintoc.com/reference/errors
              schema:
                $ref: '#/components/schemas/error_object'
        '401':
          description: Invalid or missing API key.
          content:
            application/json:
              examples:
                invalid_api_key:
                  value:
                    error:
                      type: authentication_error
                      code: invalid_api_key
                      message: 'Invalid API Key: invalid-*oken'
              schema:
                $ref: '#/components/schemas/error_object'
        '402':
          description: >-
            Your organization has no payment method enabled for the requested
            payment type in `live` mode.
          content:
            application/json:
              examples:
                payment_required:
                  value:
                    error:
                      type: api_error
                      code: payment_required
                      message: >-
                        No payment methods are available for this organization.
                        Please enable at least one payment method.
                      doc_url: https://docs.fintoc.com/docs/errors
              schema:
                $ref: '#/components/schemas/error_object'
        '422':
          description: The requested payment method is temporarily unavailable.
          content:
            application/json:
              examples:
                payment_method_unavailable:
                  value:
                    error:
                      type: invalid_request_error
                      code: payment_method_unavailable
                      message: >-
                        The payment method 'cash' is temporarily unavailable.
                        Try again later.
                      doc_url: https://docs.fintoc.com/docs/errors
              schema:
                $ref: '#/components/schemas/error_object'
      security:
        - api_key: []
components:
  schemas:
    payment_intent:
      type: object
      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 the currency
            (for example, `100000` for 100000 CLP, since CLP has no minor unit,
            or `7050` for 70.50 MXN).
          example: 100000
        business_profile:
          type:
            - object
            - 'null'
          description: >-
            Profile of the business that collects the payment, when provided.
            `null` otherwise.
          properties:
            category:
              type: string
              description: Category 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: '2021-10-15T15:23:11.474Z'
        currency:
          type: string
          enum:
            - CLP
            - MXN
          description: >-
            Three-letter ISO 4217 currency code of the payment intent. One of
            `CLP` or `MXN`.
          example: CLP
        customer:
          type:
            - object
            - 'null'
          description: >-
            Customer associated with the payment intent, when it was created
            from a checkout session with a customer. `null` otherwise.
          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.
                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 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 address of the customer.
            metadata:
              type: object
              description: Set of key-value pairs attached to the customer.
            mode:
              type: string
              description: Mode of the customer. One of `live` or `test`.
            name:
              type:
                - string
                - 'null'
              description: Name of the customer.
            phone:
              type:
                - string
                - 'null'
              description: Phone number of the customer.
            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 address of the customer that receives payment notifications.
            `null` when not provided.
          example: jon.snow@example.com
        error_reason:
          type:
            - string
            - 'null'
          description: >-
            Reason why 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:
          $ref: '#/components/schemas/mode'
        next_action:
          type:
            - object
            - 'null'
          description: >-
            Action the customer must complete to continue the payment, as
            reported by the widget. `null` when no action is pending.
        payment_method:
          type:
            - string
            - 'null'
          description: >-
            Identifier of the payment method used to pay, when the payment
            intent comes from a checkout session or a subscription. `null`
            otherwise.
          example: pm_1x7vKQ8oEATXonG6
        payment_type:
          type: string
          description: Payment type used to pay, such as `bank_transfer` or `cash`.
          example: bank_transfer
        payment_type_options:
          type: object
          description: >-
            Options specific to the payment type. For card payments, the object
            contains a `card` object. For cash payments, the object contains a
            `cash` object with the `reference_number`, `barcode_url`, and
            `voucher_url` of the payment. For bank transfers, the object is
            empty.
          properties:
            card:
              type: object
              description: Details of the card payment. Present only for card payments.
              properties:
                authenticated_with_3ds:
                  type: boolean
                  description: >-
                    If `true`, the cardholder completed 3-D Secure
                    authentication for this payment.
                  example: true
                bank:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Name of the bank that issued the card. `null` when the
                    issuing bank is unknown.
                  example: Banco de Chile
                brand:
                  type: string
                  description: Brand of the card.
                  example: visa
                country:
                  type: string
                  description: >-
                    Display name of the country where the card was issued, in
                    English.
                  example: Chile
                kind:
                  type: string
                  description: Kind of card. One of `credit`, `debit`, or `prepaid`.
                  example: credit
                last_four_digits:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Last four digits of the card number. `null` when the digits
                    are not available.
                  example: '4242'
                wallet:
                  type:
                    - string
                    - 'null'
                  enum:
                    - apple_pay
                    - google_pay
                    - null
                  description: >-
                    Digital wallet used for the card payment. One of `apple_pay`
                    or `google_pay`. `null` for cards entered manually.
                  example: apple_pay
          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 (RUT in Chile, RFC in
                Mexico).
              example: '111111111'
            institution_id:
              type:
                - string
                - 'null'
              description: Identifier of the institution of the account.
              example: cl_banco_de_chile
            number:
              type:
                - string
                - 'null'
              description: Number of the account. In Mexico, the CLABE.
              example: '123456789'
            type:
              type:
                - string
                - 'null'
              description: >-
                Type of the account, such as `checking_account` or
                `sight_account`.
              example: checking_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 the customer pays from. `null` until Fintoc identifies
            the sender.
          properties:
            holder_id:
              type: string
              description: >-
                Tax identifier of the account holder (RUT in Chile, RFC in
                Mexico).
              example: '111111111'
            institution_id:
              type: string
              description: Identifier of the institution of the account.
              example: cl_banco_estado
            number:
              type: string
              description: Number of the account.
              example: '123456789'
            type:
              type: string
              description: >-
                Type of the account, such as `checking_account` or
                `sight_account`.
              example: checking_account
          required:
            - holder_id
            - number
            - type
            - institution_id
        status:
          type: string
          enum:
            - created
            - failed
            - succeeded
            - rejected
            - in_progress
            - pending
            - expired
          description: >-
            Status of the payment intent. One of `created` (the customer has not
            started the payment), `in_progress` (the customer is paying),
            `succeeded` (the money reached the recipient account), `rejected`
            (the institution rejected the transfer), `failed` (the payment could
            not be completed), `expired` (the payment intent expired before
            being paid), or `pending` (the final status is not yet known; only
            used if your organization has the pending status enabled).
          example: succeeded
        subscription:
          type:
            - string
            - 'null'
          description: >-
            Identifier of the subscription that originated the payment intent.
            `null` for one-off 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: '2021-10-15T15:24:15.474Z'
        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
    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
    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
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header

````