#Aniket
1 messages · Page 1 of 1 (latest)
Hello! This is something we're working on, but I'm not sure of the status. Hang on while I check...
Np, take your time.
To clarify, are you specifically wanting to avoid Checkout in setup mode? If so, can you tell me why that is?
I've set checkout session to "payment" mode not setup, not even any custom one. I've a free service with price set to 0 and I want to go through checkout session with price zero.
That's what Checkout in setup mode is for, unless I'm misunderstanding your use case.
Checkout in setup mode is designed to collect payment information from your customer to be used later, without taking a payment now.
free service
Ohhh, then I should use checkout session in setup mode just to collect customer info like location, right?
Checkout doesn't really collect location, unless you're talking about the billing address info associated with a method of payment?
yes, I want to collect customer info like billing address, email, name and phone number through checkout session which I'm creating at my backend and session session url to frontend
but even if price is set to zero. But Stripe isn't allowing me to do that with price 0. So I guess I need to change the checkout session mode to setup if I want that.
Yep!
{
line_items: [
{
price_data: {
currency: 'usd',
unit_amount: 0,
product_data: {
name: productName,
description: productDescription,
images: [productImg], // max 8 image URLs
},
},
quantity: 1,
},
],
customer_creation: 'always',
phone_number_collection: {
enabled: true,
},
success_url: REDIRECT_URL,
cancel_url: REDIRECT_URL,
mode: 'setup',
}
With payment setup mode, I'm passing product data but stripe still not allowing
StripeInvalidRequestError: Mode cannot be setup when using prices.
Yeah, you wouldn't use Products or Prices, Checkout in setup mode is only to collect payment info for later use, not to make any kind of purchase (because there's no money changing hands).
So please help me how can I checkout with price set to zero and with product details
You can't.
payment modes: setup and payment ain't allowing me
But I'm not sure I understand why you would want to?
Because I've a free service with price zero and upon checkout I wanna show customer product details and wanna collect billing address, name, email and phone number.
I've a webhook too, which is dealing with my database to create service orders.
😩 😫
Sorry I don't have a better answer for you. I know this is something we're planning to improve, but I don't have an ETA for when that improvement might ship. Today, though, there's no way to do a $0 Checkout Session in payment mode the way you want.