#meow_67428
1 messages · Page 1 of 1 (latest)
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.
- meow_67428, 5 days ago, 5 messages
The above guide is for one-time payment
For subscription integration, you should follow this guide: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
so people using google and apple pay cannot create subscriptions ?
what if instead of creating a payment intent in this flow (step 4), I created a subscription ? https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment#web-fulfillment
User can use Apple Pay and Google Pay for subscriptions
how ?
https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements supports Apple Pay and Google Pay with Payment Element integration
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
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 ?
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
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() ?
here, I'd replace the step 4(create payment intent) with subscription creation, and then finally call confirmPayment ,correct ? https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment#web-fulfillment
Yes, the subscription should be created before calling the payment intent and use its client secret to confirm it
and should it be created before the call to confirmpayment ? logically it should be but I just want to be sure
yes
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 ?
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