Deem Offers API Documentation

User Credit Cards

List all user’s credit cards

Returns an array of credit card representations.

GET /credit_cards

Parameters

user_id
String Id of the user
count (optional)
Boolean Returns the count instead of the list. If present, per_page and page will be ignored.
per_page (optional)
Integer Limits the size of the list. Default is 100. Max is 1000.
page (optional)
Integer Returns the list corresponding to the page number if the result cannot be displayed in a single page. Default is 1.

Response

Status: 200 OK
{
  "status": "success",
  "credit_cards": [
    {
      "id": "2342f8073e",
      "credit_card_id": "2342f8073e",
      "number": "XXXX0027",
      "type": "visa",
      "primary": true,
      "deleted": false
    }
  ]
}

Create a credit card

Stores a credit card for user purchases.

POST /credit_cards

Parameters

user_id
String Id of the user
number
String 16 digit credit card number. Be sure to use HTTPS for all API calls.
verification_value
String CVV value on the back of the credit card. Be sure to use HTTPS for all API calls.
month
Integer Expiration month in digit format.
year
Integer Expiration year in digit format.
zip_code
String The zip code for the billing address for the card.

Response

Status: 200 OK
{
  "status": "success",
  "credit_card_id": "2342f8073e"
}

Set default credit card

Make an existing credit card the default card.

Note: If a user only has one credit card, it will be the default credit card.

PUT /credit_cards/:credit_card_id/default

Response

Status: 200 OK
{
  "status": "success"
}