Credit card verification
2 min
card
Verify whether the credit card is truly owned by the customer based on the last 4 digits of the user's credit card
POST
https://api-sandbox.klavi.ai/data/eco/v1/verify/card
Header Parameters
- AuthorizationstringrequiredDescription
Body Parameters
- taxIdstringrequiredDescription
- institutionCodestringrequiredDescription
- kycVerifiedbooleanrequiredDescription
- cardLast4stringrequiredDescription
Response
- requestIdstringDescription
- statusstringDescription
curl
curl --location 'https://api-sandbox.klavi.ai/data/eco/v1/verify/card' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"taxId": "String",
"institutionCode": "String",
"kycVerified": "Boolean"
"cardLast4": "String"
}'nodejs
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api-sandbox.klavi.ai/data/eco/v1/verify/card',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"taxId": "String",
"institutionCode": "String",
"kycVerified": "Boolean"
"cardLast4": "String"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"taxId": "String",
"institutionCode": "String",
"kycVerified": "Boolean"
"cardLast4": "String"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api-sandbox.klavi.ai/data/eco/v1/verify/card", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://api-sandbox.klavi.ai/data/eco/v1/verify/card"
payload = json.dumps({
"taxId": "String",
"institutionCode": "String",
"kycVerified": "Boolean"
"cardLast4": "String"
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api-sandbox.klavi.ai/data/eco/v1/verify/card")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"taxId": "String",
"institutionCode": "String",
"kycVerified": "Boolean"
"cardLast4": "String"
})
response = https.request(request)
puts response.read_body
200
{
"requestId": "c69e4cd41d360008631c6db1fb47a00c",
"status": "matched"
}The participant institution code list can be found in Participant Institutions.
status
status | Description |
|---|---|
matched | The last 4 digits of the user's credit card number match |
notMatched | The last 4 digits of the user's credit card number not match |
notFound | Not found |