#Aniket

1 messages · Page 1 of 1 (latest)

tacit garnetBOT
hoary vortex
#

Hello! This is something we're working on, but I'm not sure of the status. Hang on while I check...

signal ferry
#

Np, take your time.

hoary vortex
#

To clarify, are you specifically wanting to avoid Checkout in setup mode? If so, can you tell me why that is?

signal ferry
#

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.

hoary vortex
#

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.

signal ferry
#

free service

#

Ohhh, then I should use checkout session in setup mode just to collect customer info like location, right?

hoary vortex
#

Checkout doesn't really collect location, unless you're talking about the billing address info associated with a method of payment?

signal ferry
#

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.

hoary vortex
#

Yep!

signal ferry
#

{
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.

hoary vortex
#

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).

signal ferry
#

So please help me how can I checkout with price set to zero and with product details

hoary vortex
#

You can't.

signal ferry
#

payment modes: setup and payment ain't allowing me

hoary vortex
#

But I'm not sure I understand why you would want to?

signal ferry
#

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.

#

😩 😫

hoary vortex
#

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.

signal ferry
#

Np, I'm gonna go through the manual process then with the forms. But I really want some feature to support this from Stripe because it's a really amazing API.

#

Thanks btw.