#ben_api
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/1298618858588082286
š 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.
- ben_api, 21 hours ago, 8 messages
- ben_webhooks, 22 hours ago, 23 messages
- ben_webhooks, 1 day ago, 4 messages
- ben_api, 4 days ago, 26 messages
- ben_api, 4 days ago, 25 messages
hi there!
what do you mean by "custom checkout"? you want to use the Payment Element or something else?
Hey, well i had described how we intend to use and apply schedules to create complex subscriptions. It was recommended i use a custom checkout to facilitate this as we were limited with what we can show via hte stripe checkout, and would then need t orely on metadata and hooks to achieve it (no issue there really).
The other option was using stripe elements (custom checkout) to facilitate the purchase process which is fine. I am trying to understand if we would still create a checkout session for this or not
or at that point, is everything off stripe and on our platform?
The other option was using stripe elements (custom checkout) t
"custom checkout" doesn't mean anything. if you mean the Payment Element, please say the Payment Element, otherwise it can be confusing.
and if you use the Payment Elemnet, then no you don't create a Checkout Session.
you can check this giude that shows how to create a Susbcription + Payment Element: https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=web&ui=elements
and you could adapt it to work with Subscription Schedules
lol, i mean.... if i knew what to use I don't suppose i would be here asking š¤¦āāļø
So no checkout session required, the entire process is handled off stripe at this point by us in a way of our choosing?
if you are not familiar with the different ways to accept a payment with Stripe, I recommend reading this guide: https://docs.stripe.com/payments/accept-a-payment/web/compare-integrations
I am reading through this; are you sure this is the appropriate way to do it?
As there is this - https://docs.stripe.com/checkout/custom-checkout
(i realise it is beta)
yes this is a beta fetaure that we don't know much about here on Discord
OK, we are doing this with connect by the way.
For now checkouts will be pre-prepared, e.g. the content on them will be decided in advance. We are't allowing any form of basket creation etc until later on.
So the customer will already be created and we are essentially sending that customer a link to pay. Does this align with the link you provided me?
This guide talks about creating the subscription in advance, but essentially awaiting payment then using the payment element to collect payment info (with a pyment intent) to then attach and charge.
Can it not be configured to not create a sub in advance, but the user goes to the page, it explains what is to be purchased, they fill in the payment element then on submission we grab the product, add the PM, create the sub and charge?
have you read the links I shared before? We offer three main ways to accept payment (excluding the things in beta):
- Chekcout Session -> you send the user to a stripe hosted URL
- embedded Checkout Session -> you embed a Checkout Session in your own page
- Payment Element -> you embed a payment form in your own page
For subscription schedules, since it's not supported by Checkout Session, you would have to use the Payment Element. Or create a regular Subscription with a Checkout Session, and then convert that Subscription into a Schedule.
Yes I am aware of these. We know we are likely going to have to do the latter. What I am asking specifically here is about the process. As the link you provided was a quite specific process of :
- Collect the customer info and create them in stripe
- Pick a product (subscription) and then create this and return a payment intent
- Use the PAyment element to collect PM and return to stripe
- update the customer and charge the invoice for the sub
I am asking if it must be done this way? E.g. can we pre load our 'checkout' but not have already created anything subscription wise. Collect the PM via the payment element and then send the PM to the backend. Here update the customer with the PM, grab our referenced schedule from our unique checkout id, create the scheduel via the API which will create the sub and then bill the csutomer
can we pre load our 'checkout' but not have already created anything subscription wise.
yes, that's covered in a different doc: https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=subscription
OK cool, so mode: 'subscription'
Does the stripe promise matter here if this is for a connect account?
if you are creating the Subscription on a connected account, make sure to use the Stripe-Account header on both the backend and forntend: https://stripe.com/docs/connect/authentication
OK cool so its the same key, but with the additional param of stripeAccount: connected_account_id in the front end.
const stripePromise = loadStripe(import.meta.env.VITE_STRIPE_KEY, { stripeAccount: 'id' });
yes
sweet, got it