-
I'd like to know if and how is possible to specify a payment card to use within cart. Given that account (customer) has multiple cards attached I'd like to show them in a list. Customer would then select the card to use for checkout. However no documentation mentions how to do that without entering the card details again through Stripe elements. Also, how do I set a card as default (i.e. card on file) for the account? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hey @VojtaSim , The default card is the one set as the
Details can be found here: https://developers.swell.is/frontend-api/credit-card-management |
Beta Was this translation helpful? Give feedback.
-
So to select a card I want to use for current checkout I have to set it as default, or does you answer regards only about how to set the default card? |
Beta Was this translation helpful? Give feedback.
-
You can also pass a credit card by ID:
|
Beta Was this translation helpful? Give feedback.
@VojtaSim to explicitly set a card for the checkout you can update the cart billing details by passing in the
card.token
of the card you want to use: