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

# 获取卡片详情

此 endpoint 用于获取先前已令牌化的银行卡的详细信息。您可以使用此 endpoint 确认银行卡已成功令牌化，并获取已令牌化银行卡的详细信息，例如卡品牌、后四位数字和有效期。


## OpenAPI

````yaml openapi/zh/localpayment.json GET /api/card
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/card:
    get:
      summary: 获取卡片详情
      operationId: get-card
      parameters:
        - name: Authorization
          in: header
          description: >-
            用于身份验证的 Bearer
            访问令牌。该令牌可从[获取访问令牌](/zh/reference/get-token)或[刷新访问令牌](/zh/reference/refresh-token)endpoint
            获取。
          required: true
          schema:
            type: string
        - name: token
          in: query
          description: 卡片令牌。
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  card:
                    type: object
                    description: 卡片信息。
                    properties:
                      token:
                        type: string
                        description: 包含卡片信息的令牌。
                      bin:
                        type: string
                        description: 银行识别号码。
                      brand:
                        type: string
                        description: 卡支付网络。
                      Country:
                        type: string
                        enum:
                          - AR
                          - BO
                          - BR
                          - CL
                          - CO
                          - CR
                          - DO
                          - EC
                          - SV
                          - GT
                          - HN
                          - MX
                          - PA
                          - PY
                          - PE
                          - UY
                        title: 国家/地区
                        description: '[国家](/zh/reference/country-codes)。ISO 3166-1 alpha-2。'
                      name:
                        type: string
                        description: 信用卡持有人姓名。
                      last4:
                        type: string
                        description: 卡号后四位。
                      expirationYear:
                        type: integer
                        description: 到期年份`yyyy`格式。
                      expirationMonth:
                        type: integer
                        description: 到期月份`mm`格式。
                      Installments:
                        type: integer
                        description: 分期付款。
                    x-examples:
                      Example 1:
                        card:
                          token: Txf+Hf/YlDNiJOkIifR7nXDnvH0IsuZN+dwyzen5Ks0=
                          bin: '424242'
                          brand: VISA
                          country: GB
                          name: MANUEL CEDRO
                          last4: '4242'
                          expirationYear: 2025
                          expirationMonth: 11
                          installments: 0
                  errors:
                    type: array
                    description: 交易过程中发生的错误列表。
                    items:
                      type: object
                x-examples:
                  Example 1:
                    card:
                      token: Quwoyb%2BSaW2t6vNvnPK0%2Ff3hu4UZQqSwY4yXKdkON9c%3D
                      bin: '400000'
                      brand: VISA
                      country: US
                      name: John Doe
                      last4: '0002'
                      expirationYear: 2028
                      expirationMonth: 11
                    errors: []
              examples:
                200 - Get card.:
                  value:
                    card:
                      token: Quwoyb%2BcaW1t6vNvxPK0%2Ff3hu4UZQqSwY4yXKdkON9c%3D
                      bin: '400000'
                      brand: VISA
                      country: US
                      name: John Doe
                      last4: '0002'
                      expirationYear: 2028
                      expirationMonth: 11
                    errors: []
        '400':
          description: 错误的请求。
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    description: 交易过程中发生的错误列表。
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          description: 错误代码。
                        detail:
                          type: string
                          description: 错误详情。
                        description:
                          type: string
                          description: 错误描述。
                x-examples:
                  Example 1:
                    errors:
                      - code: '801'
                        description: REJECTED
                        detail: Params error Invalid token
              examples:
                801 - Params error Invalid token.:
                  value:
                    errors:
                      - code: '801'
                        description: REJECTED
                        detail: Params error Invalid token
        '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.