Overview

Save payment methods to your account for faster repeat purchases. The payment methods API lets you list available methods, add new ones, set a default, and remove methods.

List Payment Methods

Returns all saved payment methods for the logged-in customer.

Request

curl https://sandbox-api.cardcash.com/v3/customers/payment-options \
  -H "x-cc-app: YOUR_APP_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

{
  "data": {
    "buy": {
      "items": [
        {
          "paymentMethod": "CREDITCARD",
          "default": true,
          "verified": true,
          "lastFour": "4242",
          "type": "Visa",
          "expireMonth": "12",
          "expireYear": "27",
          "id": 456
        },
        {
          "paymentMethod": "ACH",
          "default": false,
          "verified": true,
          "accountNumber": "****6789",
          "routingNumber": "****0021",
          "accountType": "business",
          "id": 789
        },
        {
          "paymentMethod": "DRAWDOWN_ACCOUNT",
          "default": false,
          "verified": true
        }
      ]
    }
  }
}

Payment Method Types

TypeDescription
CREDITCARDSaved credit card
ACHSaved bank account
ACH_CREDITCARDACH with credit card backup
DRAWDOWN_ACCOUNTDrawdown account (if active for customer)

Add Payment Method

Saves a new payment method to the customer’s account.

Request

curl -X POST https://sandbox-api.cardcash.com/v3/customers/payment-options \
  -H "x-cc-app: YOUR_APP_ID" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "paymentMethod": "CREDITCARD",
    "number": "4111111111111111",
    "ccv": "123",
    "expireMonth": "12",
    "expireYear": "27",
    "type": "visa"
  }'

Response

Returns the full updated payment methods list (same shape as the GET response).

Set Default Payment Method

Sets a saved payment method as the default for checkout.

Request

curl -X PUT https://sandbox-api.cardcash.com/v3/customers/payment-options/456 \
  -H "x-cc-app: YOUR_APP_ID" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "default": true }'

Response

Returns the full updated payment methods list.

Delete Payment Methods

Delete Credit Card

curl -X DELETE https://sandbox-api.cardcash.com/v3/customers/creditcards/456 \
  -H "x-cc-app: YOUR_APP_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Delete Bank Account (ACH)

curl -X DELETE https://sandbox-api.cardcash.com/v3/customers/bankaccounts/789 \
  -H "x-cc-app: YOUR_APP_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Notes

  • Payment methods marked verified: false should not be used for checkout
  • The DRAWDOWN_ACCOUNT entry appears automatically if your account has an active drawdown account — it cannot be added or removed via this API
  • At checkout, reference saved methods by ID (see Checkout)