#ihaveabeard_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/1458549778072731649
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
What is the difference between checkout and payment intent?
Is one more preferred over the other? Does one have more options?
If you are creating a payment intent directly, it will have a client secret that you can pass to that confirmPayment call. The Checkout Session client secret is a different thing for embedded checkout or checkout with Elements flows. https://docs.stripe.com/api/payment_intents/object#payment_intent_object-client_secret
ok so I need to use the checkout.confirm() if I use the checkout session secret
Is one more preferred over the other?
Both are viable, definitely more of a personal choice. I think the general tradeoff is that Checkout does more for you, but is less flexible, wheras working directly with subscriptions/intents is more flexible but can mean more code on your side.
Both flows can do both subscriptions and one-time payments, but I' recommend you stick to the same solution for both when working on a specific integration. You can mix and match, but that will make your codebase more split and wonky. If you use the same for both, you can re-use more across the two flows.
Looking through this doc may help you. "Advanced Integration" tab is Elements with a payment intent secret, the "Embedded form" and "Embedded components" tabs show how to use the Checkout Client secret.
https://docs.stripe.com/payments/accept-a-payment
Ok sounds good, thanks!