CBSubs stripe integration question

1 year 5 months ago - 1 year 5 months ago #331669 by activha
Replied by activha on topic CBSubs stripe integration question
I think there may be a misunderstanding.

The baskets are marked as reversed, the subscription is expired at CBSubs and needs to be reactivated, BUT the subscription is not expired at Stripe and stays active with renewed or payments each future months without CBsubs knowing it.

This ends with some of our customers billed two times each month and a lot having two subscriptions active at Stripe, one being canceled from time to time.

If CBSubs expires the subscription and reverse the payment, shouldn't it also send an info to Stripe to cancel the subscription there ?

For instance the one attached is expired at CBSubs but has two subscriptions stil valid at Stripe and trial and cancels each month
Attachments:

Please Log in to join the conversation.

1 year 5 months ago - 1 year 5 months ago #331671 by krileon
Replied by krileon on topic CBSubs stripe integration question

The baskets are marked as reversed, the subscription is expired at CBSubs and needs to be reactivated, BUT the subscription is not expired at Stripe and stays active with renewed or payments each future months without CBsubs knowing it.

A reversed state should tell Stripe to pause the subscription. So the subscription should still exist perfectly fine, but be paused. We do this using the below API.

​​​​​​​https://stripe.com/docs/api/subscriptions/update#update_subscription-pause_collection

You should see the subscription update call in Developers > Log of your Stripe dashboard when the dispute was made.

If CBSubs expires the subscription and reverse the payment, shouldn't it also send an info to Stripe to cancel the subscription there ?

It's not expired. It's reversed. We don't cancel until the dispute is handled (either won or lost) and until then it's considered a pending state.

It sounds like the payment is going into dispute and for whatever reason the user goes and tries to subscribe again resulting in the double Stripe subscription issue.

If you want Stripe to cancel recurring subscriptions on disputes instead of waiting for dispute resolution then configure it to do so. Specifically in your Stripe dashboard go to the settings page then navigate to Billing > Subscriptions and emails next under "Manage disputed payments" adjust it however you like. The default leaves the subscription alone, but if you want it to instead cancel you can do so here. You can also manage how payment retries are handled here.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 5 months ago #331676 by activha
Replied by activha on topic CBSubs stripe integration question

It's not expired. It's reversed. We don't cancel until the dispute is handled (either won or lost) and until then it's considered a pending state.

I understand, but for SEPA payments (90% of our customers) there is no handling as the dispute is always lost contrary to credit cards dispute. So the basket shows as reversed and the subscription is expired

 under "Manage disputed payments" adjust it however you like

Ok I adjusted it to "Cancel the subscription immediately without prorating" as it seems the best for SEPA payments which are lost as soon as disputed.

So in this case, CBSubs will expire the subscription, Stripe will cancel it and our mods can trigger a new subscription, correct ?

If yes, we only have to deal with the reversed basket and the failed payments that needs to be paid by the customer. Did you implement a way to reuse the basket to trigger a new payment for the customer if the first payment failed ? 

Please Log in to join the conversation.

1 year 5 months ago #331677 by krileon
Replied by krileon on topic CBSubs stripe integration question

I understand, but for SEPA payments (90% of our customers) there is no handling as the dispute is always lost contrary to credit cards dispute. So the basket shows as reversed and the subscription is expired

That should be sending a dispute lost webhook then. If not then that'd be an issue at Stripe not sending it.

So in this case, CBSubs will expire the subscription, Stripe will cancel it and our mods can trigger a new subscription, correct ?

Correct.

Did you implement a way to reuse the basket to trigger a new payment for the customer if the first payment failed ? 

No.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: activha

Please Log in to join the conversation.

1 year 4 months ago #332096 by activha
Replied by activha on topic CBSubs stripe integration question
I come back on this as it seem that Stripe does not cancel the subscription but simply states "collection paused"

I have correctly set  "Cancel the subscription immediately without prorating" in Stripe backend but it's still only paused, indicating that a next try will occur next year.

On CB side, the subscription is correctly canceled and the basket is marked as reversed.

So we're back on the point where we'll issue a new subscription maybe with a new payment, but the customer will end up being billed and pay twice next year.

Any other idea to avoid this ? It seems it may come from Stripe side but cannot find out where

Please Log in to join the conversation.

1 year 3 months ago #332121 by krileon
Replied by krileon on topic CBSubs stripe integration question
During a dispute CBSubs only pauses collection. If the dispute is won it will resume. If the dispute is lost it will cancel. If the dispute is never handled then it's going to stay paused. This is done by listening to the following Stripe webhooks.

Disputed
Event: charge.dispute.created

Dispute Won
Event: charge.dispute.closed
Status: data.object.status of "won" or "warning_closed"

Dispute Lost
Event: charge.dispute.closed
Status: data.object.status of "lost" or "charge_refunded"

Review the webhooks for that payment and see what status Stripe is sending to your site. Should also be able to see the notification in CBSubs > Notifications.

You can configure how Stripe handles subscriptions for disputed payments. Within your Stripe dashboard click Settings followed by Subscriptions and emails then scroll to "Manage disputed payments". Change "Subscription status" to "cancel the subscription immediately without prorating" and it will immediately cancel the subscription if a recurring payment goes into dispute.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.322 seconds

Facebook Twitter LinkedIn