How to add a new credit card for billing

A credit card can be added to the system by using the following URL and POST parameters

 

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

 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.
account_holder_name string YES The name displayed on the credit card.
street string YES The street address for the credit card's billing address.
street2 string NO The unit for the credit card's billing address.
city string YES The city for the credit card's billing address.
state string YES The state for the credit card's billing address.
zip string YES The zip code for the credit card's billing address.
country string YES The country for the credit card's billing address.
card_number int YES The credit card number, with no spaces, hyphens, or any other character besides integers.
cvv_code int YES The CVV/Security code on the back of the credit card.
exp_month int YES The month the credit card expires.
exp_year int YES The year the credit card expires.
default_source bool NO Whether or not the card is the default payment method.

 

 Status Response
 200

 {
    "success" : <success>
}

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

 

 Field  Type Description
success bool Whether the API call was successful or not.
error string Contains the error returned by the API, or false if there were no errors.