#Suren-save-payment-details
1 messages · Page 1 of 1 (latest)
Hello! You're using Checkout and you want to save the payment method to the Customer object, right?
If so, there's details on how you can achieve this with the setup_future_usage parameter here: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout#save-payment-method-details
honestly, I don’t know how best to save and then pay with one click
If you're using Checkout in mode: 'payment' then that is the way to do it
It'll handle auth/3DS, process the initial payment and save the card to the Customer object
if i put setup will it save my map?
Not sure what you mean here?
and how to pay externally with a tethered card
If you're using Checkout, it'll be prefilled by passing thecustomerparameter: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout#handling-existing-customers
In payment mode, the customer’s most recent card payment method will be used to pre-fill the email, name, card details and billing address on the Checkout page
for example, I already have an attached card, but I want to pay through another card, how can this be done
Are you using Checkout? Is it a one-time payment?
How are you currently integrated? The answer depends on a lot of factors!
look I found setupIntent here
As ynnoj mentioned, the flow you're looking for is going to depend on the type of integration you're using. You mentioned setup intents, are you working directly with these objects?
i just don't understand the difference between these methods
I want to save the user's card for further payment by clicking
Those are very different. The first one is creating a Setup Intent, the second is creating a source. Have you gone through any of our docs on how to save payment methods for future use? I'm not sure if you're trying to save the card during a payment or not, so I don't which one is the best fit for your scenario.
Saving during payment:
https://stripe.com/docs/payments/save-during-payment
Saving a card without making a payment at the same time:
https://stripe.com/docs/payments/save-and-reuse
no, I just need to save the card data at this moment and that's it
That's the second link then.
Yes, select the 'Custom payment flow' at the top of that doc to see the Setup Intent flow.
thanks, can I have one more question
always
see, when paying, I want to offer either payment with an existing card or with a new card
if I pass the customer id to paymentIntetn
will not there be an automatic charge
No. You will still need to tell us which payment method to charge, as shown in Step 7 of the previously linked doc which discusses how to charge a saved payment method.
aaaa everything is clear
and yes i will try to get a list of all attached cards but i think i don't get what i expect
there is no information about which card is attached
@sour path Not sure what you mean, the next line of the data you showed is payment_method: pm_123... which is the payment method associated with that setup intent
What exactly are you trying to do thats not working as you expect?
I want to get a sheet of anchor cards
What are anchor cards?
linked cards
Instead of listing setup intents you'll want ot list the customers saved payment methods:
https://stripe.com/docs/api/payment_methods/customer_list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.