#fkaib

1 messages ยท Page 1 of 1 (latest)

marble lilyBOT
civic shell
#

Yes, the payment_behavior parameter helps with this. I'd reccommend reading the full doc section but basically if you pass in allow_incomplete or default_incomplete the subscription will be created with an incomplete status where it will wait for up to 24 hours for the first payment https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_behavior

jovial matrix
#

I see. And do I just use the client secret to confirm the payment?

#

I'll take a look a that

civic shell
#

Correct, you pass the payment intent's client secret to the frontend and confirm it with Stripe Elements just like how you would if you created the payment intent directly.

marble lilyBOT
jovial matrix
#

how do I specify the payment method in the confirm function?

#

here is the request ID:
req_SV2Mra6o6hGWNe

opal burrow
#

Hi there ๐Ÿ‘‹ taking over, as my colleague needs to step away

how do I specify the payment method in the confirm function?
I don't understand this question. Do you mean:

"I have a Payment Method already created. How do I use it?"

Or are you asking something different?

jovial matrix
#

So I have a billing page where users can add a payment method. I have another page where users can purchase a subscription. If the user has a payment method on file si there a way to use that in the stripe
.confirmPayment()?

#

I was able to add a payment method in the backend when calling stripe.Subscription.create(). However I'd like to do it in the stripe.confirmPayment function in the frontend instead.

opal burrow
jovial matrix
#

I do that in the Billing page. In the Payment page I create a subscription where users can purchase.

opal burrow
jovial matrix
#

I see. That's what I had originally but I was looking for a way to make it into two steps. I guess I can just stick to the old implementation. Thanks for all the help!