Bank Card Verification

Updated at:

This topic describes the bank card element verification API operations, including two-element, three-element, and four-element verification.

API information

Important

Before calling this API, read the integration process and activate the service.

  • API name: BankMetaVerify

  • Description:

    Bank card element consistency verification includes the following:

    Important

    The verification fails if any element does not match, and you can view the verification result in the SubCode field.

    • Two-element verification (bank card number + name)

    • Three-element verification (bank card number + name + ID number)

    • Four-element verification (bank card number + name + ID number + mobile number)

  • QPS limit: This API has a dedicated QPS limit. For details, see QPS limits for verification APIs.

  • Service endpoint (the Endpoint used when calling the API):

    Region

    IPv4

    IPv6

    common

    cloudauth.aliyuncs.com

    cloudauth-dualstack.aliyuncs.com

    China (Beijing)

    cloudauth.cn-beijing.aliyuncs.com

    cloudauth-dualstack.cn-beijing.aliyuncs.com

    China (Shanghai)

    cloudauth.cn-shanghai.aliyuncs.com

    cloudauth-dualstack.cn-shanghai.aliyuncs.com

    Note
    • To reduce latency, select an endpoint that is geographically close to your servers.

    • You can also create a list of endpoints and poll them in rotation to improve availability.

    Important

    The Information Verification Service does not support a hard cap or automatic deactivation based on the number of calls. To control costs and prevent high bills, we recommend configuring spending alert rules:

    1. Configure spending alerts: Set High-Spending Alert thresholds to monitor your expenses in real time.

    2. Monitor your resource package balance: If you have purchased a resource package, also Set Resource Package Balance Alert. This lets you promptly replenish the package or adjust your call strategy.

    3. Configure business monitoring: See security management to monitor business requests for anomalies and fluctuations.

Request parameters

Name

Type

Required

Description

Example

ParamType

String

Yes

Encryption method:

  • normal: plaintext (no encryption)

  • sm2: SM2 encryption

Important

For details on SM2 parameter encryption, see Parameter encryption reference.

normal

VerifyMode

Strng

Yes

VERIFY_BANK_CARD: bank card verification mode.

Checks whether the provided bank card number matches the user's real name, ID number, and mobile number.

VERIFY_BANK_CARD

ProductType

String

Yes

Product type:

  • BANK_CARD_2_META: verify bank card number + name

  • BANK_CARD_3_META: verify bank card number + name + ID number

  • BANK_CARD_4_META: verify bank card number + name + ID number + mobile number

BANK_CARD_4_META

BankCard

String

Yes

Bank card number.

  • If paramType is normal, provide the plaintext card number.

  • If paramType is sm2, provide the encrypted card number.

  • Plaintext: 12345678******

  • Ciphertext: MHwCIFnuzcI9/V+VM0l7nNdaCS/eJ0tNu0ptNqnayxumHrZBAiEA/HWhWaPoKXrP0el8P1/rl/+X7RaCAgQTUjCH4PrO24UEIHDeHp7JPDfSKfZr7lh5YHVhFlYurbh9KA3ALb3cJtDqBBPNAX1Dh9G93I2gNijGYlutrrTJ

UserName

String

Yes

Name.

  • If paramType is normal, provide the plaintext name.

  • If paramType is sm2, provide the encrypted name.

  • Plaintext: Zhang San

  • Ciphertext: MG8CIQCxI0wNYbc0c2BRL+7+tSethTXfQC391ZFnszRRcvRZ9AIgekQYhgDtxaDuoRD4bde/5fnFdlUp4YoxlEnIFLLm2mQEILkctuy6Rw6lfAUxBtkpPoPVCJAeD5al/RX8JFUvTACEBAYAgLJjBe0=

IdentityType

String

No

ID type (defaults to national ID if empty; for other types, see the following table).

01

IdentifyNum

String

No

ID number.

  • If paramType is normal, provide the plaintext ID number.

  • If paramType is sm2, provide the encrypted ID number.

Important

This parameter is required if ProductType is one of the following:

  • BANK_CARD_3_META

  • BANK_CARD_4_META

  • Plaintext: 429001********8211

  • Ciphertext: MHsCIEPDt1ycBNSVgA2yKsMnvWGheiI+STWqJLmYWlZnklhnAiEAwq1bk5YVepHwqfMsd9ErlK71OrdXx8E+wfqbzyFCwoMEIM1QdrFeekvQh6fwK7sVXAsNePiNm7Eulqm/zahRosbKBBKgtyhm3SopJ3tO/wALKXQQW+g=

Mobile

String

No

Mobile number.

  • If paramType is normal, provide the plaintext mobile number.

  • If paramType is sm2, provide the encrypted mobile number.

Important

This parameter is required if ProductType = BANK_CARD_4_META.

  • Plaintext: 186****2055

  • Ciphertext: MHUCIQDD5rrj8x5xZEXe9d2lI131M4Ql8bWmeMG+ba6KGT38xAIhAJErofLS0A/uMn/tU2lbHPRBnJKvDdLjJ5kARYOq4gHHBCBzZ3kecz1p80B8nPWNnQQMOkQeERWiOvLdhw/b7hjUZQQLqPBQkFGbfHZDCAE=

ID type list

IdentityType

ID document

01

National ID

02

Military officer ID

03

Passport

04

Mainland Travel Permits for Hong Kong and Macao Residents

05

Mainland Travel Permit for Taiwan Residents

06

Police officer ID

07

Soldier ID

08

Foreign passport

09

Foreign Permanent Residence ID

10

Hong Kong and Macao Resident Permit

11

Taiwan Resident Permit

12

Travel document

13

Exit-Entry Permit

Response parameters

Name

Type

Description

Example

RequestId

String

Request ID.

130A2C10-B9EE-4D84-88E3-5384FF039795

Message

String

Response message.

success

Code

String

Return code: 200 indicates success; any other value indicates failure.

Important
  • This parameter indicates whether the API call was successful. For detailed descriptions of the return codes, refer to server-side error codes.

  • To see the business verification result, check the fields in ResultObject.

200

ResultObject

BizCode

String

Verification result:

  • 1: consistent (billed)

  • 2: inconsistent (billed)

  • 3: no record found (not billed)

1

SubCode

String

Verification details:

  • 101: verification passed.

  • 201: information mismatch—cardholder details incorrect.

  • 202: information mismatch—bank card not enabled for verification payments.

  • 203: information mismatch—bank card expired.

  • 204: information mismatch—bank card restricted.

  • 205: information mismatch—card confiscated.

  • 206: information mismatch—invalid bank card.

  • 207: information mismatch—no issuing bank found for this card.

  • 208: information mismatch—card not initialized or inactive.

  • 209: information mismatch—fraudulent or swallowed card.

  • 210: information mismatch—card reported lost.

  • 211: information mismatch—password retry limit exceeded.

  • 212: information mismatch—issuing bank does not support this transaction.

  • 213: information mismatch—abnormal card status or invalid card.

  • 214: information mismatch—mobile number not registered.

  • 215: information mismatch—incorrect password, expiration date, or CVN2.

  • 216: information mismatch—other card anomalies.

  • 301: verification unavailable—bank card does not support this service.

  • 302: verification unavailable—verification failed or denied by bank; contact issuing bank.

  • 303: verification unavailable—mobile number verification not supported for this card.

  • 304: verification unavailable—invalid bank card number.

  • 305: verification unavailable—other reasons.

  • 306: verification unavailable—verification attempt limit exceeded.

101

SDK usage examples

Important

Before you integrate, read the integration process, activate the service, and get an AccessKey and configure the environment variables.

Get SDK samples and installation packages:

  • On the online API debugging page in OpenAPI, find the SDK sample code on the right. Click SDK installation information in the upper-right corner of the code sample to view installation details.

    Note

    Select the required programming language.

    image

  • For offline installation, go to the SDK installation page, select the SDK for your programming language, and download it from the publishing address.

    image