#B33fb0n3
1 messages · Page 1 of 1 (latest)
You cannot use the retrieve endpoint to get more than one price. You use the List endpoint to return multiple prices
Hm ok. Do you know, How I can do the following:
The customer choose a custom product with some extras. In this example we say the Customer buy ice cream online. He choose a default product with a Price and take the extra „schoclate saurce“. In the frontend I deal with the PriceIds, so the Customer cannot modify the Price. I want to use my frontend (so no Stripe checkout), but Need to create a paymentintent to get the payment Elements. To create a payment intent, I cannot Just say „take these PriceIds and make a paymentintent.“ I Need to say the specific price. If I now request every amount from each priceId it would be very inefficant. How do I resolve this Problem with the Stripe api?
I'm sorry but I find that wording very confusing. Why don't you know the correct PriceID at the time of creating a Payment Intent?
Also Payment Intents do not use Price IDs
So what does your integration look like?
I do know the Right priceid
Yeah I know, thats my Problem xD
So how are you using Stripe APIs here?
In frontend there are products with PriceIds, the Customer select the prices That he want and now the checkout process is Build by me
Currently I think about the Customer Check out
How are you charging your customer?
Currently, not. Normaly the integration would be with the orders api Perfect. I can provide the PriceIds and the payment intent will be automaticaly created. But it will be disabled…
Yes that is true
So How do I resolve this Problem?
Currently Stripe Checkout is the best option for you to use Price IDs unless you want to use Invoices https://stripe.com/docs/invoicing/integration
I know, but I want to use a Custom checkout
Okay so how about Invoicing? An invoice generates a Payment Intent you can use to render a Payment Element on your own site and uses Price IDs.
Do you have a Link to the docs
The one I shared earlier
Ah. The customer get in each case an email with the invoice?
That is up to your settings. We mention that here: https://stripe.com/docs/receipts#receipts-with-billing
Ok, so I can choose, if I send an invoice (than Stripe checkout process) or Not to send (than I have the paymentintent thought the invoice creation and can use it), Right?
I'm sorry I'm totally lost by that statement. You can choose whether to send emails or not in your Dashboard settings. You can also use whichever API (Checkout, Invoice) best suits your use case. They are independent of each other.
But where do I get the payment intent via the PriceIds to create the payment Elements?
You don't get the Payment Intent via the Price ID
If a user selects an item that has a Price ID, your server would then create an Invoice object which would include a Payment Intent
Bug How do I collect the Customer payment informations?
You use that payment_intent.client_secret to render the Payment Element
But the Customer would Normaly select multiple items
But How do I get it?
Okay so you select multiple items and pass those back to your server. Then you create the Invoice and expand the Payment Intent parameter by including the expand: ['payment_intent'] in your call to create the Invoice: https://stripe.com/docs/api/expanding_objects
This would return an Invoice object with the payment_intent.client_secret property you can return to your front-end
Ah got it. So no emails to the Customer, Right?
That depends on your customer email settings
Ok, would the Customer be confused, if he get a Mail, but paid directly on the page and also get the „you paid“- Email?
Ah ok. The api For the invoice will also accept productIds and than choose the default priceid if a Customer choose a product?
No. I think you will need to carefully review our Invoice docs to make sure the behavior is what you want first.
Ah ok. But multiple PriceIds maybe with multiple quantitis are possible, Right?
👋 stepping in as Snufkin needs to step away
Yes multiple Prices with different quantities is supported
Ah perfect. I gonna Test this integration tomorror. If I have further questions, than Just find this thread and reopen it, Right? 🙂