Payment methods are EPD Commerce’s reference to cards held in EPD’s secure vault. See Card Vaulting for the full model.

Tools

add_payment_method

Attach a card to a customer with a card_token (cct_…) captured in the browser with EPD Elements. The card is tokenized client-side and vaulted in EPD’s secure vault. Raw card data never reaches your servers or the add_payment_method API.

readOnlydestructiveidempotentopenWorld
falsefalsetruefalse

Required parameters:

  • customer_id
  • card_token: single-use cct_… from the EPD Elements browser SDK. Expires 15 minutes after capture and can be used once.

Optional:

  • billing_details: cardholder name + billing address stored with the card. Used with card_token; some processors require a full billing address to vault. Fields: name, address1, address2, city, state, zip, country (ISO 3166-1 alpha-2), email, phone, all optional; name/email/phone fall back to the customer record.
  • set_as_default: set this card as the customer’s default for future charges.
  • update_subscriptions: when set_as_default: true, also switch every active subscription over to this new default card.
  • idempotency_key

list_payment_methods

List all payment methods on a single customer.

readOnlydestructiveidempotentopenWorld
truefalsetruefalse

delete_payment_method

Detach a saved card from a customer. The stored card is removed from the customer; the underlying vault entry is governed separately.

readOnlydestructiveidempotentopenWorld
falsetruetruefalse

If the card is the customer’s default or is attached to an active subscription, the delete is rejected unless you pass replacement_payment_method (the UUID of another saved card on the same customer). EPD moves the affected subscriptions onto that card, then removes the old one. A card that is neither the default nor tied to an active subscription is deleted without a replacement.