beangulp importer for Stripe balance transactions, with a thin API client: idempotent drafts via balance-transaction ids, minor-unit conversion, fee splitting, balance-snapshot assertions
Project description
beangulp-stripe
beangulp importer for Stripe balance transactions, plus a thin API client. Entity-agnostic: account names, the fee account, and payee rules are all constructor arguments.
Input
A JSON file of /v1/balance_transactions data — the raw Stripe list
response, a bare array, or a wrapper:
{
"account": {"id": "acct_..."},
"balance": {"as_of": "2026-07-10", "available": [...], "pending": [...]},
"data": [{"object": "balance_transaction", "id": "txn_...", ...}]
}
Behaviour
stripe_id:metadata (thetxn_...id) is the idempotency key — re-imports skip ids already in the ledger.- Minor units are converted per currency (zero- and three-decimal currencies included).
- Cash leg books the net; a per-transaction
feeis split out to the fees account so the counter leg is the gross. stripe_feetransactions (monthly-billed fees debited from the balance) go straight to the fees account, review-flagged: the monthly tax invoice drives the VAT split at review.payee_rules(regex, account, flag)draft other counter legs; unmatched drafts stay!-flagged with the cash leg only.- A
balancesnapshot becomes per-currencybalanceassertions dated the day afteras_of.
Client
from beangulp_stripe import StripeClient
client = StripeClient("rk_live_...") # restricted key, read-only scopes
txns = client.balance_transactions(created_gte, created_lte)
snapshot = client.balance()
Use a restricted API key with Balance transaction sources: Read and
Charges: Read (for expand[]=data.source payee names). No write scopes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file beangulp_stripe-0.1.1.tar.gz.
File metadata
- Download URL: beangulp_stripe-0.1.1.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2365f1ee62f3dd80ccabc7193a3c1e38ac74ef58c8851a32fe39c4e657ea6235
|
|
| MD5 |
b70170d5140c1425bbb25b1761a65f65
|
|
| BLAKE2b-256 |
24418fed48f13de17743097fffbae774bfeeb4e647234f50de13fa33bdba36a4
|
Provenance
The following attestation bundles were made for beangulp_stripe-0.1.1.tar.gz:
Publisher:
publish.yaml on sealambda/quints
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
beangulp_stripe-0.1.1.tar.gz -
Subject digest:
2365f1ee62f3dd80ccabc7193a3c1e38ac74ef58c8851a32fe39c4e657ea6235 - Sigstore transparency entry: 2202478466
- Sigstore integration time:
-
Permalink:
sealambda/quints@dcdde75977a0f8bc4304a4e91ca7dd0f28550001 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/sealambda
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@dcdde75977a0f8bc4304a4e91ca7dd0f28550001 -
Trigger Event:
push
-
Statement type:
File details
Details for the file beangulp_stripe-0.1.1-py3-none-any.whl.
File metadata
- Download URL: beangulp_stripe-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aee3bff3da9550979b2006f14098afb0e4d9a4ab46c324903739b5f2a3c09050
|
|
| MD5 |
daef9ca81553c0a74c935855582da7f6
|
|
| BLAKE2b-256 |
ca8fe263e642378d5e73a73316bf1da563d9999b2f1af45f12a76f67bcbd5b05
|
Provenance
The following attestation bundles were made for beangulp_stripe-0.1.1-py3-none-any.whl:
Publisher:
publish.yaml on sealambda/quints
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
beangulp_stripe-0.1.1-py3-none-any.whl -
Subject digest:
aee3bff3da9550979b2006f14098afb0e4d9a4ab46c324903739b5f2a3c09050 - Sigstore transparency entry: 2202478559
- Sigstore integration time:
-
Permalink:
sealambda/quints@dcdde75977a0f8bc4304a4e91ca7dd0f28550001 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/sealambda
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@dcdde75977a0f8bc4304a4e91ca7dd0f28550001 -
Trigger Event:
push
-
Statement type: