How to retrieve a credit card

A credit card can be retrieved from the system by using the following URL and POST parameters

 

 Method URL
 POST  https://api.fairwarningsoftware.com/v1.1.1/user/billing/card/retrieve

 Parameters to pass during the request:

Request
{
    "user_id": <user_id>,
    "card_id": <card_idy>
}

 

 Field  Type  Required  Description
user_id int YES The user's unique identification number from the FWS management software.
card_id string YES The ID of the credit card.

 

 Status Response
 200

 {
    "card" : {
        "card_id" : <card_id>,
        "account_holder_name" : <account_holder_name>,
        "brand" : <brand>,
        "exp_month" : <exp_month>,
        "exp_year" : <exp_year>,
        "last_4" : <last_4>,
        "street" : <street>,
        "street2" : <street2>,
        "city" : <city>,
        "state" : <state>,
        "zip" : <zip>,
        "country" : <country>,
    }
}

401  {"error":"The API keys provided are invalid."}
403  {"error":"API keys are missing."}
500  {"error": <custom error>}

 

 Field  Type  Description
card_id string The ID of the credit card.
account_holder_name string The name displayed on the credit card.
brand string The brand of the credit card.
street string The street address for the credit card's billing address.
street2 string The unit for the credit card's billing address.
city string The city for the credit card's billing address.
state string The state for the credit card's billing address.
zip string The zip code for the credit card's billing address.
country string The country for the credit card's billing address.
last_4 int The last 4 digits of the credit card number.
cvv_code int The CVV/Security code on the back of the credit card.
exp_month int The month the credit card expires.
exp_year int The year the credit card expires
error string Contains the error returned by the API, or false if there were no errors.