#leuquim

1 messages · Page 1 of 1 (latest)

dim pollenBOT
snow steeple
#

Hi, let me help you with this.

#

Have you considered using Subscriptions?

burnt swallow
#

In our case we just require a 1 time payment, not recurring

snow steeple
#

You can ask the customer what plan they want and only then create an Invoice.

burnt swallow
#

Ok, so then if they switch plans I'll just create more invoices, and they pay the last one they choose?

snow steeple
#

Yes

#

Or just create an Invoice when they confirm they want to pay.

#

In a separate step.

burnt swallow
#

They currently confirm payment by clicking on the "Pay" button of the Stripe Elements UI, which requires the invoice to be finalized to get the client secret etc.

snow steeple
#

But are you mainly interested in Invoices or Prices/Products?

burnt swallow
#

I guess I'll just need to create an invoice each time they change option

#

Prices/Products

snow steeple
burnt swallow
#

Checking it out!

#

@snow steeple I don't see an option in the checkout documentation that allows specifying optional products (i.e. different service plans) - instead I need to specify the exact product the user is going to pay for. Is this correct? If so, I would need to regenerate a new checkout session & update the embed UI each time the user selects a new plan. Is this what you were proposing?

Page sections would be like:

[ Custom plan selection ] <-- Click on a plan
[ Embed Checkout ] <-- Re-render on change

snow steeple
#

Do you want plan selection and checkout form on the same page?

burnt swallow
#

Yes

#

That's my main problem

snow steeple
#

I see. What exactly do you need from the Products/Prices API? Use it as a database for your plans?

burnt swallow
#

We like that we can manage product data & prices from Stripe, the ability to use Discount Codes & how Stripe can keep data about which products were sold in each invoice, vs now it's just a Payment Intent description and amount.

#

I can't see anything in the API docs that would allow us to do what I'm looking for so for now I think we'll have to settle with creating + finalizing a new invoice each time the user selects a different plan in the UI. Will create some "orphan" invoices but shouldn't be a big problem

snow steeple
#

Ok. You either can create new Invoices when the customer changes the plan. Or just use Prices as a database, and just take the amount to set on your raw PaymentIntents.

burnt swallow
#

Got it. Thanks for your help!

snow steeple
#

You can still record the Price ID in PaymentIntent metadata