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

# 创建订阅

此接口允许您为客户创建新的订阅。创建订阅包括将客户与特定的订阅计划关联，并记录其付款信息。


## OpenAPI

````yaml openapi/zh/localpayment.json POST /api/payin/subscriptions
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/subscriptions:
    post:
      summary: 创建订阅
      operationId: create-a-subscription
      parameters:
        - name: Authorization
          in: header
          description: >-
            用于身份验证的 Bearer
            访问令牌。该令牌可从[获取访问令牌](/zh/reference/get-token)或[刷新访问令牌](/zh/reference/refresh-token)endpoint
            获取。
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                paymentMethod:
                  type: object
                  properties:
                    type:
                      type: string
                      description: '[支付方式类型](/zh/reference/get-available-payment-methods)。'
                    code:
                      type: string
                      description: '[支付方式代码](/zh/reference/get-available-payment-methods)。'
                    flow:
                      type: string
                      description: >-
                        定义支付数据的收集方式：`DIRECT` （在 API
                        请求中）或`REDIRECT`（外部形式）。仅`DIRECT`目前已支持。
                  required:
                    - type
                    - code
                    - flow
                  x-examples:
                    Example 1:
                      type: BankTransfer
                      code: '1005'
                      flow: DIRECT
                externalId:
                  type: string
                  description: 系统生成的唯一标识符，用于跟踪交易（包含字母、数字和连字符）。我们建议使用 UUID4 以确保唯一性。
                country:
                  type: string
                  enum:
                    - COL
                    - MEX
                    - PER
                  description: '[文件国家](/zh/reference/country-codes)。ISO 3166-1 alpha-3。'
                amount:
                  type: number
                  description: 交易金额。
                currency:
                  type: string
                  enum:
                    - COP
                    - MXN
                    - PEN
                    - USD
                  description: '[货币代码](/zh/reference/currency-codes)。'
                accountNumber:
                  type: string
                  description: Localpayment账号。
                conceptCode:
                  type: string
                  enum:
                    - '0001'
                    - '0002'
                    - '0003'
                    - '0004'
                    - '0005'
                    - '0006'
                    - '0007'
                    - '0008'
                    - '0009'
                    - '0010'
                    - '0011'
                    - '0012'
                    - '0013'
                    - '0014'
                    - '0015'
                    - '0016'
                    - '0017'
                    - '0018'
                    - '0019'
                    - '0020'
                    - '0021'
                    - '0022'
                    - '0023'
                    - '0024'
                    - '0025'
                    - '0026'
                    - '0027'
                    - '0028'
                    - '0029'
                    - '0030'
                    - '0031'
                    - '0032'
                    - '0033'
                    - '0034'
                    - '0035'
                    - '0036'
                    - '0037'
                    - '0038'
                    - '0039'
                    - '0040'
                  description: 付款原因[代码](/zh/reference/concept-codes)。
                comment:
                  type: string
                  description: 附加信息
                exchangeRateToken:
                  type: string
                  description: >-
                    由[外汇服务](/zh/reference/currency-exchange-quote)提供的令牌，用于使用预先约定的汇率。
                payer:
                  type: object
                  description: 付款人信息。
                  properties:
                    type:
                      type: string
                      enum:
                        - COMPANY
                        - INDIVIDUAL
                      description: 付款人类型。
                    name:
                      type: string
                      description: >-
                        付款人名称。允许的字符取决于 `type` 字段：对于
                        `individual`，允许字母（包括带重音符号的字符）、空格和点（`.`）；对于
                        `company`，允许相同字符集，另外还允许数字、下划线（`_`）和连字符（`-`）。
                      minLength: 2
                      maxLength: 255
                    lastName:
                      type: string
                      description: >-
                        付款人的姓氏。当 `type` 为 `individual` 时必填，当 `type` 为 `company`
                        时忽略。允许的字符取决于 `type`：对于
                        `individual`，允许字母（包括带重音符号的字符）、空格和点（`.`）；对于
                        `company`，允许相同字符集，另外还允许数字、下划线（`_`）和连字符（`-`）。
                      minLength: 2
                      maxLength: 255
                    document:
                      type: object
                      description: 付款人身份证明文件信息。
                      properties:
                        type:
                          type: string
                          description: >-
                            根据签发国家/地区的不同，[身份证明文件类型](/zh/reference/identity-document-types)可能包括国民身份证号码、社会保障号码或驾驶执照。
                          examples:
                            - RUC
                        id:
                          type: string
                          description: 身份证件号码（通常为数字）。该号码必须符合特定证件类型的有效规定。
                          examples:
                            - '1791234561009'
                      required:
                        - type
                        - id
                      examples:
                        - type: RUC
                          id: '1791234561009'
                    userReference:
                      type: string
                      description: 付款人在您平台上的用户名或 ID。
                    email:
                      type: string
                      description: 用户电子邮件。
                    phone:
                      type: object
                      description: 付款人电话号码。
                      properties:
                        countryCode:
                          type: string
                          description: 电话国家/地区代码。
                        areaCode:
                          type: string
                          description: 电话国家/地区区号。
                        number:
                          type: string
                          description: 电话号码。
                      required:
                        - countryCode
                        - areaCode
                        - number
                    birthDate:
                      type: string
                      description: 付款人的出生日期，格式为 `yyyy-mm-dd`。
                    nationality:
                      type: string
                      description: 付款人国籍。
                    address:
                      type: object
                      description: 付款人的地址。
                      properties:
                        street:
                          type: string
                          description: 街道名称。
                          examples:
                            - Independencia
                        number:
                          type: string
                          description: 街道号码。
                          examples:
                            - '123'
                        city:
                          type: string
                          description: 城市。
                          examples:
                            - Cordoba
                        state:
                          type: string
                          description: 州/省。
                          examples:
                            - Cordoba
                        country:
                          type: string
                          description: 地址所在国家/地区。
                          examples:
                            - Argentina
                        zipCode:
                          type: string
                          description: 邮政编码。
                          examples:
                            - X5000IUO
                        comment:
                          type: string
                          description: 其他地址信息。
                          examples:
                            - Sucursal 123
                      examples:
                        - street: Independencia
                          number: '123'
                          city: Cordoba
                          state: Cordoba
                          country: ARG
                          zipCode: X5000IUO
                          comment: Sucursal 123
                  required:
                    - type
                    - name
                    - document
                    - email
                    - phone
                  x-examples:
                    Example 1:
                      beneficiary:
                        type: COMPANY
                        name: ITAU ARG
                        document:
                          type: CUIT
                          id: '20907920276'
                        userReference: Lorem
                        email: aldana@mail.com
                        phone:
                          countryCode: countryCode
                          areaCode: areaCode
                          number: phoneNumber
                        birthDate: '2021-11-08'
                        nationality: beneficiary nationality
                        address:
                          street: Beneficiary adress
                          number: '234'
                          city: City
                          state: Villa Rosa
                          country: Country
                          zipCode: '1411'
                          comment: TEST
                        bank:
                          name: ARG TEST
                          code: '007'
                          account:
                            type: C
                            number: '1234567891234567891234'
                intermediaries:
                  type: array
                  description: >-
                    参与者对象数组。它代表支付链中的其他参与者，因为最终用户并非您的直接客户。请注意数组顺序：您的客户应为第一个元素，您客户的客户应为第二个元素，依此类推，直到没有其他中间商为止。
                device:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Android / iPhone 设备 ID。对于 PC / Mac 等其他设备类型，可以留空。
                    ip:
                      type: string
                      description: 设备 IP 地址
                    browser:
                      type: string
                      description: 设备浏览器。
                metaData:
                  type: string
                  description: 非结构化对象，用于记录对您有意义的任何元数据。
                commercialData:
                  type: object
                  description: 与所交易商品或服务相关的其他信息。
                  properties:
                    lastName:
                      type: string
                      description: >-
                        商业实体的姓氏。当该值代表个人时必填，当其代表公司时忽略。允许的字符：对于个人，允许字母（包括带重音符号的字符）、空格和点（`.`）；对于公司，允许相同字符集，另外还允许数字、下划线（`_`）和连字符（`-`）。
                      minLength: 2
                      maxLength: 255
                    name:
                      type: string
                      description: >-
                        商业实体的名称。允许的字符取决于该值代表个人还是公司：对于个人，允许字母（包括带重音符号的字符）、空格和点（`.`）；对于公司，允许相同字符集，另外还允许数字、下划线（`_`）和连字符（`-`）。
                      minLength: 2
                      maxLength: 255
                merchant:
                  type: object
                  description: 商家信息。
                  properties:
                    type:
                      type: string
                      description: 商家类型。
                    name:
                      type: string
                      description: >-
                        商家名称。允许的字符取决于 `type` 字段：对于
                        `individual`，允许字母（包括带重音符号的字符）、空格和点（`.`）；对于
                        `company`，允许相同字符集，另外还允许数字、下划线（`_`）和连字符（`-`）。
                      minLength: 2
                      maxLength: 255
                    lastName:
                      type: string
                      description: >-
                        商家的姓氏。当 `type` 为 `individual` 时必填，当 `type` 为 `company`
                        时忽略。允许的字符取决于 `type`：对于
                        `individual`，允许字母（包括带重音符号的字符）、空格和点（`.`）；对于
                        `company`，允许相同字符集，另外还允许数字、下划线（`_`）和连字符（`-`）。
                      minLength: 2
                      maxLength: 255
                    document:
                      type: object
                      description: 商户身份证明文件信息。
                      properties:
                        type:
                          type: string
                          description: >-
                            根据签发国家/地区的不同，[身份证明文件类型](/zh/reference/identity-document-types)可能包括国民身份证号码、社会保障号码或驾驶执照。
                          examples:
                            - RUC
                        id:
                          type: string
                          description: 身份证件号码（通常为数字）。该号码必须符合特定证件类型的有效规定。
                          examples:
                            - '1791234561009'
                      examples:
                        - type: RUC
                          id: '1791234561009'
                    phone:
                      type: object
                      description: 商家电话号码。
                      properties:
                        countryCode:
                          type: string
                          description: 电话国家/地区代码。
                        areaCode:
                          type: string
                          description: 电话国家/地区区号。
                        number:
                          type: string
                          description: 电话号码。
                    email:
                      type: string
                      description: 商家邮箱。
                    userReference:
                      type: string
                      description: 商家在您平台上的用户名或 ID。
                    address:
                      type: object
                      description: 商家地址。
                      properties:
                        street:
                          type: string
                          description: 街道名称。
                          examples:
                            - Independencia
                        number:
                          type: string
                          description: 街道号码。
                          examples:
                            - '123'
                        city:
                          type: string
                          description: 城市。
                          examples:
                            - Cordoba
                        state:
                          type: string
                          description: 州/省。
                          examples:
                            - Cordoba
                        country:
                          type: string
                          description: 地址所在国家/地区。
                          examples:
                            - Argentina
                        zipCode:
                          type: string
                          description: 邮政编码。
                          examples:
                            - X5000IUO
                        comment:
                          type: string
                          description: 其他地址信息。
                          examples:
                            - Sucursal 123
                      examples:
                        - street: Independencia
                          number: '123'
                          city: Cordoba
                          state: Cordoba
                          country: ARG
                          zipCode: X5000IUO
                          comment: Sucursal 123
                    nationality:
                      type: string
                      description: 商家的国籍。
                    birthDate:
                      type: string
                      description: 商家出生日期（yyyy-mm-dd 格式）。
                  x-examples:
                    Example 1:
                      merchant:
                        type: COMPANY
                        name: Merchant Name
                        lastName: Merchant LastName
                        document:
                          type: Type Document
                          id: ID Document
                        userReference: additional information
                        email: email@Merchant.address
                        phone:
                          countryCode: '55'
                          areaCode: '55'
                          number: '66666666'
                        birthDate: '2001-01-01'
                        nationality: Merchant Nacionality
                        address:
                          street: Av Merchant Address
                          number: '1234'
                          city: City Name
                          state: State Name
                          country: Country Name
                          zipCode: Zip Code
                          comment: Additional address information
                card:
                  type: object
                  description: 付款人借记卡数据。
                  properties:
                    name:
                      type: string
                      description: ' 持卡人姓名，与借记卡正面印刷的内容一致。'
                    number:
                      type: string
                      description: 卡号（PAN）。
                    cvv:
                      type: string
                      description: 卡片验证值
                    expirationMonth:
                      type: string
                      description: 卡片到期月份。格式为 `MM`。
                      examples:
                        - '01'
                    expirationYear:
                      type: string
                      description: 卡片到期年份。格式为 `YYYY`。
                      examples:
                        - '2025'
                    token:
                      type: string
                      description: 通过发送令牌来使用之前已令牌化的卡。
                  required:
                    - name
                    - number
                    - cvv
                    - expirationMonth
                    - expirationYear
                invoice:
                  type: string
                  description: 发票编号。
                item:
                  type: object
                  description: 已售商品清单。
                  properties:
                    id:
                      type: string
                      description: ' 物品 ID。'
                    quantity:
                      type: number
                      description: ' 物品 ID。'
                    categoryId:
                      type: string
                      description: 商品类别。
                    pictureUrl:
                      type: string
                      description: ' 指向物品图片的 URL。'
                    description:
                      type: string
                      description: 商品描述。
                    title:
                      type: string
                      description: "商品标题。\r\n"
                    unitPrice:
                      type: number
                      description: 单价
                shipments:
                  type: object
                  description: 收货地址列表
                  properties:
                    city:
                      type: string
                      description: 城市
                    number:
                      type: string
                      description: 门牌号
                    street:
                      type: string
                      description: 街道地址
                    country:
                      type: string
                      description: 国家/地区
                    state:
                      type: string
                      description: 州/省
                    comment:
                      type: string
                      description: 附加信息
                    zipCode:
                      type: string
                      description: 邮政编码
                beneficiary:
                  type: object
                  description: 账户受益人信息。
                  properties:
                    type:
                      type: string
                      enum:
                        - INDIVIDUAL
                        - COMPANY
                      description: 受益人类型。
                    name:
                      type: string
                      description: >-
                        受益人名称。允许的字符取决于 `type` 字段：对于
                        `individual`，允许字母（包括带重音符号的字符）、空格和点（`.`）；对于
                        `company`，允许相同字符集，另外还允许数字、下划线（`_`）和连字符（`-`）。
                      minLength: 2
                      maxLength: 255
                    lastName:
                      type: string
                      description: >-
                        受益人的姓氏。当 `type` 为 `individual` 时必填，当 `type` 为 `company`
                        时忽略。允许的字符取决于 `type`：对于
                        `individual`，允许字母（包括带重音符号的字符）、空格和点（`.`）；对于
                        `company`，允许相同字符集，另外还允许数字、下划线（`_`）和连字符（`-`）。
                      minLength: 2
                      maxLength: 255
                    document:
                      type: object
                      description: 受益人身份证明文件信息。
                      properties:
                        type:
                          type: string
                          description: >-
                            根据签发国家/地区的不同，[身份证明文件类型](/zh/reference/identity-document-types)可能包括国民身份证号码、社会保障号码或驾驶执照。
                        id:
                          type: string
                          description: 身份证件号码（通常为数字）。该号码必须符合特定证件类型的有效规定。
                type:
                  type: string
                  enum:
                    - SOFTWARE
                    - STREAMING
                    - CONTENT
                    - PRODUCTS
                    - MEMBERSHIP
                  description: 指定订阅类别。
                autoRecurring:
                  type: object
                  description: 订阅属性
                  properties:
                    type:
                      type: string
                      enum:
                        - day
                        - month
                        - custom
                      description: 定义周期性间隔单位。如需按需重复，请将该参数设置为 `value=custom`。
                    trialDays:
                      type: number
                      description: 订阅的试用天数。
                  required:
                    - type
                retry:
                  type: object
                  description: 支付重试选项。
                  properties:
                    repetitions:
                      type: number
                      description: 重试收款的次数。
                    intervalUnit:
                      type: string
                      enum:
                        - day
                        - hour
                      description: 执行重试所采用的时间单位。允许的值：`day` 和 `hour`。
                    intervalValue:
                      type: string
                      description: 重试的时间间隔。定义两次重试之间相隔的时间单位数。
                discount:
                  type: object
                  description: 折扣选项。
                  properties:
                    amount:
                      type: string
                      description: 向您的最终用户收取的金额。
                    period:
                      type: number
                      description: 折扣期限。
                  required:
                    - amount
                    - period
              required:
                - paymentMethod
                - externalId
                - country
                - amount
                - currency
                - accountNumber
                - conceptCode
                - payer
                - card
                - type
                - autoRecurring
              x-examples:
                Example 1:
                  paymentMethod:
                    type: CreditCard
                    code: '1000'
                    flow: DIRECT
                  externalId: '1662647310'
                  country: ARG
                  amount: 100
                  currency: ARS
                  accountNumber: '{{accountNumber}}'
                  conceptCode: '0001'
                  comment: subs test 1 del 7/9 xdia
                  merchant:
                    type: INDIVIDUAL
                    name: Obi Wan
                    lastname: Kenobi
                    document:
                      type: DNI
                      id: '12345678'
                    userReference: abc123
                    email: obiwankenobi@starwars.com
                    phone:
                      countryCode: '54'
                      areaCode: '11'
                      number: '98789632'
                    birthdate: '2000-01-01'
                    nationality: Argentinian
                    address:
                      street: Charruas
                      number: '938'
                      city: Hurlingham
                      state: state
                      country: ARG
                      zipCode: '1688'
                      comment: portero 801
                  payer:
                    type: INDIVIDUAL
                    name: Luke
                    lastname: Skywalker
                    document:
                      id: '37993830'
                      type: DNI
                    email: jane.doe@example.com
                    phone:
                      countryCode: '1'
                      areaCode: '11'
                      number: '98789632'
                    birthdate: 01/01/1990
                    nationality: American
                    address:
                      street: Siempre viva
                      number: '1234'
                      city: Springfield
                      state: Ohio
                      country: USA
                      zipCode: '1686'
                      comment: May the force be with you, always!
                  card:
                    name: APRO
                    number: '4509953566233704'
                    cvv: '123'
                    expirationMonth: '11'
                    expirationYear: '2025'
                    installments: 1
                  type: SOFTWARE
                  autoRecurring:
                    type: day
            examples:
              200 - Suscription:
                value:
                  paymentMethod:
                    type: CreditCard
                    code: '1000'
                    flow: DIRECT
                  externalId: 820d6e89-3715-4296-9975-def5c7750f65
                  country: ARG
                  amount: 100
                  currency: ARS
                  accountNumber: '{{accountNumber}}'
                  conceptCode: '0001'
                  comment: Test
                  merchant:
                    type: COMPANY
                    name: Company
                    document:
                      type: DNI
                      id: '12345678'
                    userReference: abc123
                    email: merchant@mail.com
                    phone:
                      countryCode: '54'
                      areaCode: '11'
                      number: '98781234'
                  payer:
                    type: INDIVIDUAL
                    name: John
                    lastname: Doe
                    document:
                      id: '37993812'
                      type: DNI
                    email: john.doe@example.com
                    phone:
                      countryCode: '1'
                      areaCode: '11'
                      number: '98789123'
                  card:
                    name: APRO
                    number: '4000000000000002'
                    cvv: '123'
                    expirationMonth: '11'
                    expirationYear: '2029'
                    installments: 1
                  type: SOFTWARE
                  autoRecurring:
                    type: day
              COL - Subscription:
                summary: COL - Subscription
                value:
                  paymentMethod:
                    type: CreditCard
                    code: '1900'
                    flow: DIRECT
                  externalId: 550e8400-e29b-41d4-a716-446655440000
                  country: COL
                  amount: 100
                  currency: COP
                  accountNumber: '{{yourLocalpaymentAccountNumber}}'
                  conceptCode: '0001'
                  comment: Subscription
                  merchant:
                    type: COMPANY
                    name: Example Company S.A.
                    document:
                      type: NIT
                      id: '900123456'
                  payer:
                    type: INDIVIDUAL
                    name: Jane
                    lastName: Doe
                    document:
                      type: CC
                      id: '1234567890'
                    email: jane.doe@example.com
                  card:
                    name: Jane Doe
                    number: '4000000000000002'
                    cvv: '123'
                    expirationMonth: '12'
                    expirationYear: '2029'
                    installments: 1
                  type: SOFTWARE
                  autoRecurring:
                    repetitions: 2
                    type: day
              PER - Subscription (PEN):
                summary: PER - Subscription (PEN)
                value:
                  paymentMethod:
                    type: CreditCard
                    code: '6000'
                    flow: DIRECT
                  externalId: 550e8400-e29b-41d4-a716-446655440000
                  country: PER
                  amount: 100
                  currency: PEN
                  accountNumber: '{{yourLocalpaymentAccountNumber}}'
                  conceptCode: '0001'
                  comment: Subscription
                  merchant:
                    type: COMPANY
                    name: Example Company S.A.
                    document:
                      type: RUC
                      id: '20123456789'
                  payer:
                    type: INDIVIDUAL
                    name: Jane
                    lastName: Doe
                    document:
                      type: DNI
                      id: '12345678'
                    email: jane.doe@example.com
                  card:
                    name: Jane Doe
                    number: '4000000000000002'
                    cvv: '123'
                    expirationMonth: '12'
                    expirationYear: '2029'
                    installments: 1
                  type: SOFTWARE
                  autoRecurring:
                    repetitions: 2
                    type: day
              PER - Subscription (USD):
                summary: PER - Subscription (USD)
                value:
                  paymentMethod:
                    type: CreditCard
                    code: '6004'
                    flow: DIRECT
                  externalId: 550e8400-e29b-41d4-a716-446655440000
                  country: PER
                  amount: 100
                  currency: USD
                  accountNumber: '{{yourLocalpaymentAccountNumber}}'
                  conceptCode: '0001'
                  comment: Subscription
                  merchant:
                    type: COMPANY
                    name: Example Company S.A.
                    document:
                      type: RUC
                      id: '20123456789'
                  payer:
                    type: INDIVIDUAL
                    name: Jane
                    lastName: Doe
                    document:
                      type: DNI
                      id: '12345678'
                    email: jane.doe@example.com
                  card:
                    name: Jane Doe
                    number: '4000000000000002'
                    cvv: '123'
                    expirationMonth: '12'
                    expirationYear: '2029'
                    installments: 1
                  type: SOFTWARE
                  autoRecurring:
                    repetitions: 2
                    type: day
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscriptionId:
                    type: string
                    description: 订阅的唯一标识符。
                  status:
                    type: object
                    title: 状态
                    description: 操作状态。
                    properties:
                      code:
                        type: string
                        description: '[状态码](/zh/reference/transaction-status-error-codes)。'
                      description:
                        type: string
                        description: '[状态描述](/zh/reference/transaction-status-error-codes)。'
                      detail:
                        type: string
                        description: 更多状态信息。
                  creationDate:
                    type: string
                    description: 订阅创建的日期和时间。时间戳遵循 ISO 8601 格式。
                  nextPaymentDate:
                    type: string
                    description: 订阅下次付款的日期和时间。时间戳采用 ISO 8601 格式。
                  payments:
                    type: array
                    description: 表示与订阅相关的付款对象的数组。
                    items:
                      type: object
                      properties:
                        externalId:
                          type: string
                          description: 系统生成的唯一标识符，用于跟踪交易（包含字母、数字和连字符）。我们建议使用 UUID4 以确保唯一性。
                        internalId:
                          type: string
                          description: Localpayment交易标识符。
                        status:
                          type: object
                          title: 状态
                          description: 操作状态。
                          properties:
                            code:
                              type: string
                              description: >-
                                [状态码](/zh/reference/transaction-status-error-codes)。
                            description:
                              type: string
                              description: >-
                                [状态描述](/zh/reference/transaction-status-error-codes)。
                            detail:
                              type: string
                              description: 更多状态信息。
                x-examples:
                  Example 1:
                    subscriptionId: 133640f9-ac06-49fc-aa82-08bfe52ceb5e
                    status:
                      code: '105'
                      description: INPROGRESS
                      detail: The subscription is in progress
                    creationDate: '2022-05-31T15:05:47.665+00:00'
                    nextPaymentDate: '2022-06-30T15:05:47.665+00:00'
                    payments:
                      - externalId: bb7d32e5-04da-4b8a-856f-8caf89d986ea
                        internalId: 9977c353-ce00-48fd-b3ac-f685bce30895
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
              examples:
                200 - Subscription:
                  value:
                    subscriptionId: 133640f9-ac16-49fc-aa82-08bfe52ceb5e
                    status:
                      code: '105'
                      description: INPROGRESS
                      detail: The subscription is in progress
                    creationDate: '2024-05-31T15:05:47.665+00:00'
                    nextPaymentDate: '2024-06-30T15:05:47.665+00:00'
                    payments:
                      - externalId: bb7d3235-04da-4b8a-85bf-8caf89d986ea
                        internalId: 9977c453-ce00-48fd-baac-f685bce30895
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
                COL - Subscription:
                  summary: COL - Subscription
                  value:
                    type: SOFTWARE
                    externalId: 550e8400-e29b-41d4-a716-446655440000
                    internalId: 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
                    country: COL
                    currency: COP
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    status:
                      code: '105'
                      description: ACTIVE
                      detail: The subscription is active
                    date:
                      creationDate: '2024-01-15T10:30:00Z'
                      nextPaymentDate: '2024-01-16T10:30:00Z'
                    payments:
                      - externalId: f47ac10b-58cc-4372-a567-0e02b2c3d479
                        internalId: 9b2e4c1d-7a3f-4e8b-b6d5-2c1f0a9e8d7c
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
                    errors: []
                PER - Subscription (PEN):
                  summary: PER - Subscription (PEN)
                  value:
                    type: SOFTWARE
                    externalId: 550e8400-e29b-41d4-a716-446655440000
                    internalId: 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
                    country: PER
                    currency: PEN
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    status:
                      code: '105'
                      description: ACTIVE
                      detail: The subscription is active
                    date:
                      creationDate: '2024-01-15T10:30:00Z'
                      nextPaymentDate: '2024-01-16T10:30:00Z'
                    payments:
                      - externalId: f47ac10b-58cc-4372-a567-0e02b2c3d479
                        internalId: 9b2e4c1d-7a3f-4e8b-b6d5-2c1f0a9e8d7c
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
                    errors: []
                PER - Subscription (USD):
                  summary: PER - Subscription (USD)
                  value:
                    type: SOFTWARE
                    externalId: 550e8400-e29b-41d4-a716-446655440000
                    internalId: 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
                    country: PER
                    currency: USD
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    status:
                      code: '105'
                      description: ACTIVE
                      detail: The subscription is active
                    date:
                      creationDate: '2024-01-15T10:30:00Z'
                      nextPaymentDate: '2024-01-16T10:30:00Z'
                    payments:
                      - externalId: f47ac10b-58cc-4372-a567-0e02b2c3d479
                        internalId: 9b2e4c1d-7a3f-4e8b-b6d5-2c1f0a9e8d7c
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
                    errors: []
        '400':
          description: 错误的请求。
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    title: 状态
                    description: 操作状态。
                    properties:
                      code:
                        type: string
                        description: '[状态码](/zh/reference/transaction-status-error-codes)。'
                      description:
                        type: string
                        description: '[状态描述](/zh/reference/transaction-status-error-codes)。'
                      detail:
                        type: string
                        description: 更多状态信息。
                  errors:
                    type: array
                    description: 交易过程中发生的错误列表。
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          description: 错误代码。
                        detail:
                          type: string
                          description: 错误详情。
                x-examples:
                  Example 1:
                    status:
                      code: '501'
                      description: REJECTED
                      detail: Country not found
                    errors:
                      - code: '501'
                        detail: Country not found
                      - code: '817'
                        detail: Invalid concept code
              examples:
                501 - Country not found:
                  value:
                    status:
                      code: '501'
                      description: REJECTED
                      detail: Country not found
                    errors:
                      - code: '501'
                        detail: Country not found
                      - code: '817'
                        detail: Invalid concept code
        '401':
          description: 未经授权。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: 回复的补充信息。
                  code:
                    type: string
                    description: 状态码。
                  messages:
                    type: array
                    description: 消息列表。
                    items:
                      type: object
                      properties:
                        token_class:
                          type: string
                          description: Token 类。
                        token_type:
                          type: string
                          description: 令牌类型。
                        message:
                          type: string
                          description: 包含补充信息的消息。
                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
      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.