How to retrieve saved billing data

Billing data can be retrieved using the following URL and POST parameters:

 

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

 Parameters to pass during the request:

 Field  Type  Required  Description
user_id int YES The user's unique identification number from the FWS management software.

 

 Status Response
 200  {
    "payment_methods" : [
        {
            "payment_method" : {
                "card_id" : ,
                "type" : "card",
                "brand" : ,
                "exp_month" : ,
                "exp_year" : ,
                "last_4" : ,
                "default_source" :
            }
        },
        {
            "payment_method" : {
                "bank_id" : ,
                "type" : "bank",
                "account_type" : ,
                "bank_name" : ,
                "country" : ,
                "currency" : ,
                "last_4" : ,
                "default_source" :
            }
        },
        ...
    ]
}
401  {"error":"The API keys provided are invalid."}
403  {"error":"API keys are missing."}
500  {"error": }

 

 Field  Type Description
payment_methods object An object containing a list of payment methods.
payment_method object An object containing an individual payment method.
card_id string The credit card ID from the payment gateway's system.
type string The type of payment method: "card" or "bank"
brand string The brand of the credit card.
exp_month int The expiration month of the credit card.
exp_year int The expiration year of the credit card.
last_4 int The last 4 digits of the account/card.
default_source bool Whether the given payment method is the default payment source.
bank_id string The bank ID from the payment gateway's system.
account_type string The type of bank account: "individual" or "company"
bank_name string The name of the bank.
country string The country of the bank.
currency string The currency of the bank.