mollie / laravel-cashier-mollie

Official Mollie integration for Laravel Cashier
https://www.cashiermollie.com/
MIT License
137 stars 45 forks source link

Possibility for prepaid charges #234

Closed GunniBusch closed 6 months ago

GunniBusch commented 7 months ago

Hi, Would it be possible to add a "virtual" payment method like prepaid. So we could somehow specify, that if the user has balance, the user does not need to have a mandate etc. Or better, the ability, to tell mollie that this subscription should be handled as a prepaid until further notice. This would us allow to use mollie for other thinks ass says subscriptions like eg. renting domains etc.

If @sandervanhooft could just write if this would be a feature that would be ok to implement, I would be willing to create this feature. This would also include a better way to handle balance, eg. ma built in method for buying charge.

The background is, that most of our customers are private and are more likely to use prepaid.

A small sketch on how I imagine this:

Now: Create subscription: -> either mandated or first

Then: Create subscription -> wither normal way or prepaid -> prepaid by either specifying this as a payment method or, by having a separate function. -> after x time before next cycle, a event would be fired to remind the user to extend the subscription; But the user should also be able to switch to a normal subscription.

-> buyiing balance through a similar way how charges work

thanks

sandervanhooft commented 7 months ago

Hi @GunniBusch ,

I think many of the elements you're looking for are already available.

If you implement a way to (periodically) top up the billable's balance, Cashier will use the existing balance to pay for renewals automatically and only charge the customer for the remainder.

What else would you need from this package to succeed?

sandervanhooft commented 7 months ago

I.e. you could create a Mollie payment manually and then register the balance here:

https://github.com/mollie/laravel-cashier-mollie/blob/ff8a0b82fd98a50549f63a8a362ffae085aa4394/src/Credit/Credit.php#L24

GunniBusch commented 7 months ago

Thanks I will look into it and inform you about the status!