In many cases it makes sense to validate a card before you add it to a Smart Transaction, or even before you create the transaction. The card is validated by its card number and for the merchant:
Request
POST /api/v2/Loyalty/MerchantCards/MRC/validateMerchantcard HTTP/1.1
Host: connect-testing.secuconnect.com
Authenticate: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
{
"cardnumber"
:
"9276004429999952"
,
"merchant"
:
"MRC_BCSPDJBAT5QXBHUSBPGHY2Q8X8U8ON"
}
The response tells you the validity of the card. It is short if it is not a valid card:
Response (Invalid Card)
HTTP/1.1 200 OK
Content-Type: application/json
{
"isValid"
:
false
}
The card number might ben unknown at all, or it is not related to this merchant.
If the card is valid, there are a few more details:
Response (Valid Card)
HTTP/1.1 200 OK
Content-Type: application/json
{
"isValid"
:
true
,
"hasPasscode"
:
false
,
"isLocked"
:
true
}
The details mean:
Field | Explanation |
---|---|
|
|
| Only present for valid cards. Not needed for e-commerce nor POS integration. |
| Only present for valid cards. If |