#Rashi
1 messages ยท Page 1 of 1 (latest)
Hi ๐ how can we help?
On our platforms, orders are created from backend. If a card exists in user's account then payment is processed from backend as well.
If a card doesn't exist then user makes a payment from front-end. We are using Stripe Intent in both cases.
Now we want to achieve promo code requirement where user should be able to enter promo code in their account and it should be implemented on payments being processed from backend or front end. If user makes a payment from front end then user should be able to edit the promo code as well.
Issue is : On processing payment from backend, we process payment for 10 users together. But we want to maintain promo codes on stripe.
What's the best possible way to achieve this as we aren't able to find anything until now?
Hi ๐
Promo codes/ coupons do not apply to Payment Intents (I assume that is the intent you mean here). Coupons and promo codes can be used with Billing products like Invoices and Subscriptions https://stripe.com/docs/billing/subscriptions/coupons as well as with Checkout https://stripe.com/docs/payments/checkout/discounts
Can a user add promo code in their account and then it can be passed to checkout session and user can edit if they want?
When you say "checkout session" do you mean a Stripe Checkout Session? With Stripe hosted UI?
Yes this one: https://stripe.com/docs/payments/checkout/discounts
If we don't have subscription model then this is the only choice right?
Yes that will work. I just tested it myself. This customer has a 10% off coupon applied at to their record and I didn't pass any Coupons when creating the Checkout Session.
So is it yes to this question:
Can a user add promo code in their account and then it can be passed to checkout session and user can remove and add a new one if they want?
You would need to code that into your integration to update the Customer record with the promo code.
How do you see the customer adding the promo code?
Our implementation hasn't started yet as we are in design phase and R&D.
In user profile we have a menu option 'Promo Codes' where they can enter an applicable Stripe promo code. This promo code is to be applied on their payments whether the payment is processed from backend or user pays it from front end.
In that case your back-end would need to update the Customer record in Stripe to reflect adding the promo code: https://stripe.com/docs/api/customers/update#update_customer-promotion_code
ok if we do that, it will be applied on checkout itself? and will user be able to edit it?
It will be applied at Checkout. What do you mean "will user be able to edit it?" In the checkout interface? No, you would need to modify the Customer record from your back-end to change the promo code for the user.
So it won't work like: applied promo code has a cross button and a new one can be added?
No it's one or the other currently
ok so if a coupon code is added to user's account and if it becomes invalid will it be handled itself?
I'm not sure what you mean. Do you mean if you cancel the Coupon?
for e.g. coupon had a validity of 4 months. and user added in their account but their order is processed in the 5th month.
Yes then any new purchase by that Customer will not have the coupon applied
stripe will handle that itself right?
Correct
ok my last question is, if the payment is processed for 10 users together from backend and all these users have coupon codes linked in their account. No will 10 checkout web pages open or is there any way to by pass that and process payment?
๐ Taking over this thread, catching up now
If you Checkout Session is used, how do you process payment for 10 users together? Each Checkout Session only allows one customer. Are you going to generate 10 Checkout Sessions and ask users to pay one by one?
this is payment processing by our backend team not user side, can you please go through the previous conversation.
they process payment in bulk for 10 users
I've read through the previous conversations. My colleague mentioned that Payment Intent doesn't support coupon.
The only way to accept coupon is to use Checkout Session which requires customer to be involved. If you wish to perform coupon using backend without customer in person, i.e. using Payment Intent, it's not possible unless you use Stripe billing product such as Invoice or Subscription.
Otherwise, you have to maintain coupon or promo code in your own system if you wish to use Payment Intent (making requests from backend)
yeah seems so, so backend team cannot initiate or perform checkout for a user right?
and if a promo code is linked in user account following this: https://stripe.com/docs/api/customers/update#update_customer-promotion_code
and when a payment is processed using intent, it won't take that linked promo code into account?
I think that's not possible as intent doesn't support that.
yeah seems so, so backend team cannot initiate or perform checkout for a user right?
Yes, unless you use Stripe billing products such as Invoices and Subscriptions
and if a promo code is linked in user account following this: https://stripe.com/docs/api/customers/update#update_customer-promotion_code
and when a payment is processed using intent, it won't take that linked promo code into account?
As mentioned in the doc that: "The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount." The recurring payments refers to Stripe Subscriptions products and it also indicate that creating payments via API such as Payment Intent won't have discount applied