#choorhong-one-time-purchase
1 messages · Page 1 of 1 (latest)
You can pass that in when creating the PaymentIntent https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-create-payment-intent
It doesn't show that in the tutorial one moment for another doc link
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.
(Yeah I just relearned that)
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?
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?
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)
My lord.. You are AWESOME!