#ahjaydog-checkout coupons
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
yes sure https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-discounts-coupon
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Wow really? Did you just add that? https://stackoverflow.com/questions/57424354/how-to-add-coupons-to-stripes-checkout
To enable SCA changes, I am now integrating https://stripe.com/docs/payments/checkout/client stripe's (stripe v3 js file) checkout feature to my app, which makes it easy for integration of my
So would I need a form on my site for a customer to enter the code then make the checkout session and have it applied?
I was hoping checkout would have like a textbox in the session so I wouldn't have to make the text box myself
This says for 1 time payments, but can it be done for subscriptions?
yes, here you go https://stripe.com/docs/billing/subscriptions/coupons
ok but is it possible in the checkout session where the customer enters a card to have them enter a coupon code?
I don't want to hard code a coupon into the checkout session
adding a coupon doesn't mean applying a discount
it means that for this session the user has the ability to use that coupon to get a discount
So could I have discounts=[{
'coupon': ' ',
}],
A blank coupon where I could make an environment variable or something to change it
The problem is I don't want to have to shut off my server each time just to apply a coupon code
Blank would be for normal price
I don't follow
Oh so the customer doesn't have to use the coupon at all in the session?>
If I hard code a coupon, the customer doesn't have to use it?
yes exactly
Ignore what I said for now I just want to understand what you said
you're telling Stripe that you expect some people to be using a promo code
a coupon
for a potential discount
But what happens if I don't want to use it anymore? Like it is a 1 time sale
you could build a logic in your code whether to add discounts or not
So I would need to make a form to enter the coupon before creating the session?
no
when you pass that parameter
we will add the possibility for customers on the Checkout Sessions to add coupons
by having the customer enter a code themselves in the checkout session?
yes
But I need to supply 1 coupon id? What if I don't want to use that one anymore?
I have to restart my server each time?
discounts is an array
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yea but it says only 1 though?
So can I have a blank discounts array? Does that mean the user could enter a code from my dashboard if I do not provide anything and leave it as a blank array?
no it's an optional array of hashes
each hash has a coupon and/or a promotion_code
you can have an empty array but not an empty hash
Can you provide an example of this hash?
you have a code snippet here https://stripe.com/docs/billing/subscriptions/coupons#using-coupons-in-checkout
'{{COUPON_ID}}' = hash?
oh
{
coupon: {{COUPON_ID}}
}, {
coupon: {{COUPON_ID}}
}
Would be eligible if I have multiple?
yes
But I don't like the fact I need to hard code these in... I wish the checkout had a textbox that said enter code and then stripe checks against my dashboard all of the coupons to see if it is there. If I hard code all of the coupon ids in the checkout code, the user is able to select all of them?
no the user would not see any of these informations
They can just enter the coupon code and validate against it?
what I have in the array?
the user would have the ability to add a coupon on the checkout session, if it happens to be one of these then he gets the discount
yes it would validate with all of the provided coupon ids
So each time I have to enter a new on whenever I have a sale and restart my server/?
you could build a logic where you could pull from your own database whether there are any discounts at the moment or not
ok
this is up to you to figure out how you implement the logic
interesting
thanks i will try it out.. i have another question
For ACH I am trying to make a FAQ I just want you to make sure I am understanding this right
The question I have in the FAQ is how do ACH payments work for subscriptions?
ACH payments are a delayed payment method. After paying for a membership, your membership will not be activated right away. Depending on your bank, you might be emailed in 1-2 business days to manually verify microdeposits in your bank account or your bank will automatically verify the microdeposits for you right away. Once the microdeposits have been verified, it may take up to 5 business days for your payment to be processed and for your membership to be activated. Microdeposit verification is a one time process when connecting your bank account to our service for the first time. Future recurring payments from the same bank account will not need microdeposit verification again. However, recurring payments may still have payment processing delays of up to 5 days.
You're asking me to proof read your content?
yes
the last 2 sentences I am not 100% sure of
I am mainly concerned if I have the number of business days correct and that is how it actually works
last 3 sentences sorry
sorry but that's outside of the scope of this channel
i was worried you would say that
if you need more help you could try to contact our support team https://support.stripe.com/?contact=true
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.
I often feel like you are technical and know more than the business people do
that's why the main topics we handle in this channel are dev and implementation questions
because surely you coded it so surely you would know lol
I hope you understand
fine i'll ask there then