CBSubs Stripe Sepa recurring payments and triggers

3 years 9 months ago #319050 by activha
Hello

1) As we use Stripe for recurring payments we have a long delay between the time where a payment or recurring payment is launched and the time where Stripe sends back a notification regarding the correct or disputed payment.

For now we use OnCPayAfterPaymentStatusUpdateEvent to register the payment once it's received and transfer the information to our invoicing software.

Would it be possible to use a trigger when the payment is triggered by CBSubs instead ? and if yes which one ?

The idea would be to have a CBSubs trigger to trigger the invoice at our invoicing software, then use the OnCPayAfterPaymentStatusUpdateEvent to register a correct or wrong payment whatever the delay is after.

We cannot use CBSubs states (pending, completed, processed) because for recurring payments there is no intermediate state in CBSubs during the 10 days process of Stripe Sepa

2) Do you plan to implement annual subscription with the ability to pay in 12 monthly payments with Stripe ?

Thanks
Jean

Please Log in to join the conversation.

3 years 9 months ago #319055 by krileon

1) As we use Stripe for recurring payments we have a long delay between the time where a payment or recurring payment is launched and the time where Stripe sends back a notification regarding the correct or disputed payment.

You could set your Stripe gateway to have "Accept payment once" set to "Even if payment is pending authorization, authorized or captured". Subscriptions would be activated immediately and basket should be marked accordingly as well. It of course activates 10 days before their SEPA payment clears, but I guess that'd be a question of how often do payments not clear.

For now we use OnCPayAfterPaymentStatusUpdateEvent to register the payment once it's received and transfer the information to our invoicing software.

onCPayAfterPaymentStatusUpdateEvent is fired if there's a payment status update attempt of any kind (even if the payment status isn't being changed). There's also onCPayAfterPaymentStatusChange, but it only applies if the payment status is actually changing from something to something.

We cannot use CBSubs states (pending, completed, processed) because for recurring payments there is no intermediate state in CBSubs during the 10 days process of Stripe Sepa

The immediate state should be Pending. If the basket isn't set to Pending it will expire so it should at least be set to Pending. When the payment comes through it should be set to Completed.

2) Do you plan to implement annual subscription with the ability to pay in 12 monthly payments with Stripe ?

Possibly. Depends on how well we can support this in other gateways as it'd be a waste of resources to implement this functionality for only 1 of the supported gateways.


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.

3 years 9 months ago #319072 by activha

You could set your Stripe gateway to have "Accept payment once" set to "Even if payment is pending authorization, authorized or captured". Subscriptions would be activated immediately and basket should be marked accordingly as well. It of course activates 10 days before their SEPA payment clears, but I guess that'd be a question of how often do payments not clear.


That's an idea as we do not have much disputes. But in a case of a dispute will CBSubs deactivate the subscription and set the payment to unpaid ?
Also, will it work for recurring payments ? usually this is our biggest problem as accounting department want their invoice as soon as it's triggered even if the real debit occurs a few days later with Stripe Sepa

There's also onCPayAfterPaymentStatusChange, but it only applies if the payment status is actually changing from something to something.

So is it used for triggering recurring payments and when in this case ?

The immediate state should be Pending. If the basket isn't set to Pending it will expire so it should at least be set to Pending. When the payment comes through it should be set to Completed

Again our issue is with recurring payments, the basket is set to completed when recurring payments occur and then we have no way to trigger an unpaid invoice for recurring payments in our outside software.


It's been a few years since we report this behavior with payments and baskets. Even if you consider baskets as invoices (which they are not) we still need to issue an invoice before asking a payment or a recurring payment in this case.
We have dealt with this by using an external software such as Invoice Management from JoomlaThat. With CBSubs triggers this works fine for our customers except for recurring payments because invoices are issued only after the payment is received which can go up to 10 days with Stripe.
In return this occurs lots of customer service action and conflicts with accounting departments to explain this.

So we need to have a solution for this and I would prefer to keep CBSubs for our management as it is a very good software combined with CB.

Would it be possible for you to draft a solution or set a trigger which would be fired when the cron task launches the recurring process for instance ?

Please Log in to join the conversation.

3 years 9 months ago #319077 by krileon

That's an idea as we do not have much disputes. But in a case of a dispute will CBSubs deactivate the subscription and set the payment to unpaid ?

It should, yes. When a dispute is created the current state of the subscription should be changed from Completed to Reversed. Once the dispute is closed if you won the dispute a Canceled_Reversal is used to revert it back to its previous state (completed) while Lost_Reversal closes it out.

Also, will it work for recurring payments ? usually this is our biggest problem as accounting department want their invoice as soon as it's triggered even if the real debit occurs a few days later with Stripe Sepa

All that parameter does is skip Pending state basically. Instead of being set as Pending it will be marked Completed immediately. We do not have a trigger that fires before a recurring payment is paid. That wouldn't even be possible without some sort of CRON scheduler to check for that regularly. CBSubs just waits until the payment gateway tells it a renewal has come in. If the renewal doesn't come in then it will expire the subscription, which is done using whatever method you configured in CBSubs > Settings > Global.

So is it used for triggering recurring payments and when in this case ?

Yes, it should work fine as long as a payment status change is being made. To be specific we're talking payments within CBSubs > Payments as that's what the event relates to. When a recurring payment comes through it should log a new payment row and fire that trigger. Otherwise you have onCPayUserStateChange which fires when a subscription user state change is made and always will if there's a renewal.

It's been a few years since we report this behavior with payments and baskets. Even if you consider baskets as invoices (which they are not) we still need to issue an invoice before asking a payment or a recurring payment in this case.
We have dealt with this by using an external software such as Invoice Management from JoomlaThat. With CBSubs triggers this works fine for our customers except for recurring payments because invoices are issued only after the payment is received which can go up to 10 days with Stripe.
In return this occurs lots of customer service action and conflicts with accounting departments to explain this.

So we need to have a solution for this and I would prefer to keep CBSubs for our management as it is a very good software combined with CB.

I was not aware you needed to invoice them before the recurring payment is even made, which is not what we discussed previously. We are going to make improvements to invoices, but not in the way you're wanting by invoicing them before recurring payment. The invoice would be created when the payment comes through.

The best solution I can offer you is just to do this entirely through Stripe. Navigate to Stripe > Settings under Billing click "Subscriptions and emails". Then enable "Send emails about upcoming renewals", "Email finalized invoices to customers", and "Send reminders if an invoice hasn't been paid". Optionally also enable "Send a Stripe-hosted link for cardholders to authenticate when required" and "Send emails when card payments fail". This should allow Stripe to completely handle that communication workflows. Your accounting department can then just use Stripe > Customers > Invoices (it even has Export functionality) for a full invoice record.

Additional customer emails can be enabled under Stripe > Settings then under Business settings > Your business click "Emails". Then enable the parameters as needed in "Email customers about…".

Would it be possible for you to draft a solution or set a trigger which would be fired when the cron task launches the recurring process for instance ?

There is no trigger available for what you're wanting to do. There is no process available either. CBSubs does not sit and fire a trigger while it's waiting for a payment. It doesn't act until a payment either shows up or if the subscription is expired when it runs expiration checks, which are just checking if the expiration date is reached and if it does expire subscription which will fire the above triggers.


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.

3 years 9 months ago #319079 by activha

Your accounting department can then just use Stripe > Customers > Invoices (it even has Export functionality) for a full invoice record.


Unfortunately that's not doable as legally we need to have an ordering scheme in the invoices that we issue for our customers.
And some customers use Stripe while other use direct wire or even check.

This is legally compulsory to have invoices issued at the time where the service or product is delivered, not paid. So for services the triggering action for an invoice is the subscription not the payment.

We have dealt with this for years with CBSubs but that 's becoming crazy if we increase our number of customers. You should consider moving to a regular invoicing system which would either issue a global invoice with split regular payments or issue an invoice each time a subscription is recurred or renewed with the invoices marked as pending, and marked paid when the payment occurs.

Invoice manager from JoomlaThat is ok for all this but we would need a way to tell it that a recurring has occurred

Please Log in to join the conversation.

3 years 9 months ago #319090 by krileon

Unfortunately that's not doable as legally we need to have an ordering scheme in the invoices that we issue for our customers.

I believe Stripe allows you to configure the invoice number format somewhat based off the country of the account. You should find those settings in Stripe > Settings then under Billing click "Invoice template". Doesn't really solve the issue of using multiple gateways though.

Invoice manager from JoomlaThat is ok for all this but we would need a way to tell it that a recurring has occurred

How far in advance do you need to be creating these invoices? One option is to create the next invoice when the current is paid. So for example when a recurring payment comes through you mark the previous invoice in your invoice system as paid then immediately create the next invoice, would that work? If that'd work you should be able to just do this on onCPayAfterPaymentStatusUpdateEvent. So for example if your recurring payment duration is 30 days you'd be creating the invoice on day 1 since you're creating it when the previous recurring payment is paid.


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.368 seconds

Facebook Twitter LinkedIn