Helper functions for creating balance transactions.
Balance transactions are created automatically when:
- A charge is created (type: "charge")
- A refund is created (type: "refund")
- A payout is created (type: "payout")
Fee Calculation
Stripe's standard fee is 2.9% + $0.30 per successful card charge. For simplicity, PaperTiger uses this formula for all charges.
Summary
Functions
Calculates Stripe's processing fee for a given amount.
Creates a balance transaction for a charge.
Creates a balance transaction for a refund.
Functions
Calculates Stripe's processing fee for a given amount.
Formula: 2.9% + $0.30 (in cents)
Creates a balance transaction for a charge.
Returns the balance transaction ID.
Creates a balance transaction for a refund.
Refunds have negative amounts and return fees proportionally.