Search code examples
stripe-paymentscoupon

Using coupon codes with stripe relay


Can someone please help me understand how coupon codes works with Stripe relay?

According to the api docs, you can pass a coupon code when creating an order: https://stripe.com/docs/api#create_order

However, what should this coupon code be? From what I understand, coupons created are only available for subscriptions. In the new dashboard, they coupon page is also only found under subscriptions -> coupons.

So, what should the coupon field contain?

I can't handle the discount logic on my side, as you pass the SKU id's of the products, when creating an order, so you don't pass any amount that you can manipulate yourself.

Thanks.


Solution

  • You can use subscription coupons with Relay's orders. Coupons started out as part of the subscriptions API, and are still grouped under "Subscriptions" in the dashboard and the API reference, but they're also usable with Relay.