#ilyeselb
1 messages ยท Page 1 of 1 (latest)
Hi! Let me help you with this.
it is because of this param payment_settings: {
save_default_payment_method: 'on_subscription',
},
?
i dont want it to be saved
What do you mean by this? Saved where?
Let me explain ,
the user can set his payment method before doing any payment
so i save it for him with the setup intent
now im a user but i dont want my card saved in the app
i fill the form to buy subscription
but its saving it asweelll to the custumer
because im retreving the custoomer paymentMEthod
and it appears there
i was wondering if it was because of this param on subscription creation
payment_settings: {
save_default_payment_method: 'on_subscription',
},
but if i dont set the default pm , is the subscription gonna be paid again in one month ? automatically
Do you have an example?
If a Payment Method was used by a Customer it will be attached to it, but unless it was set up for future usage you won't be able to reuse it.
by future usage what do you
mean
?
chargin autmatically , or usiing the saved pm to pay other invoices
Basically you can set up a Payment Method in the way that it can be reused.
okay , but here im using paymentMEthod.list({custmerID]
im getting every paymentmethod used for subscritpion payment
What are you expecting to get instead?
only the one that i saved for future usage
with
saved with setup Intent
Now what IM GETTING IS THAT EVRY TIME I CREATE A SUBSCRITPION
I understand now, thanks.
a pm is saved and retreved
Let me check.
Hi there ๐ jumping in as my teammate needs to step away soon.
There isn't a parameter that you can provide when listing Payment Methods to only list ones that were processed via a Setup Intent. Do you have flows other than your Setup Intent ones that create Payment Methods? If so, you may need to add a way to track those.
no im createing subscription with deffered payment
collect payment before intent method
and its saving the pm
this is what im doing
Sorry, I don't think I'm grasping the concern here. Are you trying to figure out how to adapt your flow to reuse an existing saved payment method rather than collecting a new one from your customer?
But sorry you never saw , that every payment have the save payment methode button where you can save your card and using it after inn other payment wothout clllecting any info
thats what im trying to explain since the beging
never mind i will check myself thank you
I'm really sorry, I don't know what save payment method button you're referring to. I'm trying to understand what you're asking, but it's not clicking for me yet, and I'm sorry about that.
its okay loook in amazon we can do that
add a payment mothod then it saved there and i can use it directly
i did that with save paymentMEthod method , that save pm with payment intent
and retreve it with paymentMethod.list
but when i pay for a subscription with filling a form
it save the pm automatically
Gotcha, so you're trying to create a new subscription using an existing payment method? In that case, you won't present a form to your customer to collect payment method details.
Instead, if it's a returning user that wants to reuse an existing payment method, you:
- List their available payment methods, and surface that list to the customer so they can select the one they want to use
- Create a new subscription for them, but when doing so you pass the ID of the selected payment method to the Subscriptions
default_payment_methodfield:
https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method
then the customer doesn't need to be sent through the process to collect new payment method details.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
okay this is what im doing , for paying subscription with saved card
- the issue that im asking about , is when i dont want to pay with that card , i pay with filling the form
when the payment is done , the payment method used , is automaticaly saved , how can i prvent that
Saved on the Subscription? Why are you wanting to avoid that? What payment method are you hoping will be used for the Subscription's future payments if you don't save the one being provided?
normalluy in every payment , the user have the choice to save his payment method during the payment
so he can use it in other payments
But Subscriptions require having access to a payment method if you're letting them charge automatically, otherwise the recurring payments will fail.
So if you're creating Subscriptions it typically makes sense to save the payment method so it will be used for future payments for that subscription.
okay thank you
okay and for this one
for 3DS authentication required card
its failing to pay
what is the alternative
Can you elaborate? Failing to pay as in the 3DS challenge isn't being surfaced/handled correctly? You want to have your flow ready to handle 3DS, it's used across most of Europe and is growing in popularity in other regions.
i mean the saved card , like you said here to create a subscription with default payment
the invoice of that subscritpion still open
and not paid affter creating it with defaultPm (3DS auth one)
i will manage that by returning the error and confirming the card in the client its okay its seems that stripe dosent have an alternativ for that
Did the payment encounter a failure?
and im creting the subscription with defaultPm and offSession: true
the invoice id
in_1Nt9SqGyOBDbEOMCrT3KfTrW
offSession isn't a parameter for Subscriptions. Taking a closer look at the Invoice.
I see, you used a test card that always requires 3DS to be completed in order for payemnts to be successful. So that's testing/catching the scenarios where an issuer may require authentication, even if the card has been set up or used in the past. Getting the associated client secret, bringing the customer back on session, and doing a client-side confirmation of the Invoice's intent would be a good approach for that.
yes thats what i was thinking about thanks,
do we have have an error response that i can base my self on
to redirect the client to confirmPayment ?
I think so, double checking
Yup, it looks like when you're creating the Subscriptions you're expanding latest_invoice.payment_intent, so the response should contian the Payment Intent for the Invoice and you can check its state. So you can look at latest_invoice.payment_intent.status looking for when that is set to requires_action.
gracias , its was helpfull
sorry for this amount of time
that i took from you
and have a good day
No worries, I'm glad I was able to help!
Hope you have a great day and weekend ๐
you too