#teamninja-checkout-coupons
1 messages ยท Page 1 of 1 (latest)
Hello! When you create the Checkout Session you would set allow_promotion_codes: true (see https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-allow_promotion_codes)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
cool thanks a lot
onst stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
const session = await stripe.checkout.sessions.create({
success_url: 'https://example.com/success',
cancel_url: 'https://example.com/cancel',
line_items: [
{price: 'price_H5ggYwtDq4fbrJ', quantity: 2},
],
mode: 'payment',
allow_promotion_codes: true,
});
this right
just confirming
Yes, that should work
thanks you're awesome ๐
One last question please. Is there any way to test Stripe Integration in Live mode without charge?
No, we don't recommend testing in live mode at all
ok so how to know if transactions will go through. Should I subscription it
What do you mean, how to know if the transactions will go through?
I mean I verified in test mode everything looks good. Now I just want to make sure it will work in Live mode.
before launch etc
Unfortunately, there isn't really a way to accomplish a "test run" in live mode that doesn't create a charge.
ok thanks