Stripe Payments for Contracts

Hi there,

I am currently exploring the online payment feature with Stripe. - And it’s all straight forward, when I have a contract, generate an invoice and use the payment URL created for the invoice. The Stripe payment via credit card is going through and in Dolibarr a payment object gets created and linked to the invoice.

However, on the module configuration page for the stripe module, there is also the option to provide other object IDs to generate a payment URL. In particular, I can provide the ID of a contract line item and get a URL to make a payment for that line item. In this case, the correct price is shown and the payment goes through like in the case before, but no payment object or any other indication of the payment is created within Dolibarr, neither in relation with the contract nor in relation with the paying customer. I.e. in the Stripe Dashboard I can see the transaction, which went ok, but the result does not get transferred back into Dolibarr.

Is anybody using this feature and is this the expected behaviour or am I missing a setting somewhere? Or is it a bug?

My use case: I will provide a self-booking facility for an online service where customers prepay for the service. My plan was to create and send an invoice, once the payment gets through - i.e. I do not want to create invoices for cases, where the payment does not succeed. But currently, I see no way to get an info about the payment result without creating an invoice beforehand.

Any hints are much appreciated!

Joachim

Digging deeper, I found this issue on github:
https://github.com/Dolibarr/dolibarr/issues/17762

Basically the same problem, just for a Stripe payment made for an order instead of for a contract. It seems that currently not further processing happens, after the payment has been made. A fix is already on the way to auto-create an invoice and register the payment - looking forward to it!

Essentially the same issue, except this time for a Stripe payment made for an order rather than a contract. After a payment is made, it appears that no additional processing takes place. A remedy for auto-creating an invoice and registering the payment is already in the works-we’re looking forward to it!

Hi Joachim and everyone following this thread,

Your use case is slightly different from what you’re describing (you’re using Stripe as a payment method within Dolibarr), but I wanted to mention a related module that might be useful depending on how you end up structuring your workflow.

If at some point you consider letting Stripe handle the invoicing directly (instead of Dolibarr), there is a module called Stripe Invoice Import that automatically imports invoices generated in Stripe into Dolibarr, including payment registration, customer creation and tax ID mapping.

It won’t solve the specific webhook/callback issue you’re facing right now, but if your use case allows flipping the approach — letting Stripe be the source of truth for invoicing and syncing everything back into Dolibarr automatically — it might be worth a look:

https://www.dolistore.com/product.php?id=2769

Hope someone else in the thread has a direct answer to the webhook behaviour you’re experiencing!