Adds every month that is ready and not already in the output file. Running it twice is safe: months already there are left exactly as they stand, so hand edits survive.
Before the first run, add an import of the output file to the ledger and declare the accounts it posts to. With the defaults that is:
account assets:stripe
+ assert currency CHF
account expenses:banking:stripe
plus expenses:refunds and the payout account once a month needs them.
Then, each month, save Stripe's tax invoice into the documents directory under the name fees-attachment gives, run the importer, and get centjes check to pass. That invoice is the only file to fetch by hand; the reports a month is computed from are saved into the reports directory and attached as its evidence.
A month is held back until Stripe has finished computing it and its tax invoice is on disk, and so is every month after it. The run says which months and why.
centjes-stripe import [--key SECRET | --key-file FILE_PATH] [-o|--output FILE_PATH] [--begin YYYY-MM] [--documents DIRECTORY_PATH] [--reports DIRECTORY_PATH]
--key Stripe API key that can read the balance and payouts and create report runs
--key-file Stripe API key that can read the balance and payouts and create report runs
-o|--output Output file path, which this importer rewrites default: "stripe.cent"
--begin The first month to import, default: January of this year
--documents Directory of the Stripe documents downloaded by hand, relative to the ledger default: "documents"
--reports Directory to save the monthly report CSVs into, relative to the ledger default: "documents"
CENTJES_STRIPE_KEY SECRET Stripe API key that can read the balance and payouts and create report runs
CENTJES_STRIPE_KEY_FILE FILE_PATH Stripe API key that can read the balance and payouts and create report runs
CENTJES_STRIPE_OUTPUT FILE_PATH Output file path, which this importer rewrites default: "stripe.cent"
CENTJES_STRIPE_BEGIN YYYY-MM The first month to import, default: January of this year
CENTJES_STRIPE_DOCUMENTS DIRECTORY_PATH Directory of the Stripe documents downloaded by hand, relative to the ledger default: "documents"
CENTJES_STRIPE_REPORTS DIRECTORY_PATH Directory to save the monthly report CSVs into, relative to the ledger default: "documents"
Stripe API key that can read the balance and payouts and create report runs
import.key:
# or null
<string>
Stripe API key that can read the balance and payouts and create report runs
import.key-file:
# or null
<string>
Output file path, which this importer rewrites
default: "stripe.cent"
import.output:
# or null
<string>
The first month to import, default: January of this year
import.begin:
# or null
<string>
Account name of the Stripe balance
default: "assets:stripe"
import.assets-account:
# or null
<string>
Account name of domestic income
default: "income:domestic"
import.domestic-income-account:
# or null
<string>
Account name of the VAT charged to customers
default: "income:VAT"
import.vat-income-account:
# or null
<string>
Account name of foreign income
default: "income:foreign"
import.foreign-income-account:
# or null
<string>
Account name of Stripe's fees
default: "expenses:banking:stripe"
import.fees-account:
# or null
<string>
Account name of money given back to customers
default: "expenses:refunds"
import.refunds-account:
# or null
<string>
Account name of the VAT paid, which is what gets reclaimed
default: "expenses:VAT"
import.vat-expenses-account:
# or null
<string>
Account name of the self-transfer that payouts go through
default: "assets:self-transfer:stripe-neon"
import.payout-account:
# or null
<string>
Account name that the opening balance comes from
default: "equity:starting"
import.opening-account:
# or null
<string>
Tags for an expense transaction whose expenses carried recoverable VAT
default: ["deductible"]
import.deductible-tags:
# or null
- <string>
Tags for an expense transaction whose expenses carried no VAT
default: ["tax-deductible","not-vat-deductible"]
import.not-vat-deductible-tags:
# or null
- <string>
The two-letter country whose VAT this ledger owes
default: "CH"
import.home-country:
# or null
<string>
The percentage Stripe charges VAT on its own fees at
default: 8.1
import.fees-vat-rate:
# or null
<number>
The currency Stripe settles in
default: CurrencySymbol {currencySymbolText = "CHF"}
import.currency:
# or null
<string>
Directory of the Stripe documents downloaded by hand, relative to the ledger
default: "documents"
import.documents:
# or null
<string>
Directory to save the monthly report CSVs into, relative to the ledger
default: "documents"
import.reports:
# or null
<string>
formatTime pattern for Stripe's monthly tax invoice, the one document no API serves
default: "tax-invoice-%Y-%m.pdf"
import.fees-attachment:
# or null
<string>
Usage: centjes-stripe import [--key SECRET | --key-file FILE_PATH] [-o|--output FILE_PATH] [--begin YYYY-MM] [--documents DIRECTORY_PATH] [--reports DIRECTORY_PATH]
Import Stripe sales, fees and payouts month by month
Available settings:
Show this help text
switch: -h|--help
Stripe API key that can read the balance and payouts and create report runs
option: --key SECRET
option: --key-file FILE_PATH
env: CENTJES_STRIPE_KEY SECRET
env: CENTJES_STRIPE_KEY_FILE FILE_PATH
config:
import.key: # or null
<string>
config:
import.key-file: # or null
<string>
Output file path, which this importer rewrites
option: -o|--output FILE_PATH
env: CENTJES_STRIPE_OUTPUT FILE_PATH
config:
import.output: # or null
<string>
default: "stripe.cent"
The first month to import, default: January of this year
option: --begin YYYY-MM
env: CENTJES_STRIPE_BEGIN YYYY-MM
config:
import.begin: # or null
<string>
Account name of the Stripe balance
config:
import.assets-account: # or null
<string>
default: "assets:stripe"
Account name of domestic income
config:
import.domestic-income-account: # or null
<string>
default: "income:domestic"
Account name of the VAT charged to customers
config:
import.vat-income-account: # or null
<string>
default: "income:VAT"
Account name of foreign income
config:
import.foreign-income-account: # or null
<string>
default: "income:foreign"
Account name of Stripe's fees
config:
import.fees-account: # or null
<string>
default: "expenses:banking:stripe"
Account name of money given back to customers
config:
import.refunds-account: # or null
<string>
default: "expenses:refunds"
Account name of the VAT paid, which is what gets reclaimed
config:
import.vat-expenses-account: # or null
<string>
default: "expenses:VAT"
Account name of the self-transfer that payouts go through
config:
import.payout-account: # or null
<string>
default: "assets:self-transfer:stripe-neon"
Account name that the opening balance comes from
config:
import.opening-account: # or null
<string>
default: "equity:starting"
Tags for an expense transaction whose expenses carried recoverable VAT
config:
import.deductible-tags: # or null
- <string>
default: ["deductible"]
Tags for an expense transaction whose expenses carried no VAT
config:
import.not-vat-deductible-tags: # or null
- <string>
default: ["tax-deductible","not-vat-deductible"]
The two-letter country whose VAT this ledger owes
config:
import.home-country: # or null
<string>
default: "CH"
The percentage Stripe charges VAT on its own fees at
config:
import.fees-vat-rate: # or null
<number>
default: 8.1
The currency Stripe settles in
config:
import.currency: # or null
<string>
default: CurrencySymbol {currencySymbolText = "CHF"}
Directory of the Stripe documents downloaded by hand, relative to the ledger
option: --documents DIRECTORY_PATH
env: CENTJES_STRIPE_DOCUMENTS DIRECTORY_PATH
config:
import.documents: # or null
<string>
default: "documents"
Directory to save the monthly report CSVs into, relative to the ledger
option: --reports DIRECTORY_PATH
env: CENTJES_STRIPE_REPORTS DIRECTORY_PATH
config:
import.reports: # or null
<string>
default: "documents"
formatTime pattern for Stripe's monthly tax invoice, the one document no API serves
config:
import.fees-attachment: # or null
<string>
default: "tax-invoice-%Y-%m.pdf"