#MarkoBoras

1 messages · Page 1 of 1 (latest)

pastel idolBOT
charred field
#

Hi there, you mean you want to create an ad-hoc product for Checkout?

summer onyx
#

These are my requirements:

    • Single game 1-4 quantity, 5 per person

I have many different cases but I just need guidance for first one. These are my requirements. User can select “Single game” where he can choose 1-4 players(he’ll choose that in my app) where each person is 5$. He can also choose multiple single games so end result can be like this.

  • 3players * 5$ * 3single games = 45$
#

I am curious what's the best way to handle this

#

How should I create product?

charred field
#

OK, so it looks you want to create ad-hoc product

summer onyx
#

let me check

#

i was afk

#

Ok I am now viewing this

#

I am using node js for my backend

#

Do I still need to create some product in stripe dashboard

#

or I create everything when I am creating checkout?

charred field
#

Yup so you line_items would be something like

line_items: [
    {
      price_data: {
        unit_amount: 1000,
        currency: 'USD',
        product_data: {
          name: "Test",
        }
      },
      quantity: 1
    }
  ],
summer onyx
#

niceee

#

let me try it

#

so then I don't have to create any product in dashboard at all?

#

I can do everything through api calls?

charred field
#

No, you can create product through API.

pastel idolBOT
summer onyx
#

Thanks ,an

#

This is what I needed

#

can I also add upsells in creation of checkout through api?

#

for payment mode

steel rampart
#

Hey! Taking over for my colleague.

summer onyx
#

hi hi

steel rampart
summer onyx
#

so I figured how to dinamycally create products

#

and I want to add upsell in checkout

#

this is example

#

Upsell

  • Book entire arena for 9 or less people - pay additional 50€
  • Book entire arena for 10 or more people - free
#

nevermind about this requirement

#

can i add upsell in checkout

steel rampart
#

You should be using metered prices for that

#

but these prices are for Subscriptions.

steel rampart
summer onyx
#

ok

#

thanks