Closed sandervanhooft closed 6 years ago
@Smitsel What are your thoughts on this?
I am now estimating the next payment date based on the createdAt
and interval
fields. But imho it's not as reliable as doing it server-side.
Hi @sandervanhooft,
We do it based of the startDate
and interval
server side too.
So i'm going to let @ndijkstra decide if we should do this internally in the client. Or create a ticket to add these to the resource :)
@sandervanhooft I created an issues for us to create a customer/cst_xxxx/subscription/sub_xxxx/payments
resource.
That still won't give you the next payment date though.
We have the logic on our side. So we might as well add that to the subscription resource. But this will have to be put on our backlog then :)
I've created an issue for the next payment date on our backlog.
Thanks @willemstuursma @ndijkstra @Smitsel !
I like where this is going 😄
Let me know if you have any updates on the timeline.
I'll work around this for the Alpha release of Cashier (estimateCurrentPeriodEnd()
instead of getCurrentPeriodEnd()
). But it will be required for the stable release.
@willemstuursma wrote:
I created an issues for us to create a
customer/cst_xxxx/subscription/sub_xxxx/payments
resource.
This would also be very helpful for refunding a subscription payment.
Or is there another way to (partially) refund a subscription?
The use case here is that I need to swap a subscription plan using prorating in Laravel Cashier.
So let's say the customer swaps from plan A to plan B. So subscription A is canceled and subscription B is started.
The customer will need to be reimbursed for unused time of subscription A, which the customer has already paid for.
The cleanest solution I can think of is a partial refund on the last payment for Subscription A.
Another solution would be to cancel subscription A, create a one-off payment for plan B minus the surplus of A, and then schedule subscription B (using startDate
) for the next payment cycle. But this is very hacky, harder to keep track of from client-side.
Or is there another way to (partially) refund a subscription?
No, refunds are always created on the payment or on the order, which creates a refund on one of the payments.
The List Subscription Payments
endpoint is now available.
https://docs.mollie.com/reference/v2/subscriptions-api/list-subscriptions-payments
@MollieRick Thanks! 🎉
These are great features!
@willemstuursma wrote:
That still won't give you the next payment date though.
I've discussed with @ndijkstra , Mike and Taylor (Laravel founder) that we'll be scheduling recurring payments manually client-side in the upcoming Mollie Cashier package. While it would be a great feature imho, I personally no longer have a direct need for the next-payment-date feature.
We are going with "scheduling" because it allows us more flexibility / more advanced use cases.
@sandervanhooft:
While it would be a great feature imho, I personally no longer have a direct need for the next-payment-date feature.
I have this in development now, so maybe you can use it in the future.
It's absolutely valuable!
The List Subscription Payments endpoint is now available. https://docs.mollie.com/reference/v2/subscriptions-api/list-subscriptions-payments
Will you be adding it to this php client as well? Let me know if I can help.
Aaaaand also the nextPaymentDate
field is now available in the Subscription API.
@MollieRick Great!
Specifications
Describe the issue
For subscription handling in Laravel Cashier, I'd like to retrieve the most recent payment date and/or (preferably) the next payment date. So I can determine grace periods after canceling the subscription.
Is there a way to do this?