Payment-method tools
Attach, list, and detach saved cards on a customer.
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).
| readOnly | destructive | idempotent | openWorld |
|---|---|---|---|
false | false | true | false |
Required parameters:
customer_idbilling_id
Optional:
set_as_default— set this card as the customer’s default for future charges.update_subscriptions— whenset_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.
| readOnly | destructive | idempotent | openWorld |
|---|---|---|---|
true | false | true | false |
delete_payment_method
Remove the EPD Commerce mirror of a card. The underlying gateway vault entry is governed separately.
| readOnly | destructive | idempotent | openWorld |
|---|---|---|---|
false | true | true | false |
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.