#meow_67428

1 messages · Page 1 of 1 (latest)

stray frostBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

dark jay
#

The above guide is for one-time payment

stone dew
#

so people using google and apple pay cannot create subscriptions ?

dark jay
#

User can use Apple Pay and Google Pay for subscriptions

stone dew
#

how ?

dark jay
#

Payment Element will render Apple Pay or Google Pay if the device supports it

#

As mentioned earlier, deferred intent flow is for one-time payment, not subscriptions

stone dew
#

we'd like to display the payment element before creating a subscription (in case the customer wants to select a different plan before subscribing)

#

how do we display the payment element before creating the subscription ?

dark jay
#

You can follow this guide to create a payment method from Step 1 to Step 4: https://stripe.com/docs/payments/build-a-two-step-confirmation

The use Subscriptions Creation API and set the default_payment_method to the payment_method collected earlier: https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method

Add an optional review page or run validations after a user enters their payment details.

stone dew
#

and since the subscription itself creates a payment intent, I use that payment intent to process the (google /apple) payment, correct ?

#

so back to my original question, do I create the subscription before calling confirmPayment() ?

dark jay
#

Yes, the subscription should be created before calling the payment intent and use its client secret to confirm it

stone dew
#

and should it be created before the call to confirmpayment ? logically it should be but I just want to be sure

dark jay
#

yes

stone dew
#

do I still need to call payment intent after creating a subscription ? or can I simply access the client secret through the payment intent object that is nested in the subscription object ?

stray frostBOT
peak jay
#

Taking over here. You don't need to create an intent after the subscription creation no. We'll generate the relevant intent (payment/setup) dependent on parameters