#some1ataplace_api

1 messages ¡ Page 1 of 1 (latest)

limber daggerBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1257747280199422044

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

quiet fox
#

Hello! Are you using Stripe Checkout or something else?

slender jungle
#

checkout

#

I would rather have my users enter into a form on my website the promo code before getting redirected to checkout

quiet fox
#

You can do what you want, but it's more work.

slender jungle
#

Yes I understand it is more work, but I am using other payment APIs besides stripe. So I need to use a form on my website.

quiet fox
slender jungle
#

I see. So I need a price ID. No product ID ?

#

This is what I did for my recurring payments:

https://dpaste.org/ELAVz

Now I am wondering how to do it for one time cart payments.

quiet fox
#

You can specify ad-hoc Price and Product data using price_data if you don't want to create a Product or Price ahead of time.

slender jungle
#

where do you see price_data? Which API object?

quiet fox
slender jungle
#

Ah okay. So even though each of my cart items are different prices, I would still create a product on the stripe dashboard? Imagine the cart is like Amazon. I would have 1 product ID for all shirts, another product ID for all shoes, etc? Or can I have only 1 product ID for all cart items?

quiet fox
#

You can do whichever works best for your use case.

slender jungle
#

Okay cool. So the validation code I sent in the dpaste would be the same, except it would be for the other type of product id (the cart one, not the subscription one).

#

Would this be a product where Customer chooses price or package pricing?

quiet fox
#

That's up to you. I recommend experiementing in test mode until you get the experience and behavior you want.

slender jungle
#

ok

#

Thanks, I will try a few things and maybe will ask again later.