#MurukuBaby- Checkout Session

1 messages ยท Page 1 of 1 (latest)

hot seal
#

๐Ÿ‘‹ happy to help

#

I don't really follow

gaunt isle
#

but idk what to put in PRICE_ID in
post("/create-checkout-session", (request, response) -> { String YOUR_DOMAIN = "http://localhost:4242"; SessionCreateParams params = SessionCreateParams.builder() .setMode(SessionCreateParams.Mode.PAYMENT) .setSuccessUrl(YOUR_DOMAIN + "/success.html") .setCancelUrl(YOUR_DOMAIN + "/cancel.html") .addLineItem( SessionCreateParams.LineItem.builder() .setQuantity(1L) // Provide the exact Price ID (for example, pr_1234) of the product you want to sell .setPrice("{{PRICE_ID}}") .build()) .build(); Session session = Session.create(params);

hot seal
#

you should create a product and a price first

#

and then use that price id

gaunt isle
#

oke thanks ill try it out

scenic sail
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

gaunt isle
#

Is it possible to use check Out without an account? Just need it for testing purposes for my project.

scenic sail