#luxterful_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1348601341085220885
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- luxterful_docs, 2 days ago, 61 messages
- luxterful_subscription-trial-pm-collection, 3 days ago, 30 messages
I already talked to you in this thread: https://discord.com/channels/841573134531821608/1347515588917989378
and the recommendation was to use the "Collect payment details before creating an Intent" for subscriptions
๐
And what is the issue you are facing now ?
Ah sorry, you get the same error even when creating the PM before creating the intent
Betwee, have you tried to follow this guide?
https://docs.stripe.com/billing/subscriptions/ideal
You should use the created Sepa Payment Method generated
the link you shared is only for checkout sessions right? we use stripe elements
Can you create a PaymentMethod following this guide:
https://docs.stripe.com/payments/ideal/set-up-payment?platform=web&payment-ui=elements
Backstory: We already use stripe and we sell subscriptions with different plans. Some plans have trial, some dont. At the moment we create setup intents as soon as the user enters the checkout page. With this approach ideal works. But it raises two issues:
- we have a user which abuses us to itterate credit cards because we create a new setup intent for every user entering the checkout. So captcha wont have enough time to see if it is a real user.
- we see 0.00โฌ in google pay since we use setup intents and they dont have a amount set to it
Thats why we are reworking our checkout process. We want to use the "Collect payment details before creating an Intent" to tackle the iterating cards user.
And we want to fix the google pay issue.
Right now i have rewritten the code so that stripe elements uses the mode "subscription" but now i get the error for ideal ๐ฆ
i mean for checkout sessions ideal just works for subscriptions but why does it not work with stripe elments ๐ฆ
yea, just read my previous message i hope that makes things clear
since we sell subscriptions with and without trial things get complicated ๐
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
i still wait for the answer to my question here ๐
it was just the clarification which made the answes of @nova parrot not helpful
I think we spoke at length last week, right? Not sure why you create a Setup Intent on every page load, doesn't seem very efficient
But yes, the deferred flow you linked will help with that โ that seems pretty clear. As for the Google Pay issue, no that can't be fixed with a Setup Intent. They don't expose an API for that to be configrable and as there's no payment with a Setup Intent it will show $0
yes we spoke last week. i even linked the thread earlier in this convestation.
the issue is: last week we came to the conclusion to use "Collect payment details before creating an Intent" with mode "subscriptions"
i set everything up and changed the code. But now i get error:
'The payment method type ideal cannot be used with subscriptions that have the collection_method set to charge_automatically.'
Sure, seems expected as they're a non-recurring PM. The recurring part of iDEAL is facilitated by SEPA Debit. What code/request specificvally throws that?
stripeClient.subscriptions.create
The actual request ID is more useful but I guess you're passing an iDEAL PM to default_payment_method
Which is where the advice from my colleague is relevant
here is the id: req_PRmC0lH5fD9Fgz
You need to remove ideal from payment_settings[payment_method_types]
Ahh, and then if i use ideal it will still work?
Depends what you mean by 'use iDEAL'?
As we've stated, the recurring part of iDEAL is facilitated by SEPA
Yes, but the question still remains then. How to do this with stripe elements and using "Collect payment details before creating an Intent" with mode "subscriptions"?
We need IDEAL
You can't, you need to set up the payment separately like here: https://docs.stripe.com/payments/ideal/set-up-payment?platform=web&payment-ui=elements
So i need to use setup intents directly?
See this guide: https://docs.stripe.com/billing/subscriptions/ideal
How does your last link relate to stripe elements? its only about checkout sessions which is something different?
I don't understand why you're passing p_m_t in the first place?
Thought there was an Elements guide but there isn't
because the code yelled at me that it was missing
If you're doing a deferred flow, then iDEAL shouldn't even show up for mode: 'subscription' in the Payment Element?
If you explicitly want the iDEAL redirect for the customer to auth the payment then you need to use mode: 'setup'
so the conclusion is: iDEAL just wont work with mode: 'subscription'?
no matter what i try
Yes in the deferred flow
So coming back to the last weeks conversation: https://discord.com/channels/841573134531821608/1347515588917989378
i think the only option now is to use the deferred flow and switch between setup and payment depending on the selected plan of the user?
Hi. I'm taking over from my colleague. Please, give me a moment to catch up.
depending on the selected plan
What types of plans do you mean?
We offer a plan with trial and one without trial
If the plan with trial is selected i need to use setup intents
if the plan without trial is selected i need to use payment intents.
is that correct?
But you're not using Subscriptions?
I will use subscriptions afterwards.
For setup intents i can just use the payment method right after the successful redirect to create the sub
For payment intents i can setup "store payment method for later" and then create a subscription which starts after the first period. (thats just an assumption)
I guess it's better to always use a SetupIntent to collect the PaymentMethod. After that, your Subscription will define if to charge the saved PaymentMethod immediately or not.
please read this message
Otherwise, the charge made with a standalone PaymentIntent will not be attributed to any Subscription's Invoice.
the issue is: 0.00โฌ are shown when we use setup intents for the non trial plan
use setup intents for the non trial plan
What do you mean by this exactly?
Do you create a standalone SetupIntent?
If it's standalone, what does "for the non trial plan" means?
Do you create a standalone SetupIntent?
what else should i use?
If you create a Subscription, a latest_invoice.payment_intent or pending_setup_intent is generated automatically which you can use to confirm the payment and save the PaymentMethod. It's attached to the Subscription.
but this does not work with iDEAL
did you read the previous conversation i had with your coleagues?!
To clarify, your problem is that when an immediate payment is required, 0.00โฌ is shown, right? And instead you want to show the amount that will be charged for the initial Invoice?
Backstory: We already use stripe and we sell subscriptions with different plans. Some plans have trial, some dont. At the moment we create setup intents as soon as the user enters the checkout page. With this approach ideal works. But it raises two issues:
- we have a user which abuses us to itterate credit cards because we create a new setup intent for every user entering the checkout. So captcha wont have enough time to see if it is a real user.
- we see 0.00โฌ in google pay since we use setup intents and they dont have a amount set to it
Thats why we are reworking our checkout process. We want to use the "Collect payment details before creating an Intent" to tackle the iterating cards user.
And we want to fix the google pay issue.
Right now i have rewritten the code so that stripe elements uses the mode "subscription" but now i get the error for ideal ๐ฆ
i mean for checkout sessions ideal just works for subscriptions but why does it not work with stripe elments..... ๐ฆ
i mean for checkout sessions ideal just works for subscriptions but why does it not work with stripe elments..... ๐ฆ
Because of the deferred flow.
I understand.
Since you're using the SetupIntents, Google Pay will show EUR 0.00. To make it clearer, you need to design your checkout flow in 2 steps, suggesting to the customer that they're just saving the PaymentMethod in the first step, not charging it right away.
After that, in the second step, you make it clear to them if they will be charged immediately, or after the trial ends, and let them "select"/"see" the saved PaymentMethod from the previous step. In this step, you must make it clear, in your own UI, how much exactly they will be charged right now.
Imagine how you pay for Uber or Amazon. You save a PaymentMethod first, (as a separate step), then view the order summary, with items and the final amount, and then click "Confirm order".
yea looks similar like you said. to summarize what i should do now
We need:
- we need iDEAL
- we need the deffered flow to tackle the user which itterates credit cards to be able to rate limit him and also to be able to use captcha
- we want to use subscriptions
solution:
I think the only option now is to use the deferred flow and switch between setup and payment depending on the selected plan of the user.
The plan with trial is preselected, so i will initialize elements with mode "setup".
If a user will select the plan without trial, i will update elements to use mode "payment".
If the user click purchase i will confirm the intent (either payment of setup depending on the plan)
on the successful redirect in my backend, I will use subscriptions like:
- For setup intents i can just use the payment method right after the successful redirect to create the sub
- For payment intents i can setup "store payment method for later" and then create a subscription which starts after the first period.
Yes the first invoice for payment intents wont be linked to the subscription, but that should not be an issue?e
Alright, as long as it works for your use case, this approach sounds reasonable.
Unforunately i dont see any other option. do you?
Stripe has in-built card testing capabilities, but it requires you to re-use the same PaymentIntent/SetupIntent. Are you sure there's no way for you to fetch an existing PI/SI for a given customer?
Our checkout page is public and we have 90% guest users