Users

inquiryUserCardList

Retrieve authorized user bank card list with an access token.

Overview

POST /v1/users/inquiryUserCardList returns user bank card list based on scopes granted through my.getAuthCode. Pass the accessToken issued by applyToken; the response includes the list of bank cards associated with the user when authorized.

To access user card information, you must request the CARD_LIST scope when calling my.getAuthCode to obtain the authorization code.

Endpoint

MethodPath
POST/v1/users/inquiryUserCardList

API Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see: OpenAPIs Overview.

Request

FieldTypeRequiredDescriptionExample
accessTokenstringYesAccess token for querying user bank card list (max 128 characters; disallow @, #, ?). Obtain via applyToken."281010033AB2F588D14B43238637264FCA5AAF35xxxx"
{
  "accessToken": "281010033AB2F588D14B43238637264FCA5AAF35xxxx"
}

Response

FieldTypeRequiredDescription
resultobjectYesOutcome metadata containing status and error codes.
cardListarray<CardInfo>NoUser bank card list queried by the merchant. Must be returned when result.resultStatus is S. Returns empty array [] when user has not bound any bank card.

CardInfo

PropertyTypeRequiredDescription
accountNumberstringYesAccount number (max 32 characters).
maskedCardNostringYesMasked card number (max 32 characters).
{
  "result": {
    "resultCode": "SUCCESS",
    "resultStatus": "S",
    "resultMessage": "Success"
  },
  "cardList": [
    {
      "maskedCardNo": "123*****789",
      "accountNumber": "123456789"
    },
    {
      "maskedCardNo": "987*****321",
      "accountNumber": "987654321"
    }
  ]
}

Result Processing Logic

StatusDescription
SInquiry succeeded. Use accessToken to access user information within the corresponding scope.
UResult unknown (resultCode: UNKNOWN_EXCEPTION, resultMessage: "An API calling is failed, which is caused by unknown reasons."). Retry or review Common error codes.
FInquiry failed. Inspect resultCode and see Error codes.

Error Codes

Error CodeResult StatusMessageNext Step
INVALID_ACCESS_TOKENFThe access token is not valid.Obtain a new authorization code via my.getAuthCode, then exchange using applyToken.
ACCESS_TOKEN_NOT_COVER_THE_SCOPEFThe access token permission scope does not contain specified scope.Check the permission for the access token and try again.