#bouffe_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1270328859576762368
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
Here's my actual workflow with Card Element:
Front-end Javascript: Initiate the card element: elements.create('card');
After click on submit (and accept Terms): I do on backend call, which do a Subscription::create and I get the clientSecret
Then on front I do a stripe.confirmCardPayment(clientSecret, {payment_method: {card: this.cardElement} })
- Yes.
- You can hide it/not display it until they accept the T&C.
- If you create a Subscription before displaying the elements, you won't need to set the amount.
Have you looked at Payment Element? https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=elements
Yes I had a look, but it says to create a payment intent. Is it working the same way with a Subscription creation?
Because actually I don't create a paymentIntent
Yes, then you create a Subscription instead, which comes with a PaymentIntent included: https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=web&ui=elements
Are GooglePay & ApplePay included in Subscription custom flow?
I don't see anything related to that in this page
If you use Payment Element, they will be available as long as you cover the requirements (same for Express Checkout Element): https://docs.stripe.com/elements/express-checkout-element/accept-a-payment#prerequisites
Ok thanks. I will try to manage all of that
Happy to help.