#ben_api

1 messages Ā· Page 1 of 1 (latest)

warm vigilBOT
#

šŸ‘‹ 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.

runic pulsar
#

hi there!

#

what do you mean by "custom checkout"? you want to use the Payment Element or something else?

velvet perch
#

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?

runic pulsar
#

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.

#

and you could adapt it to work with Subscription Schedules

velvet perch
#

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?

runic pulsar
velvet perch
#

I am reading through this; are you sure this is the appropriate way to do it?

#

(i realise it is beta)

runic pulsar
#

yes this is a beta fetaure that we don't know much about here on Discord

velvet perch
#

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?

runic pulsar
#

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.
velvet perch
#

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

runic pulsar
velvet perch
#

OK cool, so mode: 'subscription'

#

Does the stripe promise matter here if this is for a connect account?

runic pulsar
velvet perch
#

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' });

runic pulsar
#

yes

velvet perch
#

sweet, got it