Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stripe - Apply coupon to customer or subscription?

In the Stripe API Documentation, they show that you can apply a coupon on a Customer.

cust = Stripe::Customer.retrieve("cus_asdasdad")
cust.coupon = "COUPONCODE"
cust.save

However, you can also apply a coupon on a Subscription:

cust = Stripe::Customer.retrieve("cus_asdasdad")
sub = cust.subscriptions.retrieve("sub_blablabla")
sub.coupon = "COUPONCODE"
sub.save

What is the difference between the two? Essentially, I'd like to give a customer $15 off their next subscription charge, and only the next one.

like image 708
you786 Avatar asked Nov 04 '14 17:11

you786


People also ask

How do you use coupons on Stripe?

In the Dashboard on the Create a coupon page, click the Use customer-facing coupon codes button. Enter a code. This is the code that a customer enters at checkout to redeem the discount. If you don't set a code, Stripe generates one for you.

Can I use a 100% off coupon in checkout Stripe?

When using the Stripe Payments Plugin coupon codes can be created where the discount amount is 100%. This means that the customer will not need to pay for the product.

What is a customer facing coupon?

Promotion codes are customer-facing codes created on top of coupons. You can also specify additional restrictions that control when a customer can apply the promotion. You can share these codes with customers who can enter them into Checkout to apply a discount.

What is Stripe coupon?

Checkout. Promotion Codes is a Stripe Billing and Checkout feature which enables you to generate customer facing codes which can be redeemed to apply a coupon to an order. Promotion Codes have advanced validation features which allow you to specify when and on what orders the codes can be redeemed.


2 Answers

To make a coupon that can only be used once set the max_redemptions property to 1.

With regard to your question, the difference is that applying the coupon to the Customer will apply the discount to the sub-total of the Invoice created for that Customer. Meaning that if the Invoice includes a Subscription and multiple InvoiceItems, then the discount will be applied to the sum of all of them.

Conversely, applying the coupon to a Subscription only means the discount will be applied to the cost of the Subscription only. Other InvoiceItems within the Invoice will not be discounted.

Won't make a difference if the Coupon is a "20 dollars off" type, but it will if it's a "20% off" kind.

like image 57
Rick Avatar answered Sep 24 '22 15:09

Rick


A coupon applied to a customer will apply to all future invoices and/or subscriptions, even if the coupon has expired, dependent upon how you set the duration attributes for the coupon.

A coupon applied to a subscription will only apply to that specific subscription.

The duration attribute will determine how long this discount will apply, either once, repeated, or forever.

The max_redemptions attribute limits the the total number of coupons that you are willing to honor, e.g. the first 100 customers.

like image 31
rhuppert Avatar answered Sep 25 '22 15:09

rhuppert