#akii-PaymentIntent
1 messages · Page 1 of 1 (latest)
Hi @unreal topaz the PaymentIntent API doesn't allow line_items at this moment. You can pass line_items in Orders API and Checkout Session API
Which API are you talking about?
https://stripe.com/docs/api/prices/retrieve?lang=python#retrieve_price You can use this API to retrieve the price object and the amount from it.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
okay thanks
Hi Jack , Im using this https://stripe.com/docs/payments/save-during-payment approach in my site. I also want to add 1 thing here. I want the user to pay for a Product and not some random amount. How can i do that?
As I explained earlier, you can't pass line_items to PaymentIntent creation API.
You can still use the SetupIntent API to collect the PaymentMethod, and you can use the PaymentMethod with Orders API or Checkout Sessions API.
If i dont have a paymnet method yet for the user. I also wanted a custom flow so i dont want to use Checkout Sessions API
Sorry I don't understand the question, can you elaborate?
If i use Checkout Sessions, and lets suppose the user does not have any Payment Method saved yet.
Will that work?
Hmm, or maybe you can tell me what's the expected result you want to get from Checkout sessions?
I want to add user to the subscription, and pay for it, and save the Credit Card as default too..
OK. You can use subscription mode Checkout session to achieve it.
This is the doc for you to get started https://stripe.com/docs/billing/quickstart
Okay ill try this out