laravel / cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

Home Page:https://laravel.com/docs/cashier-paddle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refund to be handled differently

Benoit1980 opened this issue · comments

Hello,

I have just had a case where I refunded a customer but his subscription was still on grace period and he obviously used my service for free.

A refund from the Paddle admin panel created this query(from the webhook callback):

update
  `subscriptions`
set
  `paddle_status` = 'deleted',
  `ends_at` = '2021-09-30 00:00:00',
  `subscriptions`.`updated_at` = '2021-09-01 00:26:55'
where
  `id` = 110

A refund always incurs a complete stop of a subscription, but because the 'ends_at' column is untouched, the grace period is detected.

It would have been great to have a new paddle_status = 'refunded' so the grace period nor the active state is detected as TRUE.

Thank you.

Hi @Benoit1980, thanks for your issue. You're correct, this is something we should look into. What's happening is that the subscription cancelled event comes in but is unaware if the subscription was cancelled by the user (which allows for the grace period) or was refunded by the vendor (your situation). This seems like a difficult thing to solve as we don't know which situation happened from the subscription cancelled event. Because Cashier takes over the trialing period from Paddle we also can't always rely on the cancellation_effective_date value because we need to allow for the grace period when the user cancels themselves.

There is the subscription payment refunded event but it doesn't seems that you can know if a subscription was also cancelled from it. It wouldn't matter anyway because if the subscription cancelled event arrives after it it'll undo the changes made by the subscription payment refunded event.

We also can't introduce a custom refunded status because Cashier Paddle only relies on statuses defined by Paddle itself: https://developer.paddle.com/reference/platform-parameters/event-statuses

Seems like a tough one. I'll take this up with my contacts at Paddle to see if they have an idea. I'll keep you posted.

Yes very tricky indeed, Paddle really needs to add this extra event to their platform.

Hi @Benoit1980. Paddle gotten back to me and they say they're investigating this. Since this isn't an issue with Cashier but with Paddle I'm going to close this. You're free to contact Paddle to follow up with them if you like.

Hi @Benoit1980. Paddle gotten back to me and they say they're investigating this. Since this isn't an issue with Cashier but with Paddle I'm going to close this. You're free to contact Paddle to follow up with them if you like.

Thank you for updating me on this :-)