Skip to main content

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 (the txn_... 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 fee is split out to the fees account so the counter leg is the gross.
  • stripe_fee transactions (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 balance snapshot becomes per-currency balance assertions dated the day after as_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beangulp_stripe-0.1.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beangulp_stripe-0.1.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file beangulp_stripe-0.1.0.tar.gz.

File metadata

  • Download URL: beangulp_stripe-0.1.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for beangulp_stripe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4a2c140a7c2d4868aa60dad8a6e0781004d6a582471f3a9e6d2788bde278dc4a
MD5 ff606d8f04545ef47bcae85301bb271d
BLAKE2b-256 8e27dfc62ae8d0f25a181b401f405647d23204803721faf45f4ccfec9c51e9dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for beangulp_stripe-0.1.0.tar.gz:

Publisher: publish.yaml on sealambda/quints

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file beangulp_stripe-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: beangulp_stripe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for beangulp_stripe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6cb676706bae9b1ae2dd42449220dfe23866446b238f14050d97ee527d30cdee
MD5 942986919326c5e72b9e5012af5413de
BLAKE2b-256 9fa7167eaa54c7bb34c5dcd7de1f9edca3ecc7557b9a8582b053989ddc7958d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for beangulp_stripe-0.1.0-py3-none-any.whl:

Publisher: publish.yaml on sealambda/quints

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page