Credit Card Binding / Query Bind Credit Card

Scenario

Provide merchants with the ability to query bound credit card information. This API allows merchants to retrieve a list of credit cards linked to a member.

API URLs

  • Stage: https://ecpg-stage.ecpay.com.tw/Merchant/GetMemberBindCard
  • Production: https://ecpg.ecpay.com.tw/Merchant/GetMemberBindCard

Message format

  • Content Type:application/json
  • HTTP Method:POST

Request (Json format)

MerchantID String(10)
Required

For platform merchants, the value please populate with the Platform merchant’s MerchantID.

RqHeader Object
Required

Request header

Timestamp Number
Required

Unix timestamp

❗ Special note:

  • ECPay will verify the timestamp.If ECPay receives the request is more 10 minutes late than the timestamp, the transaction will be failed.
  • Merchants are suggested to synchronize the time of a computer on client- or server-side to another server or nearest reference time source.
  • For more details can be seen here; another online tool can be found here.

Data String
Required

Payload of JSON that has been encrypted.

Request Example (Json format)

{
    "MerchantID": "3002607",
    "RqHeader": {
        "Timestamp": 1234567890
    },
    "Data": "enter your data"
}

Message payload of Data (Json format)

❗ Special note: please urlencode the JSON string firstly and then do AES encryption.

PlatformID String(10)
 

Platform merchant’s MerchantID.

MerchantID String(10)
Required

MerchantTradeNo String(20)
Required

Merchant’s order ID

Data Example:(Json format)

{
    "MerchantID": "3002607",
    "MerchantTradeNo":"20180914001"
}

Response (Json format)

MerchantID String(10)
 

Merchant ID

RpHeader Object

Timestamp Number

Unix timestamp

TransCode Int
 

Response codes to indicate whether the payload is successfully accepted.

  • 1: Payload (i.e. MerchantID, RqHeader, and Data) is successfully accepted by ECPay.
  • Others: failed.

TransMsg String(200)
 

Response message to indicate whether the payload is successfully accepted.

Data String

Payload of JSON that has been encrypted.

Response Example (Json format)

{
    "MerchantID": "3002607",
    "RpHeader": {
        "Timestamp": 1234564848
    },
    "TransCode": 1,
    "TransMsg": "Success",
    "Data": "…"
}

Message payload of Data (Json format)

RtnCode Int

Response codes to indicate whether the API is successfully executed or not.

  • 1: API is successfully executed.
  • Others: failed.
  • For more details please see error codes.

RtnMsg String(200)

Response messages.

PlatformID String(10)

MerchantID String(10)

MerchantMemberID String(60)

Merchant Member ID

BindCardList Array Object

Card6No String(6)

First 6 digits of credit card

Card4No String(4)

Last 4 digits of credit card

CardValidYY String(4)

Credit Card Expiration Year

CardValidMM String(2)

Credit Card Expiration Month

BindCardID String(64)

Bound Credit Card Code

Data Example(Json format)

{
    "RtnCode": 1,
    "RtnMsg": "Success",
    "MerchantID": "3002607",
    "BindCardList":[
   {
        "Card6No": "123456",
        "Card4No": "4123",
        "CardValidYY" :"25",
        "CardValidMM": "11",
        "BindCardID": "ab123456acacssc",
      },
      {
        "Card6No": "654123",
        "Card4No": "7894",
        "CardValidYY" :"27",
        "CardValidMM": "12",
        "BindCardID": "ab789456acac",
      }
]
}

Copyright © Green World FinTech Service Co., Ltd. All rights reserved.

綠界官方網站