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

# Create Installment Plan

This endpoint creates an installment plan for a Payin transaction, allowing you to offer customers the flexibility to pay for their purchases in installments. You can specify the number of installments, the installment amount, and other relevant details. The response will include the installment plan details, such as the total amount to be paid and the due dates for each installment.

> **Token Expiration**
>
> The token provided in the response is valid for **10 minutes** from the moment it is generated. After this period, the token will expire and can no longer be used for processing installment plans.


## OpenAPI

````yaml openapi/localpayment.json POST /api/payin/installments-plan
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/payin/installments-plan:
    post:
      summary: Create Installment Plan
      operationId: installments
      parameters:
        - name: Authorization
          in: header
          description: >-
            Bearer access token for authentication. This token is obtained from
            the [Get Access Token](/reference/get-token) or [Refresh Access
            Token](/reference/refresh-token) endpoints.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                paymentMethod:
                  type: object
                  properties:
                    code:
                      type: string
                      description: >-
                        [Payment method
                        code](/reference/get-available-payment-methods).
                  required:
                    - code
                country:
                  type: string
                  description: '[Country](/reference/country-codes). ISO 3166-1 alpha-3.'
                currency:
                  type: string
                  description: '[currency code](/reference/currency-codes).'
                amount:
                  type: number
                  description: Total amount.
                accountNumber:
                  type: string
                  description: Localpayment account number.
              required:
                - paymentMethod
                - country
                - currency
                - amount
                - accountNumber
              x-examples:
                Example 1:
                  paymentMethod:
                    code: '1000'
                  country: ARG
                  currency: ARS
                  amount: 2000
                  accountNumber: '{{accountNumber}}'
            examples:
              200 - Installment Plan:
                value:
                  paymentMethod:
                    code: '1000'
                  country: ARG
                  currency: ARS
                  amount: 1000
                  accountNumber: '{{accountNumber}}'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  installmentsToken:
                    type: string
                    description: >-
                      Unique identifier for the installment plan. This token is
                      used to reference the specific installment options
                      generated for a transaction.
                  creationDate:
                    type: string
                    description: >-
                      Date and time when the installment plan was created. The
                      timestamp follows the ISO 8601 format.
                  expirationDate:
                    type: string
                    description: >-
                      Date and time when the installment plan expires. After
                      this time, the plan can no longer be used. The timestamp
                      follows the ISO 8601 format.
                  currency:
                    type: string
                    description: '[Currency codes](/reference/currency-codes).'
                  amount:
                    type: number
                    description: >-
                      Total amount of the transaction for which the installment
                      plan was generated.
                  installments:
                    type: array
                    description: >-
                      Array of objects representing different installment
                      options available for the transaction.
                    items:
                      type: object
                      properties:
                        installments:
                          type: integer
                          description: Number of installments available for this option.
                        installmentAmount:
                          type: number
                          description: Amount to be paid in each installment.
                        totalPaymentAmount:
                          type: number
                          description: >-
                            Total amount to be paid over all installments,
                            including any financing fees.
                        amountWithInternalFee:
                          type: number
                          description: >-
                            Total amount including internal fees (if
                            applicable).
                        financingFee:
                          type: number
                          description: >-
                            Additional fee charged for financing the transaction
                            over the selected number of installments.
                x-examples:
                  Example 1:
                    installmentsToken: b71a6973-ffdc-427b-b014-e03eb4462e82
                    creationDate: '2022-03-29T23:53:52.7150456+00:00'
                    expirationDate: '2022-03-30T00:03:52.71509+00:00'
                    currency: ARS
                    amount: 2000
                    installments:
                      - installments: 2
                        installmentAmount: 1100
                        totalPaymentAmount: 2200
                        amountWithInternalFee: 2200
                        financingFee: 200
                      - installments: 3
                        installmentAmount: 941.7187
                        totalPaymentAmount: 2825.156
                        amountWithInternalFee: 2360
                        financingFee: 825.156
                      - installments: 6
                        installmentAmount: 633.17334
                        totalPaymentAmount: 3799.04
                        amountWithInternalFee: 2800
                        financingFee: 1799.04
              examples:
                200 - Installments.:
                  value:
                    installmentsToken: b71a1973-cfdc-4a7b-b014-e03eb4462e82
                    creationDate: '2025-01-01T23:53:52.7150456+00:00'
                    expirationDate: '2025-01-30T00:03:52.71509+00:00'
                    currency: ARS
                    amount: 2000
                    installments:
                      - installments: 2
                        installmentAmount: 1100
                        totalPaymentAmount: 2200
                        amountWithInternalFee: 2200
                        financingFee: 200
                      - installments: 3
                        installmentAmount: 941.7187
                        totalPaymentAmount: 2825.156
                        amountWithInternalFee: 2360
                        financingFee: 825.156
                      - installments: 6
                        installmentAmount: 633.17334
                        totalPaymentAmount: 3799.04
                        amountWithInternalFee: 2800
                        financingFee: 1799.04
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Additional information of the response.
                  code:
                    type: string
                    description: Status code.
                  messages:
                    type: array
                    description: Message list.
                    items:
                      type: object
                      properties:
                        token_class:
                          type: string
                          description: Token class.
                        token_type:
                          type: string
                          description: Token type.
                        message:
                          type: string
                          description: Message with additional information.
                x-examples:
                  Example 1:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
              examples:
                401 - Token is invalid or expired:
                  value:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
        '404':
          description: Not Found
      security:
        - token: []
      servers:
        - url: https://api.stage.localpayment.com
          description: Stage
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.