Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leakix/stripe-accounting
Accounting helpers for Stripe users
https://github.com/leakix/stripe-accounting
accounting accounting-tools stripe stripe-api toolbox
Last synced: 3 days ago
JSON representation
Accounting helpers for Stripe users
- Host: GitHub
- URL: https://github.com/leakix/stripe-accounting
- Owner: LeakIX
- License: lgpl-2.1
- Created: 2023-04-13T04:27:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-06T10:03:24.000Z (9 months ago)
- Last Synced: 2024-02-07T10:25:05.836Z (9 months ago)
- Topics: accounting, accounting-tools, stripe, stripe-api, toolbox
- Language: Python
- Homepage:
- Size: 298 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Accounting helpers for Stripe
===================================Millions of businesses of all sizes—from startups to large enterprises—use
Stripe’s software and APIs to accept payments, send payouts, and manage their
businesses online.However, Stripe lacks some functionalities or has some workflow issues, including, but not restricted to:
- providing credit note options for voided and uncollectible invoices
- linking payout items to invoices and credit notes
- emitting automatically credit notes when a dispute is lost
- providing good statistics about OSS (One Stop Shop)This repository aims to provide toolings to fix these issues and help businesses
to be compliant with their country accounting standards.Feel free to open an issue with your business requirements.
The repository is experimental and may contain some LeakIX specific business requirements.
## Setup
Install python dependencies
```
poetry install
```### Environment variables
Some configuration is required. Create a file `.env` based on `template.env`.
## CLI
### Download all invoices between two dates
```
poetry run python \
stripe_accounting/accounting.py \
download-invoices \
--from-datetime 2023-03-01 \
--until-datetime 2023-03-31
```Files will be available in `DOWNLOAD_DIRECTORY`, see `template.env`
### Emit credit notes
Emit credit notes between two dates. It emits credits notes for:
- voided invoices
- uncollectible invoices
- Stripe emitted credit notes (to keep a continuous numbering)
- opened invoices if [include_open] is set to non-zero value.
- include refunded invoices. There should be an overlap with the stripe emitted CN but we
might have forgotten to emit a credit note when refunding.
- include lost disputes```
poetry run python \
stripe_accounting/accounting.py \
emit-credit-notes \
--from-datetime 2023-03-01 \ # Start date
--until-datetime 2023-03-31 \ # End date
--first-index-cn 3 \ # The index to start for the credit note number
--currency-iso-code eur \
--include-open 1 \ # If set to non-zero value, include currenctly open invoices
--issued-date-credit-note 2023-03-31 \ # Date to use for the credit note issuance
--skipping-invoices "" # Invoice ids to skip
```### Create VAT detailled report
```
poetry run python stripe_accounting/accounting.py make_detailled_vat_report \
--from-datetime 2023-07-01 \
--until-datetime 2023-07-31 \
--output-extension xlsx
```### Create detailled payout report
Links every invoice with a payout, include fees, country, client, etc.
```
poetry run python stripe_accounting/accounting.py export_payout \
--from-datetime 2023-07-01 \
--until-datetime 2023-07-31 \
--output-extension xlsx
```