#SaileshKumar-product-coupons
1 messages ยท Page 1 of 1 (latest)
Hi there ๐ so you're engineering a solution yourself for the above scenario, yes?
Coupons allow for redemption codes to be used and there's a lot of functionality in that API alone, so I'd start there: https://stripe.com/docs/billing/subscriptions/coupons
Yes! I'm wondering when Alice's payment succeeds, is there a way to apply Bob's coupon automatically to his next payment, or is the recommended flow to give Bob a coupon code?
Also separately, we've been having issues accepting payments from Nigeria, and were looking into one of Stripe's acquired companies, PayStack. Is there any integration planned for them, or would we need to just integrate them separately?
Yes, you would just set up a webhook endpoint with a handler that triggers when the payment succeeds. That handler would then add the coupon to whatever subscription Bob had that was active. You don't need to involve Bob at all, though Alice would obviously have to mention that Bob referred her.
Yea so my idae is that Bob has a unique code, and anyone who uses Bob's code gives him a coupon. So Alice uses Bob's code when checking out (since she gets a discount). Then the webhook is monitoring any successful payment and checks for the referral code
That's defintiely supported with coupons by default. You just create the coupon and include a unique name that is then stored on your database alongside Bob's Customer ID, so that you can easily reference the two when making the necessary calls
And is it possible to just apply Bob's coupon to his next purchase?
Hello ๐
Catching up here, give me a moment and I'll respond as soon as I can ๐ thanks
Thanks for waiting.
Yes I believe you can apply the coupon to next purchase.
No worries ๐ Is there an API for that?