Class CouponService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
You can create coupons easily via the coupon management page of the Stripe dashboard.create
(RequestOptions options) You can create coupons easily via the coupon management page of the Stripe dashboard.create
(CouponCreateParams params) You can create coupons easily via the coupon management page of the Stripe dashboard.create
(CouponCreateParams params, RequestOptions options) You can create coupons easily via the coupon management page of the Stripe dashboard.You can delete coupons via the coupon management page of the Stripe dashboard.delete
(String coupon, RequestOptions options) You can delete coupons via the coupon management page of the Stripe dashboard.list()
Returns a list of your coupons.list
(RequestOptions options) Returns a list of your coupons.list
(CouponListParams params) Returns a list of your coupons.list
(CouponListParams params, RequestOptions options) Returns a list of your coupons.Retrieves the coupon with the given ID.retrieve
(String coupon, RequestOptions options) Retrieves the coupon with the given ID.retrieve
(String coupon, CouponRetrieveParams params) Retrieves the coupon with the given ID.retrieve
(String coupon, CouponRetrieveParams params, RequestOptions options) Retrieves the coupon with the given ID.Updates the metadata of a coupon.update
(String coupon, RequestOptions options) Updates the metadata of a coupon.update
(String coupon, CouponUpdateParams params) Updates the metadata of a coupon.update
(String coupon, CouponUpdateParams params, RequestOptions options) Updates the metadata of a coupon.Methods inherited from class com.stripe.net.ApiService
getResponseGetter, request, requestStream
-
Constructor Details
-
CouponService
-
-
Method Details
-
delete
You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.- Throws:
StripeException
-
delete
You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.- Throws:
StripeException
-
retrieve
Retrieves the coupon with the given ID.- Throws:
StripeException
-
retrieve
Retrieves the coupon with the given ID.- Throws:
StripeException
-
retrieve
Retrieves the coupon with the given ID.- Throws:
StripeException
-
retrieve
public Coupon retrieve(String coupon, CouponRetrieveParams params, RequestOptions options) throws StripeException Retrieves the coupon with the given ID.- Throws:
StripeException
-
update
Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.- Throws:
StripeException
-
update
Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.- Throws:
StripeException
-
update
Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.- Throws:
StripeException
-
update
public Coupon update(String coupon, CouponUpdateParams params, RequestOptions options) throws StripeException Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.- Throws:
StripeException
-
list
Returns a list of your coupons.- Throws:
StripeException
-
list
Returns a list of your coupons.- Throws:
StripeException
-
list
Returns a list of your coupons.- Throws:
StripeException
-
list
public StripeCollection<Coupon> list(CouponListParams params, RequestOptions options) throws StripeException Returns a list of your coupons.- Throws:
StripeException
-
create
You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.A coupon has either a
percent_off
or anamount_off
andcurrency
. If you set anamount_off
, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with anamount_off
of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with anamount_off
of 200 is applied to it.- Throws:
StripeException
-
create
You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.A coupon has either a
percent_off
or anamount_off
andcurrency
. If you set anamount_off
, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with anamount_off
of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with anamount_off
of 200 is applied to it.- Throws:
StripeException
-
create
You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.A coupon has either a
percent_off
or anamount_off
andcurrency
. If you set anamount_off
, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with anamount_off
of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with anamount_off
of 200 is applied to it.- Throws:
StripeException
-
create
You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.A coupon has either a
percent_off
or anamount_off
andcurrency
. If you set anamount_off
, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with anamount_off
of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with anamount_off
of 200 is applied to it.- Throws:
StripeException
-