#MarkoBoras
1 messages · Page 1 of 1 (latest)
Hi there, by admin code do you mean promo code? https://stripe.com/docs/api/promotion_codes?lang=node#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.
yeah anything like that
so we want to give discount to some users
and send them codes
user can use them only once
and we want to see preview of codes (used, not used)
OK https://stripe.com/docs/billing/subscriptions/coupons?dashboard-or-api=api#promotion-codes you can get started from here
ok
I'll ask again if I have questions
I have one another question if you're still here
About inclusive tax.
I have base price 350$ and 70$ is tax for that price. User pays 350$, I get 350-70 and tax is 70.
If user is buying as a company and he enters VAT ID tax becomes 0 but I get 350. Is that bug or is that common behavior for inclusive tax with VAT ID?
I've thought when user enters VAT ID he'll pay 350-70(tax) = 280$
I'm unfamiliar with tax. You can reach out to Stripe support should you need to clarify https://support.stripe.com/contact/email
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Okay thanks man
const promotionCode = await stripe.promotionCodes.create({
coupon: 'ZQO00CcH',
code: 'ALICE20',
customer: 'cus_4fdAW5ftNQow1a',
});
Do I need to create coupon and get couponId before I creaate promotion code
Yes you need to create a coupon first.