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

# 获取虚拟账户状态

此接口用于检索您之前使用[创建虚拟账户](https://docs.localpayment.com/zh/reference/create-virtual-account.md)接口创建的特定虚拟账户的状态和详细信息。您可以使用此接口检查账户是否处于活动状态并可以接收付款。


## OpenAPI

````yaml openapi/zh/localpayment.json GET /api/virtual-account/{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/virtual-account/{externalId}:
    get:
      summary: 获取虚拟账户状态
      operationId: get-virtual-account-status
      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: >-
            您要管理的虚拟帐户的唯一标识符。此标识符必须与您创建帐户时提供的 externalId
            值完全一致。使用此标识符可以指定目标帐户，以便执行诸如检索帐户状态或删除帐户等操作。
          required: true
          schema:
            type: string
            pattern: '[a-zA-Z0-9\- ]+'
            examples:
              - 9c590364-b6b4-116b-cf09-d63e8681c8fc
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  currency:
                    type: string
                    enum:
                      - ARS
                      - BRL
                      - CLP
                      - USD
                      - MXN
                      - PEN
                    description: '[货币代码](/zh/reference/currency-codes)。'
                  externalId:
                    type: string
                    description: 虚拟账户的唯一标识符。这与您请求中提供的 externalId 相同，确认返回的数据与正确的账户相符。
                  internalId:
                    type: string
                    description: Localpayment交易标识符。
                  accountNumber:
                    type: string
                    description: Localpayment账号。
                  beneficiary:
                    type: object
                    title: 受益人
                    description: 接收存入此虚拟账户资金的个人或实体。受益人是资金的最终接收者，但不一定是虚拟账户本身的合法所有者或持有人。
                    properties:
                      type:
                        type: string
                        enum:
                          - COMPANY
                          - INDIVIDUAL
                        description: 受益人类型。
                      name:
                        type: string
                        description: 受益人姓名。
                      lastName:
                        type: string
                        description: 受益人的姓氏。
                      fullName:
                        type: string
                        description: 受益人全名。
                      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'
                      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: 地址所在国家/地区。
                          zipCode:
                            type: string
                            description: 邮政编码。
                          comment:
                            type: string
                            description: 其他地址信息。
                      bank:
                        type: object
                        properties:
                          branch:
                            type: object
                            description: 银行网点详细信息。
                            properties:
                              code:
                                type: string
                                description: 分行代码。
                              name:
                                type: string
                                description: 分行名称
                          account:
                            type: object
                            description: 受益人银行账户详情。
                            properties:
                              number:
                                type: string
                                description: 账号。
                              aliases:
                                type: array
                                description: 账户别名数组（例如账户的唯一标识符）。仅适用于**巴西**。
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      description: 别名的类型（例如 `RandomKeyCode`）。
                                    value:
                                      type: string
                                      description: 别名值。
                      merchant:
                        type: object
                        description: >-
                          API响应中的商户对象包含贵公司的详细信息，我们的系统会在内部引用这些信息。这确保了即使我们是出于合规性考虑的法定账户持有人，所有交易和账户本身也能正确归属于贵公司，以便进行报告和对账。
                        properties:
                          type:
                            type: string
                            enum:
                              - INDIVIDUAL
                              - COMPANY
                            description: 商户类型。
                          name:
                            type: string
                            description: 商家名称。
                          lastName:
                            type: string
                            description: 商家姓氏。
                          fullName:
                            type: string
                            description: 商家全名。
                          document:
                            type: object
                            description: 商家身份证明文件。
                            properties:
                              type:
                                type: string
                                description: >-
                                  根据签发国家/地区的不同，[身份证明文件类型](/zh/reference/identity-document-types)可能包括国民身份证号码、社会保障号码或驾驶执照。
                              id:
                                type: string
                                description: 身份证件号码（通常为数字）。该号码必须符合特定证件类型的有效规定。
                          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: 地址所在国家/地区。
                              zipCode:
                                type: string
                                description: 邮政编码。
                              comment:
                                type: string
                                description: 其他地址信息。
                          website:
                            type: string
                            description: 受益人网站。
                      website:
                        type: string
                        description: 受益人网站。对于包含商户对象的响应，将在其中提供受益人网站。
                    examples:
                      - type: COMPANY
                        name: string
                        document:
                          type: RUC
                          id: '1791234561009'
                        lastName: string
                        fullName: string
                        bank:
                          branch: {}
                          account:
                            number: string
                            aliases:
                              - type: string
                                value: string
                            owner:
                              document: {}
                  status:
                    type: object
                    title: 状态
                    description: 操作状态。
                    properties:
                      code:
                        type: string
                        description: '[状态码](/zh/reference/transaction-status-error-codes)。'
                        examples:
                          - '200'
                      description:
                        type: string
                        description: '[状态描述](/zh/reference/transaction-status-error-codes)。'
                        examples:
                          - COMPLETED
                      detail:
                        type: string
                        description: 更多状态信息。
                        examples:
                          - Virtual account has been created
                  errors:
                    type: array
                    description: 交易过程中发生的错误数组。如果交易成功，则此数组为空。
                    items:
                      type: object
                  disabled:
                    type: boolean
                    description: 指定虚拟帐户是启用还是禁用。
                x-examples:
                  Example 1:
                    currency: MXN
                    externalId: 9c592264-a6b4-416b-9f09-d61e8681c8fc
                    internalId: dbd8d9cb-6d4a-49a5-b709-e6926bbf0b29
                    accountNumber: '{{accountNumber}}'
                    beneficiary:
                      type: INDIVIDUAL
                      name: FirtName
                      document:
                        type: RFC
                        id: EXTF900101NI1
                      fullName: FirtName LastName
                      lastName: LastName
                    status:
                      code: '100'
                      description: INPROGRESS
                      detail: Virtual account in progress
                    errors: []
              examples:
                100-INPROGRESS:
                  value:
                    currency: MXN
                    externalId: fb5c9683-cfac-40c9-b81d-ad99de86c0d2
                    internalId: 9a8db65f-be31-42fb-8ebd-5fffd83bd6c6
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: INDIVIDUAL
                      name: Zhang
                      fullName: Zhang Wei
                      lastName: Wei
                      document:
                        type: RFC
                        id: PECJ800101ABC
                      address:
                        street: Calle 34
                        number: '123'
                        city: Guadalajara
                        state: Jalisco
                        country: Mexico
                    status:
                      code: '100'
                      description: INPROGRESS
                      detail: Virtual account in progress
                    errors: []
                200-ARG-COMPLETED-LOCAL COMPANY:
                  value:
                    currency: ARS
                    externalId: de14bcf2-15ee-22e3-ab59-99c3fcba31e8
                    internalId: 5ba31ea0-669b-43f6-88a1-1601f3cade0a
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: COMPANY
                      name: ACME INTERNATIONAL LTD
                      fullName: ACME INTERNATIONAL LTD
                      document:
                        type: CUIT
                        id: 30-71234567-9
                      bank:
                        code: '130'
                        branch:
                          code: '3313'
                        account:
                          number: '1303313111111111111111'
                      address:
                        street: Av. Corrientes
                        number: '1234'
                        city: Buenos Aires
                        state: CABA
                        country: Argentina
                      website: https://yongxin.technology.com
                    status:
                      code: '200'
                      description: COMPLETED
                      detail: Virtual account has been created
                    errors: []
                    disabled: false
                200-ARG-COMPLETED-FOREIGN COMPANY:
                  value:
                    currency: ARS
                    externalId: de14bcf2-15ee-22e3-ab59-99c3fcba31e8
                    internalId: 5ba31ea0-669b-43f6-88a1-1601f3cade0a
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: COMPANY
                      name: LOCALPAYMENT S.R.L.
                      fullName: LOCALPAYMENT S.R.L
                      document:
                        type: CUIT
                        id: 30-71234562-8
                      bank:
                        code: '130'
                        branch:
                          code: '3313'
                        account:
                          number: '1303313111111111111111'
                      merchant:
                        type: COMPANY
                        name: ACME INTERNATIONAL LTD
                        fullName: ACME INTERNATIONAL LTD
                        document:
                          type: TAX ID
                          id: '20342231111'
                        address:
                          street: Calle 34
                          number: '123'
                          city: Rio de Janeiro
                          state: Rio de Janeiro
                          country: Brazil
                        website: https://yongxin.technology.com
                    status:
                      code: '200'
                      description: COMPLETED
                      detail: Virtual account has been created
                    errors: []
                    disabled: false
                200-ARG-COMPLETED-FOREIGN INDIVIDUAL:
                  value:
                    currency: ARS
                    externalId: de14bcf2-15ee-22e3-ab59-99c3fcba31e8
                    internalId: 5ba31ea0-669b-43f6-88a1-1601f3cade0a
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: COMPANY
                      name: LOCALPAYMENT S.R.L.
                      fullName: LOCALPAYMENT S.R.L
                      document:
                        type: CUIT
                        id: 30-71234562-8
                      bank:
                        code: '130'
                        branch:
                          code: '3313'
                        account:
                          number: '1303313111111111111111'
                      merchant:
                        type: INDIVIDUAL
                        name: Zhang
                        lastName: Wei
                        fullName: Zhang Wei
                        document:
                          type: TAX ID
                          id: '20342231111'
                        address:
                          street: Calle 34
                          number: '123'
                          city: Rio de Janeiro
                          state: Rio de Janeiro
                          country: Brazil
                        website: https://yongxin.technology.com
                    status:
                      code: '200'
                      description: COMPLETED
                      detail: Virtual account has been created
                    errors: []
                    disabled: false
                200-BRA-COMPLETED-COMPANY:
                  value:
                    currency: BRL
                    externalId: 7ad8bd1f-7227-4de7-9683-ff1f8ad635c5
                    internalId: 29d34118-4574-4928-a4c1-9d8a1a14271e
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: COMPANY
                      name: LP DO BRASIL INSTITUICAO DE PAGAMENTOS LTDA
                      fullName: LP DO BRASIL INSTITUICAO DE PAGAMENTOS LTDA
                      document:
                        type: CNPJ
                        id: '34669130000133'
                      bank:
                        code: '450'
                        name: Fitbank
                        branch:
                          code: '0001'
                        account:
                          type: s
                          number: '107367941234'
                          alias:
                            - type: RandomKeyCode
                              value: 92c11197-565b-4a2d-8a3a-7c97bc68c7c1
                        merchant:
                          type: COMPANY
                          name: ACME INTERNATIONAL LTD
                          fullName: ACME INTERNATIONAL LTD
                          document:
                            type: TAX ID
                            id: '20342231111'
                          address:
                            street: Calle 34
                            number: '123'
                            city: Rio de Janeiro
                            state: Rio de Janeiro
                            country: Brazil
                          website: https://yongxin.technology.com
                      status:
                        code: '200'
                        description: COMPLETED
                        detail: Virtual account has been Completed
                      errors: []
                      disabled: false
                200-BRA-COMPLETED-INDIVIDUAL:
                  value:
                    currency: BRL
                    externalId: 7ad8bd1f-7227-4de7-9683-ff1f8ad635c5
                    internalId: 29d34118-4574-4928-a4c1-9d8a1a14271e
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: COMPANY
                      name: LP DO BRASIL INSTITUICAO DE PAGAMENTOS LTDA
                      fullName: LP DO BRASIL INSTITUICAO DE PAGAMENTOS LTDA
                      document:
                        type: CNPJ
                        id: '34669130000133'
                      bank:
                        code: '450'
                        name: Fitbank
                        branch:
                          code: '0001'
                        account:
                          type: s
                          number: '107367941234'
                          alias:
                            - type: RandomKeyCode
                              value: 92c11197-565b-4a2d-8a3a-7c97bc68c7c1
                        merchant:
                          type: INDIVIDUAL
                          name: Zhang
                          lastName: Wei
                          fullName: Zhang Wei
                          document:
                            type: TAX ID
                            id: '20342231111'
                          address:
                            street: Calle 34
                            number: '123'
                            city: Rio de Janeiro
                            state: Rio de Janeiro
                            country: Brazil
                          website: https://yongxin.technology.com
                      status:
                        code: '200'
                        description: COMPLETED
                        detail: Virtual account has been Completed
                      errors: []
                      disabled: false
                200-MXN-COMPLETED-INDIVIDUAL:
                  value:
                    currency: MXN
                    externalId: 9c590364-b6b4-116b-cf09-d63e8681c8fc
                    internalId: dbd8d5cb-6d4a-4a15-b7c9-b6526bbf0b29
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: INDIVIDUAL
                      name: Zhang
                      lastName: Wei
                      fullName: Zhang Wei
                      document:
                        type: TAX ID
                        id: '20342231111'
                      address:
                        street: Calle 34
                        number: '123'
                        city: Guadalajara
                        state: Jalisco
                        country: Mexico
                      bank:
                        branch:
                          code: '458'
                        account:
                          number: '646011319800023123'
                      website: https://yongxin.technology.com
                    status:
                      code: '200'
                      description: COMPLETED
                      detail: Virtual account has been created
                    errors: []
                    disabled: false
                200-PER-COMPLETED-INDIVIDUAL:
                  value:
                    currency: PEN
                    externalId: 5ba31ea0-669b-43f6-88a1-1601f3cade0a
                    internalId: f1f16e3e-fb1f-4452-9662-1319dedbac0c
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: INDIVIDUAL
                      name: Zhang
                      lastName: Wei
                      fullName: Zhang Wei
                      document:
                        type: TAX ID
                        id: '20342231111'
                      address:
                        street: Calle 34
                        number: '123'
                        city: Quito
                        state: Suarez
                        country: Peru
                      bank:
                        account:
                          number: '92211111111111111111'
                      website: https://yongxin.technology.com
                    status:
                      code: '200'
                      description: COMPLETED
                      detail: COMPLETED
                    errors: []
                    disabled: false
                908-DELETED:
                  value:
                    currency: MXN
                    externalId: a79aabec-16c6-4a84-8abe-be2dcd2e07a1
                    internalId: d710312c-8c3f-4b65-8e62-7f83eeba321a
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: INDIVIDUAL
                      name: John
                      document:
                        type: RFC
                        id: EXTF900101NI1
                      bank:
                        branch: {}
                        account:
                          number: '646011319800023123'
                          aliases: []
                          owner:
                            document: {}
                      fullName: John Doe
                      lastName: Doe
                    status:
                      code: '908'
                      description: DELETED
                      detail: Virtual account has been deleted
                    errors: []
                300-DISABLED:
                  value:
                    currency: MXN
                    externalId: e36eff59-22d4-ccf0-bf0c-99dc51798f4b
                    internalId: c09095fb-6a4e-17cf-9343-9d9452b0f290
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: INDIVIDUAL
                      name: John
                      document:
                        type: RFC
                        id: EXTF900101NI1
                      bank:
                        branch: {}
                        account:
                          number: '646011319800023123'
                          aliases: []
                          owner:
                            document: {}
                      fullName: John Doe
                      lastName: Doe
                    status:
                      code: '300'
                      description: DISABLED
                      detail: Virtual account disabled
                    errors: []
                200-COL-COMPLETED-FOREIGN COMPANY:
                  value:
                    currency: COP
                    externalId: cf194632-7ec4-4a44-9b92-9bbacad5349e
                    internalId: b406472d-e5df-4ca3-8829-3e3df0948b3d
                    accountNumber: '{{accountNumber}}'
                    beneficiary:
                      type: COMPANY
                      name: LOCALPAYMENT
                      lastName: COLOMBIA SAS.
                      fullName: LOCALPAYMENT COLOMBIA SAS.
                      document:
                        type: NIT
                        id: '9012812345'
                      bank:
                        branch: {}
                        account:
                          type: KEY
                          number: '@LPZHANG1234'
                      address:
                        street: cra 49
                        number: '108'
                        city: MEDELLIN
                        state: Antioquia
                        country: Colombia
                    merchant:
                      type: COMPANY
                      name: ACME INTERNATIONAL LTD
                      lastName: ''
                      fullName: ACME INTERNATIONAL LTD
                      document:
                        type: NIT
                        id: '1111111111'
                      address:
                        street: Calle 34
                        number: '34'
                        city: MEDELLIN
                        state: Antioquia
                        country: Colombia
                    status:
                      code: '200'
                      description: COMPLETED
                      detail: Virtual account has been created
                    errors: []
                    disabled: false
                200-CHL-COMPLETED-INDIVIDUAL:
                  value:
                    currency: CLP
                    externalId: c4894e1a-b1a1-49fc-acb8-b48d30f19208
                    internalId: dcf62e96-b753-41b1-8064-6254c7e0abc1
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: INDIVIDUAL
                      name: Zhang
                      lastName: Wei
                      fullName: Zhang Wei
                      document:
                        type: TAX ID
                        id: '20342231111'
                      address:
                        street: Calle Merced
                        number: '812'
                        city: Santiago
                        state: Region Metropolitana
                        country: Chile
                      bank:
                        account:
                          number: '901000000256'
                      website: https://yongxin.technology.com
                    status:
                      code: '200'
                      description: COMPLETED
                      detail: COMPLETED
                    errors: []
                    disabled: false
                200-CHL-COMPLETED-COMPANY:
                  value:
                    currency: CLP
                    externalId: b367854e-3331-4ed4-ae8c-01f653809a27
                    internalId: 921792b6-5aac-4e41-a79b-ab080ad7f649
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: COMPANY
                      name: ACME INTERNATIONAL LTD
                      fullName: ACME INTERNATIONAL LTD
                      document:
                        id: '20342231111'
                        type: TAX ID
                      bank:
                        account:
                          number: '901000000257'
                      address:
                        street: Calle Merced
                        number: '812'
                        city: Santiago
                        state: Region Metropolitana
                        country: Chile
                      website: https://yongxin.technology.com
                    status:
                      code: '200'
                      description: COMPLETED
                      detail: COMPLETED
                    errors: []
                    disabled: false
        '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
        '404':
          description: 未找到
          content:
            application/json:
              schema:
                type: object
                properties:
                  timestamp:
                    type: string
                    description: 服务执行时间。
                  status:
                    type: integer
                    description: 错误状态码。
                  error:
                    type: string
                    description: 错误描述。
                  message:
                    type: string
                    description: 包含补充信息的消息。
                  path:
                    type: string
                    description: 服务路径。
                x-examples:
                  Example 1:
                    timestamp: '2025-01-06T23:03:33.168+00:00'
                    status: 404
                    error: Not Found
                    message: >-
                      Virtual account not found with externalId:
                      dc21d8be-f8cc-4bb3-ac4a-8875f48a0f041
                    path: /virtual-account/dc21d8be-f8cc-4bb3-ac4a-8875f48a0f041
              examples:
                404 -Virtual account not found.:
                  value:
                    timestamp: '2025-01-06T23:03:33.168+00:00'
                    status: 404
                    error: Not Found
                    message: >-
                      Virtual account not found with externalId:
                      dc21d8be-f8cc-4bb3-ac4a-8875f48a0f041
                    path: /virtual-account/dc21d8be-f8cc-4bb3-ac4a-8875f48a0f041
      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.