#sejo
1 messages ยท Page 1 of 1 (latest)
Hello, happy to help. What are you running in to?
I am seeing the code that the page gives me to apply discounts and it is this...
I already have everything working... what I want to know is the discount, the id of the coupon from where I get it?=
I created a coupon and put a personalized ID on it... is this "farmacia2020" id the one that users must enter for the discount to be applied?
?
I think the coupon ID is different, when you are on that page what is the URL on your dashboard?
For example I have https://dashboard.stripe.com/test/coupons/6b25u8JN in my test coupons, 6b25u8JN is the ID
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
okey
To use that personlizied ID, you will want to use the promotion_code parameter https://stripe.com/docs/api/subscriptions/create#create_subscription-promotion_code
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Can you try passing farmacia2020 to promotion_code instead of coupon?
I ask you a question, with that code that I give you, does a section appear in the payment gateway where the customer enters the code?
I think I was able to create the coupon reference, it gives me an id of it
Awesome, so you were able to add this coupon to a test subscription?
I'm working on it... because I really want what I just saw on the page
I imagine that to enable the discount section... I have to add this
"allow_promotion_codes:true"
HI ๐
I'm stepping in as @stoic shard needs to go soon.
Yes you are correct that you will need to specify the allow_promotion_codes parameter to enable this
And then you will want to first create a Coupon to represent the discount https://stripe.com/docs/api/coupons/create, and then create a Promotion Code https://stripe.com/docs/api/promotion_codes/create to represent the User facing version of the Coupon. The Promotion Code code is what the customer will provide in the input box displayed in the page you are showing
Is it necessary to create it like this? Or is it okay if I create the coupons or discounts from the stripe platform?
By "stripe platform" do you mean the Dashboard?
yes
Yes that is fine. This server is mostly for developers coding Stripe integrations so we usually share the API reference docs but using the Dashboard will work too.
ahh ok perfect, thank you very much