v1

latestOpenAPI 3.1.02026-07-2419077.8 KB

Verify a Card

This endpoint validates credit cards and returns a response of either 'Valid' or 'Invalid.' It's intended for those who want to save cards for recurring payments. By validating the card, merchants can ensure that they only save valid cards. Additionally, the merchant can save the card in a single step by passing 'save_card = true'. There are three possible responses: INITIATED: Tap provides a payment URL (transaction.url) to initiate verification. The customer should be redirected to this URL to complete the verification; VALID: The card is valid; INVALID: The card is invalid.

post/verify/

Request body

currencystring required

Validate Currency Code, Three digit ISO curreny code (Sample - KWD, USD..)

threeDSecureboolean

The 3D Secure request status for a card verification, values can be one of (true or false) default

save_cardboolean

Payer can save the credit for future purpose. Customer phone number is required to save the card, values can be one of (true or false)

Response

200

idstring
objectstring
live_modeboolean
api_versionstring
statusstring
currencystring
threeDSecureboolean
save_cardboolean
riskboolean
issuerboolean
promoboolean
loyaltyboolean

Example response

{
  "id": "vry_TS07A3420231554m1Y21506344",
  "object": "verify_card",
  "api_version": "V2",
  "status": "INITIATED",
  "currency": "KWD",
  "threeDSecure": true,
  "metadata": {
    "udf1": "test1",
    "udf2": "test2"
  },
  "transaction": {
    "timezone": "UTC+03:00",
    "created": "1686844474360",
    "url": "https://sandbox.payments.tap.company/test_gosell/v2/payment/tap_process.aspx?auth=qU%2fYHoOr4bkq2tRwqeLL6fGJFGzQYnycswDRdh3z%2bWE%3d"
  },
  "customer": {
    "first_name": "test",
    "last_name": "test",
    "email": "test@test.com",
    "phone": {
      "country_code": "965",
      "number": "50000000"
    }
  },
  "source": {
    "object": "token",
    "id": "tok_xxxxxxxxx"
  },
  "redirect": {
    "status": "PENDING",
    "url": "http://your_website.com/redirect_url"
  },
  "card": {
    "object": "card",
    "first_six": "xxxxxx",
    "last_four": "xxxx"
  },
  "response": {
    "code": "100",
    "message": "Initiated"
  },
  "card_issuer": {
    "id": "bnk_TS04A3720231554a5JB1506453",
    "country": "GB"
  }
}