<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
		<id>https://wiki.siladel.fr/index.php?action=history&amp;feed=atom&amp;title=README</id>
		<title>README - Historique des versions</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.siladel.fr/index.php?action=history&amp;feed=atom&amp;title=README"/>
		<link rel="alternate" type="text/html" href="https://wiki.siladel.fr/index.php?title=README&amp;action=history"/>
		<updated>2026-08-02T23:23:42Z</updated>
		<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.siladel.fr/index.php?title=README&amp;diff=555&amp;oldid=prev</id>
		<title>Goldron : Page créée avec « = STRIPEACCOUNTING FOR Dolibarr ERP CRM =  '''StripeAccounting''' reconciles real Stripe movements — per-transaction and subscription/service fees, refunds, disputes... »</title>
		<link rel="alternate" type="text/html" href="https://wiki.siladel.fr/index.php?title=README&amp;diff=555&amp;oldid=prev"/>
				<updated>2026-08-02T13:02:36Z</updated>
		
		<summary type="html">&lt;p&gt;Page créée avec « = STRIPEACCOUNTING FOR &lt;a href=&quot;/index.php?title=Dolibarr_ERP_CRM&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Dolibarr ERP CRM (page inexistante)&quot;&gt;Dolibarr ERP CRM&lt;/a&gt; =  &amp;#039;&amp;#039;&amp;#039;StripeAccounting&amp;#039;&amp;#039;&amp;#039; reconciles real Stripe movements — per-transaction and subscription/service fees, refunds, disputes... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= STRIPEACCOUNTING FOR [[Dolibarr ERP CRM]] =&lt;br /&gt;
&lt;br /&gt;
'''StripeAccounting''' reconciles real Stripe movements — per-transaction and subscription/service fees, refunds, disputes (chargebacks) and payouts — with Dolibarr's Stripe intermediary financial account, and automatically generates the missing entries or bank movements.&lt;br /&gt;
&lt;br /&gt;
This module is complementary to the official Stripe module: it never creates payments, invoices, checkout sessions or payment webhooks. It only reads the Stripe API and posts the accounting entries the official module doesn't cover.&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
&lt;br /&gt;
# The module pulls Stripe's Balance Transactions, Charges, Refunds, Disputes and Payouts through the Stripe API, reusing the API key and mode (test/live) already configured by the official Stripe module.&lt;br /&gt;
# Every Stripe object is stored once in its own table (&amp;lt;code&amp;gt;llx_stripeaccounting_transaction&amp;lt;/code&amp;gt;), keyed by its Stripe id, so a transaction is never processed twice even if the sync runs repeatedly.&lt;br /&gt;
# For each new object, the matching accounting treatment is triggered automatically:&lt;br /&gt;
&lt;br /&gt;
* '''Per-transaction fees''' and '''subscription/service fees''' (Radar, Billing, Connect...):&lt;br /&gt;
*: The module creates the matching bank movement on the Stripe account (with its accounting counterpart already set), but '''does not post the ledger entry itself'''.&lt;br /&gt;
*: Dolibarr's own native &amp;quot;Transfer to accounting&amp;quot; button generates it afterwards, exactly like any other bank movement.&lt;br /&gt;
*: Exception: under French VAT mode, the full entry (fee + VAT) is still posted directly by the module, with no dedicated bank movement.&lt;br /&gt;
&lt;br /&gt;
* '''Payouts''':&lt;br /&gt;
*: The module creates a real internal bank transfer between the Stripe account and the main bank account.&lt;br /&gt;
*: Dolibarr's native transfer-to-accounting step posts the entry on both sides.&lt;br /&gt;
&lt;br /&gt;
* '''Refunds''':&lt;br /&gt;
*: Reverse the original charge's entry when the related invoice/payment can be traced back.&lt;br /&gt;
*: Otherwise the transaction is flagged for manual review instead of guessing an account.&lt;br /&gt;
&lt;br /&gt;
* '''Disputes / chargebacks''':&lt;br /&gt;
*: The disputed amount is posted immediately to a dedicated loss account, plus the dispute's own Stripe fee.&lt;br /&gt;
&lt;br /&gt;
* '''Stripe balance corrections''' (&amp;lt;code&amp;gt;adjustment&amp;lt;/code&amp;gt;, an automatic refund after a payment ultimately failed):&lt;br /&gt;
*: Recorded so they stay visible, but never posted automatically — their sign and cause vary too much to be posted reliably without human review.&lt;br /&gt;
&lt;br /&gt;
* '''Optional VAT handling on fees''':&lt;br /&gt;
*: No VAT, French VAT, or intracommunity reverse charge.&lt;br /&gt;
*: The reverse charge mode posts a symmetric, zero-net VAT pair immediately.&lt;br /&gt;
&lt;br /&gt;
# A dashboard shows:&lt;br /&gt;
#* Stripe balance&lt;br /&gt;
#* unreconciled transactions&lt;br /&gt;
#* monthly fees&lt;br /&gt;
#* pending payouts&lt;br /&gt;
#* manual &amp;quot;Sync now&amp;quot; action&lt;br /&gt;
&lt;br /&gt;
#: A cron job runs the same reconciliation on a schedule.&lt;br /&gt;
&lt;br /&gt;
# For a Stripe account '''not connected through the API''' (for example another storefront with its own merchant account), a CSV import page processes Stripe's &amp;quot;Balance history&amp;quot; export (one file covering every movement type) under the same idempotency guarantees.&lt;br /&gt;
#: The import button stays disabled until the minimal configuration is complete, exactly like the sync button.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
&lt;br /&gt;
'''Home &amp;gt; Setup &amp;gt; Modules &amp;gt; StripeAccounting'''&lt;br /&gt;
&lt;br /&gt;
* '''Stripe financial account''' and '''Main bank account'''&lt;br /&gt;
*: Editable selectors that write directly to the official Stripe module's own constants (no local copy, so no risk of drift).&lt;br /&gt;
&lt;br /&gt;
* '''Fees account'''&lt;br /&gt;
*: Accounting account for Stripe commissions (example: 627xxx).&lt;br /&gt;
&lt;br /&gt;
* '''Disputes account'''&lt;br /&gt;
*: Accounting account for chargeback losses (example: 658xxx).&lt;br /&gt;
&lt;br /&gt;
* '''Stripe supplier thirdparty'''&lt;br /&gt;
*: Used to post subscription/service fees (Radar, Billing...) against this thirdparty's own supplier accounting code.&lt;br /&gt;
&lt;br /&gt;
* '''VAT mode'''&lt;br /&gt;
*: None, French VAT, or intracommunity reverse charge, with a configurable rate.&lt;br /&gt;
&lt;br /&gt;
* '''Sync frequency'''&lt;br /&gt;
*: How often the scheduled job runs.&lt;br /&gt;
&lt;br /&gt;
The module refuses to run any synchronization while the minimal configuration above is incomplete — it aborts up-front rather than posting partial or guessed entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid #e00; background:#fee; padding:10px;&amp;quot;&amp;gt;&lt;br /&gt;
'''⚠️ Warning'''&lt;br /&gt;
&lt;br /&gt;
Do not enable '''&amp;quot;Enable the auto recording of Stripe payouts&amp;quot;''' on the official Stripe module's setup page (Setup &amp;gt; Modules &amp;gt; Stripe).&lt;br /&gt;
&lt;br /&gt;
It makes the official module's own webhook create a bank movement for every Stripe payout — exactly what this module already does, but without any idempotency of its own.&lt;br /&gt;
&lt;br /&gt;
Having both mechanisms enabled at once would each create their own bank movement for the same payout, resulting in a duplicate.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scheduled task (cron) ==&lt;br /&gt;
&lt;br /&gt;
Activating the module registers a scheduled job (&amp;lt;code&amp;gt;StripeAccountingSync&amp;lt;/code&amp;gt;) in:&lt;br /&gt;
&lt;br /&gt;
'''Home &amp;gt; Setup &amp;gt; Modules &amp;gt; Scheduled jobs'''&lt;br /&gt;
&lt;br /&gt;
However, two things are required for it to actually run unattended:&lt;br /&gt;
&lt;br /&gt;
=== 1. Enable the job ===&lt;br /&gt;
&lt;br /&gt;
Dolibarr creates it disabled by default.&lt;br /&gt;
&lt;br /&gt;
Open it from the scheduled jobs list and tick '''Active'''.&lt;br /&gt;
&lt;br /&gt;
=== 2. Trigger Dolibarr's scheduler periodically ===&lt;br /&gt;
&lt;br /&gt;
Nothing calls it automatically.&lt;br /&gt;
&lt;br /&gt;
You need an external cron hitting one of the following:&lt;br /&gt;
&lt;br /&gt;
'''Module standalone CLI script:'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
*/15 * * * * php /path/to/htdocs/custom/stripeaccounting/cron/stripe_sync.php &amp;gt;&amp;gt; /var/log/stripeaccounting.log 2&amp;gt;&amp;amp;1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Dolibarr generic URL-based job runner:'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
*/15 * * * * curl &amp;quot;https://your-dolibarr-url/public/cron/cron_run_jobs_by_url.php?securitykey=YOUR_KEY&amp;amp;userlogin=YOUR_LOGIN&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Without one of these two crontab entries, synchronization only happens when someone clicks '''&amp;quot;Sync now&amp;quot;''' on the dashboard.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Dolibarr 17+&lt;br /&gt;
* PHP 7.2 to 8.5 (no syntax specific to a recent PHP version is used, to stay compatible across that whole range)&lt;br /&gt;
* Official Stripe module enabled and configured:&lt;br /&gt;
** API keys&lt;br /&gt;
** financial account&lt;br /&gt;
* Double-entry Accounting module, for the &amp;lt;code&amp;gt;llx_accounting_bookkeeping&amp;lt;/code&amp;gt; table&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
StripeAccounting is developed and maintained by '''SILADEL'''.&lt;br /&gt;
&lt;br /&gt;
=== License ===&lt;br /&gt;
&lt;br /&gt;
GPL v3 or any later version.&lt;br /&gt;
&lt;br /&gt;
=== SILADEL ===&lt;br /&gt;
&lt;br /&gt;
'''SILADEL'''  &lt;br /&gt;
7 ch des coquelicots  &lt;br /&gt;
81990 Cambon France&lt;br /&gt;
&lt;br /&gt;
E-mail: [mailto:info@siladel.fr info@siladel.fr]&lt;br /&gt;
&lt;br /&gt;
Website: [https://www.siladel.fr www.siladel.fr]&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
* [[Documentation Wiki|WIKI Documentation]]&lt;br /&gt;
&lt;br /&gt;
=== Support request ===&lt;br /&gt;
&lt;br /&gt;
[mailto:info@siladel.fr Support request]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:SILADELogo.svg|84px|SILADEL]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Developed by [https://www.siladel.fr SILADEL] — Author: IGREJA David&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Goldron</name></author>	</entry>

	</feed>