#choorhong-one-time-purchase

1 messages · Page 1 of 1 (latest)

polar heart
#

It doesn't show that in the tutorial one moment for another doc link

vagrant chasm
#

hmm are you sure @polar heart ? As far as I know you can't pass Prices to PaymentIntents unfortunately! They only take raw amounts today, Prices only work with Checkout and Invoices/Subscriptions.

polar heart
#

(Yeah I just relearned that)

eager temple
#

Hi, but paymentIntent requires amount, I kinda want to let Stripe charge the user according to what the priceId specifies (without me specifying the amount). Can I do that?

polar heart
#

Thanks @vagrant chasm

#

You can look up the price and use its info

eager temple
#

Actually I am working on a project and eventually, the client will get charged a ONE-TIME SETUP FEE + a RECURRING subscription fee. The owner of the project does not want to use STRIPE CHECKOUT as he feels like 'it is another page'. He wants to integrate STRIPE ELEMENTS.

#

So, what stripe methods or functions can I execute the payment transaction (involving both one-time payment priceId + recurring subs priceId) without using STRIPE CHECKOUT?

#

Can I create a subscription and pass both one-time payment priceId + recurring subs priceId to the items argument? For example:

stripe.subscriptions.create({
....
items: [{ price: 'one-time payment priceId', quantity: 1 },
{price: 'recurring subs priceId', quantity: 1}]
....

#

Would it be an error? Since the 'one-time payment priceId' isn't a subscription and I am passing it to create a subscription? Would the client get charged the ONE-TIME SET UP FEE again next year?

vagrant chasm
#

you can pass a one time item yep! but not that way

#

you'd use add_invoice_items on the subscription instead, but it does what you're looking for

#

(involving both one-time payment priceId + recurring subs priceId) without using STRIPE CHECKOUT?
if you want to use Prices specifically, then it can only be Invoices or Subscriptions, so sure , you can use Subscriptions and accept the payment details using Elements! https://stripe.com/docs/billing/subscriptions/elements (and can combine with one-time items as described above)

eager temple
#

My lord.. You are AWESOME!