#rangermillze_api
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/1293540259325542483
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- rangermillze_api, 15 hours ago, 28 messages
- rangermillze_api, 20 hours ago, 60 messages
- rangermillze_api, 22 hours ago, 27 messages
- rangermillze_api, 23 hours ago, 89 messages
You'd create the subscription inside the confirm event handler, like here
If the button(s) aren't rendering at all, then there is likely an error in your browser console?
Well, that's fine too. You can create it pre button click but that just means that any updates your customers makes in the checkout flow, like applying a discount, won't be applied. Which is why we recommended it's done after the payment
i thought I had to create the subscription to get the clientsecret?
do i create a new subscription if the user pays in paypal?
Yep, and the client secret is only used inside the same confirm handler where you call confirmPayment
You don't need a client secret upfront to render the ECE. This guide is what you should be following, the Payment Intent part is interchangeable with a Subscription mostly: https://docs.stripe.com/elements/express-checkout-element/accept-a-payment
Do i just send the total amount for the subscription and the currency?
it doesnt make sense because I see mode: subscription, mode: setup and mode: payment. Im unsure what to use here for my options. The documents only have mode: payment
is the paypal ece just creating a payment intent?
You'd pass mode: 'subscription' yes
ok, so i just pass mode: amount: and currency?
do i pass the client id? because I have already created a client at this point or obtained the client secret
ah, i see some information i havent seen before in the doc you sent. i'll have a play and see if I can get it working. thanks.
hi! I'm taking over this thread.
Hi Soma
great! let me know if you have any other questions.
sure, i have the setup I need working in that I can pull up the payment element and when someone presses paypal I create the paypal EXE elemenet and hide the checkout button.
at this point the paypal button is the ECE mounted one.
Does this seem right? I am basically stopping the original Paypal flow and switching the checkout to use the ECE. Once the ECE is complete I dont need to post the form anymore?
i have the setup I need working in that I can pull up the payment element and when someone presses paypal I create the paypal EXE elemenet and hide the checkout button.
that seems like a complicated flow. why not simply walways display the Express Checkout Element above the Payment Element? which means the "paypal" option in the Payment Element will disapear.
ah so i show both buttons?
i'll try that
on the paypal side, should I set captureMethod and setupFutureUsage when using mode subscription?
ah so i show both buttons?
you show the Express Checkout Element on top, and just below the full Payment Element. then users choose between the two. this is a common pattern