#Laestry

1 messages · Page 1 of 1 (latest)

mint solarBOT
toxic nest
#

hi! to be clear, are you specifically using our Checkout (/v1/checkout/sessions) API for this?

unborn barn
#

oh yes indeed

toxic nest
#

well you can a mixture of recurring and one-off line items to Checkout in mode:subscription, that works fine. The one offs are charged as part of the first invoice.

#

i.e. the cart might look like this

unborn barn
#

line_items.data.price.recurring

#

would I change this var?

#

aaaa

#

prob this one? line_items.data.price.type

#

to one_time?

toxic nest
#

well generally you create the Price objects ahead of time and just pass in the IDs

#

but yes it's the type of the Price indeed

unborn barn
#

wow thanks! It's just one of the boxes the customer orders can be custom filled with items

#

ah

#

so your saying I could create the product ahead of time, but how could I change if it's just one time or recurring?

toxic nest
#

hmm, well you wouldn't

#

you would create various Products/Prices in your account, save the IDs to your database, and pass them into the Checkout as needed, for example

unborn barn
#

thanks so much, weird how it needs the mode: "subscription" seems unnecessary