> ## 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 GET /api/subscriptions/{externalId}
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/subscriptions/{externalId}:
    get:
      summary: 查看订阅
      operationId: get-api-subscriptions-externalID
      parameters:
        - name: Authorization
          in: header
          description: >-
            用于身份验证的 Bearer
            访问令牌。该令牌可从[获取访问令牌](/zh/reference/get-token)或[刷新访问令牌](/zh/reference/refresh-token)endpoint
            获取。
          required: true
          schema:
            type: string
        - name: externalId
          in: path
          description: 订阅 ID。
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  externalId:
                    type: string
                    description: 系统生成的唯一标识符，用于跟踪交易（包含字母、数字和连字符）。我们建议使用 UUID4 以确保唯一性。
                  subscriptionId:
                    type: string
                    description: 订阅创建时即分配了 ID。
                  status:
                    type: object
                    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: 更多状态信息。
                  totalPayments:
                    type: integer
                    description: 已支付款项总数。
                  pendingPayments:
                    type: integer
                    description: 尚未收回的款项数量。
                  creationDate:
                    type: string
                    description: 订阅创建日期。
                  nextPaymentDate:
                    type: string
                    description: 下次付款日期。
                  request:
                    type: object
                    properties:
                      payer:
                        type: object
                        description: "付款人信息。\r\n\r\n"
                        properties:
                          type:
                            type: string
                            enum:
                              - COMPANY
                              - INDIVIDUAL
                            description: 付款人类型。
                          name:
                            type: string
                            description: "付款人姓名。\r\n\r\n"
                          lastname:
                            type: string
                            description: "付款人姓氏。\r\n\r\n"
                          email:
                            type: string
                            description: "付款人邮箱。\r\n\r\n"
                          phone:
                            type: object
                            description: "付款人电话号码。\r\n\r\n"
                            properties:
                              number:
                                type: string
                                description: "电话国家/地区代码。\r\n\r\n"
                              areaCode:
                                type: string
                                description: "电话国家/地区区号。\r\n\r\n"
                              countryCode:
                                type: string
                                description: "电话号码。\r\n\r\n"
                          address:
                            type: object
                            description: "付款人的地址。\r\n\r\n"
                            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: "邮政编码。\r\n\r\n"
                                examples:
                                  - X5000IUO
                              comment:
                                type: string
                                description: 其他地址信息。
                                examples:
                                  - Sucursal 123
                          document:
                            type: object
                            description: "身份证件信息。\r\n\r\n"
                            properties:
                              id:
                                type: string
                                description: >-
                                  根据签发国家/地区的不同，[身份证明文件类型](/zh/reference/identity-document-types)可能包括国民身份证号码、社会保障号码或驾驶执照。
                              type:
                                type: string
                                description: "身份证件号码（通常为数字）。该号码必须符合特定证件类型的有效规定。\r\n\r\n"
                          birthdate:
                            type: string
                            description: "付款人出生日期（yyyy-mm-dd 格式）。\r\n\r\n"
                          nationality:
                            type: string
                            description: "付款人国籍。\r\n\r\n"
                          userReference:
                            type: string
                            description: "付款人在您平台上的用户名或 ID。\r\n\r\n"
                        required:
                          - type
                      amount:
                        type: number
                        description: 交易金额。
                      device:
                        type: object
                        properties:
                          id:
                            type: string
                            description: 可选。Android / iPhone 设备 ID。对于 PC / Mac 等其他设备类型可留空。
                          ip:
                            type: string
                            description: "设备 IP 地址\r\n\r\n"
                          browser:
                            type: string
                            description: 浏览器
                      comment:
                        type: string
                        description: "附加信息\r\n\r\n"
                      country:
                        type: string
                        enum:
                          - COL
                          - MEX
                          - PER
                        description: >-
                          [文件国家](/zh/reference/country-codes)。ISO 3166-1
                          alpha-3。
                      currency:
                        type: string
                        enum:
                          - COP
                          - MXN
                          - PEN
                          - USD
                        description: '[货币代码](/zh/reference/currency-codes)'
                      metaData:
                        type: string
                        description: 非结构化对象，用于记录对您有意义的任何元数据。
                      accountNumber:
                        type: string
                        description: Localpayment账号。
                      externalId:
                        type: string
                        description: "系统生成的唯一标识符，用于跟踪交易（包含字母、数字和连字符）。我们建议使用 UUID4 以确保唯一性。\r\n\r\n"
                      beneficiary:
                        type: object
                        description: "账户受益人信息。\r\n\r\n"
                        properties:
                          type:
                            type: string
                            enum:
                              - INDIVIDUAL
                              - COMPANY
                            description: 受益人类型。
                          name:
                            type: string
                            description: 受益人姓名。
                          email:
                            type: string
                            description: 受益人电子邮件地址。
                          phone:
                            type: object
                            description: "受益人的电话号码。\r\n\r\n"
                            properties:
                              countryCode:
                                type: string
                                description: "电话国家/地区代码。\r\n\r\n"
                              areaCode:
                                type: string
                                description: "电话国家/地区区号。\r\n\r\n"
                              number:
                                type: string
                                description: "电话号码。\r\n\r\n\r\n"
                          address:
                            type: object
                            description: 受益人地址。
                            properties:
                              city:
                                type: string
                                description: 城市
                              state:
                                type: string
                                description: 州/省
                              number:
                                type: string
                                description: " 地址门牌号。\r\n\r\n"
                              street:
                                type: string
                                description: 地址街道。
                              country:
                                type: string
                                description: 国家/地区
                              zipCode:
                                type: string
                                description: "邮政编码\r\n\r\n"
                              comment:
                                type: string
                                description: "附加信息\r\n\r\n"
                          document:
                            type: object
                            description: 受益人身份证明文件信息。
                            properties:
                              id:
                                type: string
                                description: >-
                                  根据签发国家/地区的不同，[身份证明文件类型](/zh/reference/identity-document-types)可能包括国民身份证号码、社会保障号码或驾驶执照。
                              type:
                                type: string
                                description: "身份证件号码（通常为数字）。该号码必须符合特定证件类型的有效规定。\r\n\r\n"
                          lastname:
                            type: string
                            description: 受益人的姓氏。
                          merchant:
                            type: string
                            description: 受益人的商户名称。
                          birthdate:
                            type: string
                            description: 受益人的出生日期，格式为 `yyyy-mm-dd format`。
                          nationality:
                            type: string
                            description: 受益人国籍
                      conceptCode:
                        type: string
                        description: 付款原因[代码](/zh/reference/concept-codes)。
                      autoRecurring:
                        type: object
                        description: 订阅属性
                        properties:
                          nextPayment:
                            type: string
                            description: 下次付款日期。
                          repetitions:
                            type: integer
                            description: "此付款将被收取的次数。**按需重复收款时，请将该参数设为 value=0**。\r\n\r\n"
                      paymentMethod:
                        type: object
                        properties:
                          type:
                            type: string
                            description: >-
                              `payinPaymentMethods.paymentMethodType`
                              [属性](/zh/reference/get-available-payment-methods)中提供的支付方式。
                          code:
                            type: string
                            description: >-
                              `payinPaymentMethods.paymentMethodType`
                              [属性](/zh/reference/get-available-payment-methods)中提供的支付方式。
                          flow:
                            type: string
                            description: >-
                              定义支付数据的收集方式：`DIRECT` （在 API
                              请求中）或`REDIRECT`（外部形式）。仅`DIRECT`目前已支持。
                      commercialData:
                        type: object
                        properties:
                          items:
                            type: array
                            description: 已售商品清单。
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  description: "商品 ID。\r\n\r\n"
                                title:
                                  type: string
                                  description: "商品标题。\r\n\r\n"
                                quantity:
                                  type: string
                                  description: "商品 ID。\r\n\r\n"
                                unitPrice:
                                  type: number
                                  description: "单价\r\n\r\n"
                                categoryId:
                                  type: string
                                  description: "商品类别。\r\n\r\n"
                                pictureUrl:
                                  type: string
                                  description: "单价\r\n\r\n"
                                description:
                                  type: string
                                  description: "商品描述。\r\n\r\n"
                          invoice:
                            type: string
                            description: "发票编号。\r\n\r\n"
                          shipments:
                            type: array
                            description: 收货地址列表
                            items:
                              type: object
                              properties:
                                street:
                                  type: string
                                  description: 街道
                                number:
                                  type: string
                                  description: '号码 '
                                city:
                                  type: string
                                  description: 城市
                                state:
                                  type: string
                                  description: 州/省
                                country:
                                  type: string
                                  description: 国家/地区
                                zipCode:
                                  type: string
                                  description: "邮政编码\r\n\r\n"
                                comment:
                                  type: string
                                  description: "附加信息\r\n\r\n"
                      intermediaries:
                        type: array
                        description: >-
                          参与者对象数组。它代表支付链中的其他参与者，因为最终用户并非您的直接客户。请注意数组顺序：您的客户应为第一个元素，您客户的客户应为第二个元素，依此类推，直到没有其他中间商为止。
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - COMPANY
                                - INDIVIDUAL
                              description: '中介类型。 '
                            name:
                              type: string
                              description: 中介机构名称。
                            lastname:
                              type: string
                              description: 中介的姓氏。
                            email:
                              type: string
                              description: 中介机构的电子邮件。
                            phone:
                              type: object
                              description: 中介电话号码。
                              properties:
                                countryCode:
                                  type: string
                                  description: "电话国家/地区代码。\r\n\r\n"
                                areaCode:
                                  type: string
                                  description: "电话国家/地区区号。\r\n\r\n"
                                number:
                                  type: string
                                  description: "电话号码。\r\n\r\n"
                            address:
                              type: object
                              description: 中介机构地址。
                              properties:
                                street:
                                  type: string
                                  description: 街道名称。
                                number:
                                  type: string
                                  description: 街道号码。
                                city:
                                  type: string
                                  description: 城市
                                state:
                                  type: string
                                  description: 州/省
                                country:
                                  type: string
                                  description: "地址所在国家/地区。\r\n\r\n"
                                zipCode:
                                  type: string
                                  description: "邮政编码。\r\n\r\n"
                                comment:
                                  type: string
                                  description: "其他地址信息。\r\n\r\n"
                            document:
                              type: object
                              description: 中介机构身份证明文件。
                              properties:
                                type:
                                  type: string
                                  description: >-
                                    根据签发国家/地区的不同，[身份证明文件类型](/zh/reference/identity-document-types)可能包括国民身份证号码、社会保障号码或驾驶执照。
                                id:
                                  type: string
                                  description: 身份证件号码（通常为数字）。该号码必须符合特定证件类型的有效规定。
                            birthdate:
                              type: string
                              description: 中间人的出生日期。
                            nationality:
                              type: string
                              description: 中介机构的国籍。
                      exchangeRateToken:
                        type: string
                        description: >-
                          由[外汇服务](/zh/reference/currency-exchange-quote)提供的令牌，用于使用预先约定的汇率。
                    required:
                      - payer
                      - amount
                  payments:
                    type: array
                    items:
                      type: object
                      properties:
                        internalId:
                          type: string
                          description: Localpayment交易标识符。
                        status:
                          type: object
                          description: 操作状态。
                          properties:
                            code:
                              type: string
                              description: >-
                                [状态码](/zh/reference/transaction-status-error-codes)。
                            description:
                              description: >-
                                [状态描述](/zh/reference/transaction-status-error-codes)。
                            detail:
                              type: string
                              description: 更多状态信息。
                  retries:
                    type: integer
                    description: 重试次数。
                required:
                  - externalId
                  - subscriptionId
                  - status
                  - totalPayments
                  - pendingPayments
                  - creationDate
                  - nextPaymentDate
                  - request
                  - payments
                x-examples:
                  Example 1:
                    externalId: '1623540689'
                    subscriptionId: ad5bb089-1095-446f-88ca-3bf2fae3610d
                    status:
                      code: '202'
                      description: COMPLETED
                      detail: The subscription was completed
                    totalPayments: 2
                    pendingPayments: 0
                    creationDate: '2021-06-12T23:31:29.869+00:00'
                    nextPaymentDate: '2021-03-14T03:00:00.000+00:00'
                    request:
                      payer:
                        name: Fernando
                        type: INDIVIDUAL
                        email: jane.doe@example.com
                        phone:
                          number: '98789632'
                          areaCode: '11'
                          countryCode: '1'
                        address:
                          city: Temperley
                          state: state
                          number: '1234'
                          street: Siempre viva
                          comment: timbre roto, llamar
                          country: ARG
                          zipCode: '1686'
                        document:
                          id: '37993830'
                          type: DNI
                        lastname: Gomez
                        birthdate: 01/01/1990
                        nationality: Argentino
                        userReference: identificador del pagador
                      amount: 150
                      device:
                        id: Android 9
                        ip: 127.111.142
                        browser: Google Chrome
                      comment: Primer pago
                      country: ARG
                      currency: ARS
                      metaData:
                        algoDelCliente: informacion adicional del cliente
                      clientCode: '0002'
                      externalId: '1623540689'
                      beneficiary:
                        name: Example Company S.A.
                        type: COMPANY
                        email: company@example.com
                        phone:
                          number: '98789632'
                          areaCode: '11'
                          countryCode: '1'
                        address:
                          city: Hurlingham
                          state: state
                          number: '938'
                          street: Charruas
                          comment: portero 801
                          country: ARG
                          zipCode: '1688'
                        document:
                          id: '30558251405'
                          type: CUIT
                        lastname: Solo si es type INDIVIDUAL
                        merchant: EXAMPLE001
                        birthdate: '1994-02-20'
                        nationality: Argentino
                      conceptCode: String
                      accountNumber: '{{accountNumber}}'
                      autoRecurring:
                        nextPayment: '2021-01-13'
                        repetitions: 2
                      paymentMethod:
                        code: '1000'
                        flow: DIRECT
                        type: CreditCard
                      commercialData:
                        items:
                          - id: PR0001
                            title: Point Mini
                            quantity: '1'
                            unitPrice: 58.8
                            categoryId: electronics
                            pictureUrl: >-
                              https://http2.mlstatic.com/resources/frontend/statics/growth-sellers-landings/device-mlb-point-i_medium@2x.png
                            description: >-
                              Producto Point para cobros con tarjetas mediante
                              bluetooth
                        invoice: Refencia a una factura
                        shipments:
                          - city: Temperley
                            state: state
                            number: '1234'
                            street: Siempre viva
                            comment: timbre roto, llamar
                            country: ARG
                            zipCode: '1686'
                      intermediaries:
                        - name: Fernando
                          type: INDIVIDUAL
                          email: jane.doe@example.com
                          phone:
                            number: '98789632'
                            areaCode: '11'
                            countryCode: '1'
                          address:
                            city: Temperley
                            state: state
                            number: '1234'
                            street: Siempre viva
                            comment: timbre roto, llamar
                            country: ARG
                            zipCode: '1686'
                          document:
                            id: '37993830'
                            type: DNI
                          lastname: Gomez
                          birthdate: 01/01/1990
                          nationality: Argentino
                      exchangeRateToken: String
                    payments:
                      - internalId: 9341125e-6f24-4141-adb5-b2e555d58558
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
                      - internalId: 887517fe-d052-4634-8d85-f1e632d3357e
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
                    retries: 0
              examples:
                202 - Completed:
                  value:
                    externalId: '1623540689'
                    subscriptionId: ad5bb089-1095-446f-88ca-3bf2fae3610d
                    status:
                      code: '202'
                      description: COMPLETED
                      detail: The subscription was completed
                    totalPayments: 2
                    pendingPayments: 0
                    creationDate: '2021-06-12T23:31:29.869+00:00'
                    nextPaymentDate: '2021-03-14T03:00:00.000+00:00'
                    request:
                      payer:
                        name: Fernando
                        type: INDIVIDUAL
                        email: jane.doe@example.com
                        phone:
                          number: '98789632'
                          areaCode: '11'
                          countryCode: '1'
                        address:
                          city: Temperley
                          state: state
                          number: '1234'
                          street: Siempre viva
                          comment: timbre roto, llamar
                          country: ARG
                          zipCode: '1686'
                        document:
                          id: '37993830'
                          type: DNI
                        lastname: Gomez
                        birthdate: 01/01/1990
                        nationality: Argentino
                        userReference: identificador del pagador
                      amount: 150
                      device:
                        id: Android 9
                        ip: 127.111.142
                        browser: Google Chrome
                      comment: Primer pago
                      country: ARG
                      currency: ARS
                      metaData:
                        algoDelCliente: informacion adicional del cliente
                      clientCode: '0002'
                      externalId: '1623540689'
                      beneficiary:
                        name: Example Company S.A.
                        type: COMPANY
                        email: company@example.com
                        phone:
                          number: '98789632'
                          areaCode: '11'
                          countryCode: '1'
                        address:
                          city: Hurlingham
                          state: state
                          number: '938'
                          street: Charruas
                          comment: portero 801
                          country: ARG
                          zipCode: '1688'
                        document:
                          id: '30558251405'
                          type: CUIT
                        lastname: Solo si es type INDIVIDUAL
                        merchant: EXAMPLE001
                        birthdate: '1994-02-20'
                        nationality: Argentino
                      conceptCode: String
                      accountNumber: '{{accountNumber}}'
                      autoRecurring:
                        nextPayment: '2021-01-13'
                        repetitions: 2
                      paymentMethod:
                        code: '1000'
                        flow: DIRECT
                        type: CreditCard
                      commercialData:
                        items:
                          - id: PR0001
                            title: Point Mini
                            quantity: '1'
                            unitPrice: 58.8
                            categoryId: electronics
                            pictureUrl: >-
                              https://http2.mlstatic.com/resources/frontend/statics/growth-sellers-landings/device-mlb-point-i_medium@2x.png
                            description: >-
                              Producto Point para cobros con tarjetas mediante
                              bluetooth
                        invoice: Refencia a una factura
                        shipments:
                          - city: Temperley
                            state: state
                            number: '1234'
                            street: Siempre viva
                            comment: timbre roto, llamar
                            country: ARG
                            zipCode: '1686'
                      intermediaries:
                        - name: Fernando
                          type: INDIVIDUAL
                          email: jane.doe@example.com
                          phone:
                            number: '98789632'
                            areaCode: '11'
                            countryCode: '1'
                          address:
                            city: Temperley
                            state: state
                            number: '1234'
                            street: Siempre viva
                            comment: timbre roto, llamar
                            country: ARG
                            zipCode: '1686'
                          document:
                            id: '37993830'
                            type: DNI
                          lastname: Gomez
                          birthdate: 01/01/1990
                          nationality: Argentino
                      exchangeRateToken: String
                    payments:
                      - internalId: 9341125e-6f24-4141-adb5-b2e555d58558
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
                      - internalId: 887517fe-d052-4634-8d85-f1e632d3357e
                        status:
                          code: '103'
                          description: APPROVED
                          detail: The payin was confirmed but not credited yet
                    retries: 0
        '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: 包含补充信息的消息。
                required:
                  - detail
                  - code
                  - messages
                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: 未找到
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    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:
                    status:
                      code: '404'
                      description: ERROR
                      detail: Subscription not found
              examples:
                404 - Subscription not found:
                  value:
                    status:
                      code: '404'
                      description: ERROR
                      detail: Subscription 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.