laravel / cashier-stripe

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.
https://laravel.com/docs/billing
MIT License
2.39k stars 679 forks source link

Coupon for single charges #1107

Closed guianzollin closed 3 years ago

guianzollin commented 3 years ago

It would be nice to be able to use the withCoupon method in single charges.

driesvints commented 3 years ago

Coupons for payment intents aren't supported by Stripe: https://support.stripe.com/questions/support-for-coupons-using-payment-intents-api

guianzollin commented 3 years ago

Can't we use Stripe Checkout for this?

https://stripe.com/docs/payments/checkout/discounts

driesvints commented 3 years ago

Hmm right. For Checkout it makes sense. I'll take a look at this at a later time but feel free to PR it if you want. I tink maybe moving the coupon/promotion code functionality from the SubscriptionBuilder into a concerns trait makes sense so it can be re-used in PerformsCharges.

driesvints commented 3 years ago

I've sent in a PR for this here: https://github.com/laravel/cashier-stripe/pull/1182