Secure Payments API – Credit Card Validation

General

This article explains how to use the API to validate credit card data. You can also verify the card address.

Credit Card Validation

Secure Payments supports the verification of certain types of credit card data. Specifically, it can provide information about processing fees, funds availability, and address verification.

Send a POST request to this endpoint:

POST https://securepayments.loanpro.io/api/processors/credit-card/card-data

This endpoint returns data about a credit card. The "amount" field determines fees for that amount on the given card.

Here's an example of what the payload should look like:

{
"transaction": {
"amount": 1.00,
"funds-direction": "FromCustomer"
},
"card": {
"token": "CREDIT-CARD-PAYMENT-PROFILE-TOKEN"
},
"metadata": {}
}

And a sample cURL request:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'authorization: YOUR AUTH' --header 'secret: YOUR SECRET' -d '{ \
"transaction": { \
"amount": 1.00, \
"funds-direction": "FromCustomer" \
}, \
"card": { \
"token": PAYMENT PROFILE TOKEN \
}, \
"metadata": {} \
}' 'https://securepayments.loanpro.io/api/processors/credit-card/card-data'

A successful request will result in a response that looks similar to the following:

{
"card-details": {
"category": "",
"SC": 200,
"EC": "0",
"bank_phone": "1-800-432-3117",
"type": "CREDIT",
"brand": "VISA",
"card": {
"pull": {
"enabled": false
},
"push": {
"enabled": false
}
},
"bin": "411111",
"issuer": "JPMORGAN CHASE BANK, N.A.",
"bank_url": "www.chase.com",
"country": "United States"
}
}


How did we do?


Powered by HelpDocs (opens in a new tab)