#kellycarpet-subscription
1 messages · Page 1 of 1 (latest)
Hi, let me clarify a bit on this
So you want to use PaymentRequestButton, and SetupIntent?
correct
How are you currently creating the Subscription?
i want to be able to allow users to setup a subscription (with 30 day trial) using apple pay
(or google pay...)
currently, i have a credit card form. on the server side, i create a customer and subscription, and i send the pending_setup_intent's client token to the client-side, and then do:
stripe
.confirmCardSetup(clientSecret, {
payment_method: {
card: elements.getElement(CardNumberElement),
billing_details: {
email: props.customerEmail,
},
},
})
👍
Hi there, looking around the guide for PaymentRequestButton (https://stripe.com/docs/stripe-js/elements/payment-request-button), I don't see any option to work with SetupIntent, since the confirmCardSetup is entirely different method and it's purpose is also different than PaymentRequestButton's confirmCardPayment. Let me ask some of my colleague to see if they have other useful information for you
Hi @jade gulch we think it is possible. You can following the PaymentRequestButton guide above, and then in step 5 "Complete the payment" [0], you will just need to swap the confirmCardPayment method with confirmCardSetup you had, with the payment_method to ev.paymentMethod.id like the doc is doing
[0] https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-complete-payment