Secure Payments API – GET Credit Card

General

You can pull credit card information via the Secure Payments API. However, information such as credit card number will be encrypted. And to ensure security, you can only pull credit card information if you have the token provided when the payment profile was created.

In this article, we'll explain how to pull credit card information.

How To

To get an existing credit card's details, you will need to have the credit card token provided to you when you created the credit card as a payment method. Once you have the token, send a GET request to the following endpoint:

GET https://securepayments.loanpro.io/api/credit-card/{token}

Just replace {token} with the unique Secure Payments token for that card.

Here's a sample of the request in a cURL format:

curl -X GET --header 'Accept: application/json' --header 'secret: your-secret' --header 'authorization: your-token' 'https://securepayments.loanpro.io/api/credit-card/CiCVDqG5QNK%2BZhpBI3fNrwHkwiWdtqO5Nb1OQctzK3SzhRKnAQEBAwB4lQ6huUDSvmYaQSN3za8B5MIlnbajuTW9TkHLcyt0s4UAAAB%2BMHwGCSqGSIb3DQEHBqBvMG0CAQAwaAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAwncgs%2FWX4X2NKs%2FgYCARCAO2tZFeqyjkH%2BIvHQqX0XT7z0QtJupvGVYNinIBzUCDa1tQpUruRLZlpTwh5exQahFLbO3lXnP%2F6%2BGW9d.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXUyJ9.eyJ1cGRhdGVkIjoxNDQ5ODU1NzE2LCJjcmVhdGVkIjoxNDQ5ODU1NzE2LCJ6aXBjb2RlIjoiODMxNDUiLCJpZCI6MiwidXNlcl9pZCI6NSwiY291bnRyeSI6IlVTQSJ9.w1n3XoJ754oZrUGHzxJPA8unC-yVvewzk8NfSnXvEas'

The response will include the address, bank, and other information for the card. The card number itself will be redacted, only showing the last four digits. Here's a sample response:

{
"card_number": "XXXXXXXXXXXX1111",
"type": "VISA",
"address": "1234 Cool Street",
"city": "LAYTON",
"state": "UT",
"zipcode": "84041",
"country": "USA",
"card-data": {
"category": "",
"avs": "null",
"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.",
"fees": "null",
"verify": null,
"bank_url": "www.chase.com",
"country": "United States"
}
}

A masked card number will be returned with only the last four digits visible.

If you have the Card Attributes action turned on and the Advanced Card Attributes action turned on as well, your response will look like this:

{
"card_number": "XXXXXXXXXXXX6821",
"type": "VISA",
"address": "123 Oak Lane",
"city": "Schenectady",
"state": "UT",
"zipcode": "12345",
"country": "USA",
"card-data": {
"category": "SIGNATURE",
"avs": null,
"bank_phone": "1-877-242-7372",
"type": "CREDIT",
"brand": "VISA",
"card": "{\"pull\":{\"enabled\":true,\"network\":\"Visa\",\"type\":\"Credit\",\"regulated\":true,\"currency\":\"840\",\"country\":\"840\"},\"push\":{\"enabled\":true,\"network\":\"Visa\",\"type\":\"Credit\",\"availability\":\"Next Business Day\",\"regulated\":true,\"currency\":\"720\",\"country\":\"840\"},\"lpp-attributes\":{\"PaymentCardDetails\":{\"BIN\":\"418725\",\"CardBrand\":\"VISA\",\"CardType\":\"CREDIT\",\"CardCategory\":\"True Credit - Not Pin Capable/no Signature Capability\",\"IssuingOrganization\":\"JPMorgan Chase Bank N.A.\",\"IssuingCountry\":\"US\"},\"AuthCode\":\"078019D\",\"CreditBalance\":0,\"ResponseCode\":\"28\",\"CanDisburse\":false,\"TransactionId\":\"76e419cb-c943-4532-bc26-52bg3d403ab4\",\"ResponseMessage\":\"Payment method validated.\",\"CCVResponse\":{\"ResponseCode\":\"79\",\"ResponseMessage\":\"CVV Not processed\"},\"CardValid\":true,\"Status\":\"Success\"}}",
"bin": "418725",
"issuer": "CHASE BANK USA, N.A.",
"fees": "{\"pull\":{\"interchange\":\"2.25\",\"network\":\"0.15\",\"tabapay\":\"0.25\"},\"push\":{\"interchange\":\"0.10\",\"network\":\"0.10\",\"tabapay\":\"0.25\"}}",
"verify": null,
"bank_url": "www.chase.com",
"country": "United States"
}
}


How did we do?


Powered by HelpDocs (opens in a new tab)