#Monkey
1 messages · Page 1 of 1 (latest)
Checkout Session API is for Stripe hosted payment page. It will generate a URL for customer to complete the payment: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-url
If you wish to use custom checkout, i.e. embedded payment in your website, I'd recommend using Payment Element with Payment Intent instead: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
So no point for call "https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-url"
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
?
Calling the URL will redirect to the Stripe hosted payment page.
If you want to use Stripe hosted payment page to collect the payment, then you should redirect the customer to the URL
If you do not want to use Stripe hosted payment at all, then Checkout Session is not recommended. I'd suggest using Payment Element with Payment Intent instead: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Are you willing to write a step-by-step instructions? For example:
- Make an API call to PaymentIntent
Q: Can I add line_items or use product ids when using PaymentIntent? - Get the ID from the response
- Use the ID in...
For Payment Intent, it doesn't require any line item. It simply collect the final amount. Creating products and prices are not required.
The guide provides the step-by-step instruction on how to implement Payment Element with Payment Intent. My step-by-step instruction will be the same as the doc.
Alternatively, you can follow this quick start guide (Choose Custom payment flow and language of your preference) for the complete code and steps: https://stripe.com/docs/payments/quickstart
Got it!
River you're a rock star! Thank you!