#shayan - payment request button & subscription

1 messages · Page 1 of 1 (latest)

sturdy plume
#

Hey there, what about this is giving you trouble exactly? Where are you stuck?

queen crescent
#

from what I understand uptill now is that you need to create a payment intent and than pass it to PaymentRequestButtonElement
or PaymentElement that is needed for onetime purchase, show how to ask for a subscription? where can I pass the stripe price_id for recurring purchase?

#

I'm trying to set it up for subscription and one time purchase, It's good to go for one time purchase but a bit confused on subscription flow

sturdy plume
#

That would work directly with the payment element

#

the payment request button is a little different, as you need to get the payment method first

#

You get the payment method from the PRB there and then use it to confirm the payment intent

#

in the on('paymentmethod') event

queen crescent
#

Got it, I'll implement it this way, just one other question, can we create a payment intent with price id instead of manually passing the amount and currency?

sturdy plume
#

We're working on something like that, but not currently in the public API no

queen crescent
#

ok, thanks a lot @sturdy plume

sturdy plume
#

NP!