Payment methods are the EPD-Commerce-side mirror of cards stored in EPD Gateway. See Card Vaulting for the full model.

Tools

add_payment_method

Attach a card to a customer by passing its billing_id (the EPD Gateway customer vault id). In sandbox, use card_visa, card_insufficient_funds, etc. (see Testing Guide).

readOnlydestructiveidempotentopenWorld
falsefalsetruefalse

Required parameters:

  • customer_id
  • billing_id

Optional:

  • 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

Remove the EPD Commerce mirror of a card. The underlying gateway vault entry is governed separately.

readOnlydestructiveidempotentopenWorld
falsetruetruefalse

Deleting a payment method that is the only one on an active subscription will cause the next renewal to fail with payment_failed. Add a replacement first.