Fees and refund behaviour are Stripe's US standard pricing and documentation, checked on 14 November 2026. Custom pricing and other payment methods can differ.
A partial refund returns part of a captured payment to the customer's original payment method. On Stripe you pass an amount when you create the refund; leave it out and you refund the lot. You can issue more than one refund against a charge, but never more than the charge in total (Stripe).
What it costs: the fee isn't returned
Stripe's standard pricing charges nothing to issue a refund, except possibly for bank transfers, but "the payment processing, Connect and currency conversion fees from the original transaction are not returned" (Stripe pricing). On custom pricing, refunds may carry a fee under your own schedule. So a partial refund costs you the refunded amount, and you keep paying the fee on the full original charge.
One $100 order on Stripe's US domestic card rate of 2.9% + $0.30:
| Step | Arithmetic | Your Stripe balance |
|---|---|---|
| Customer pays $100.00 | Fee: $100.00 x 2.9% + $0.30 = $3.20 | +$96.80 |
| Refund $40.00 | Fee stays at $3.20 | $96.80 - $40.00 = $56.80 |
| Effective fee on the $60.00 you kept | $3.20 / $60.00 | 5.33% |
| If you'd charged $60.00 in the first place | $60.00 x 2.9% + $0.30 = $2.04, so net $57.96 | $57.96 |
| What the refund route cost you | $57.96 - $56.80 | $1.16 (the 2.9% on the $40.00) |
| Second refund, $25.00 | $100.00 - $40.00 - $25.00 = $35.00 left to refund | $56.80 - $25.00 = $31.80 |
| Third refund attempt, $40.00 | $40.00 > $35.00 | Rejected |
The $1.16 is small per order and real across a returns-heavy catalogue. When you know before capture that you'll ship less, the cheaper move is to capture less: a partial capture releases the rest of the authorization, and Stripe itself recommends manual capture for businesses that refund a lot soon after payment (Stripe). The Stripe fee calculator runs the same numbers for your prices.
Refunds that don't go through
A refund is a request, not a done deal, and it has states: pending, succeeded, failed, canceled, and requires_action for methods where Stripe has to collect the customer's bank details first (Stripe). The ones that catch people out:
- Not enough balance. Refunds come out of your available Stripe balance. If it can't cover a card refund, Stripe holds the refund as pending; for other payment methods the refund fails. A card refund still pending after 45 days fails with
insufficient_funds, and you have to refund the customer some other way. - The card or account is gone. If the issuer or bank can't process it (closed account, a card problem), the money comes back to your Stripe balance, which can take up to 30 days. The refund moves to
failedwith afailure_reason, and Stripe sendsrefund.failed. - Your customer is still owed. A failed refund isn't a refund. Your books still owe that customer the money, and someone has to pay them another way.
- Timing. The customer sees the credit roughly 5-10 business days after you refund, depending on their bank. A refund issued shortly after the charge may go through as a reversal instead: the original charge drops off the statement and no separate credit appears, which looks like nothing happened if you tell them to watch for a credit.
Listen for refund.created, refund.updated and refund.failed, and verify the signature on every one (Stripe).
When the customer disputes anyway
While a dispute is open you can't refund outside the dispute process (Stripe). The awkward case runs the other way: you've already given back $40, and the customer disputes the full $100. Stripe calls this uncommon and says to always respond, with evidence of the partial refund (a "credit issued" response). If you win, you get the whole disputed amount back; if you lose, you get back only the partially refunded amount (Stripe).
Continuing the $100 order after the $40 refund, with Stripe's US dispute fees of $15 when a dispute is received and $15 more if you counter it, the countered fee returned if you win (Stripe):
| Outcome | Arithmetic from $56.80 | Your balance | The customer got back |
|---|---|---|---|
| You don't respond | $56.80 - $100.00 - $15.00 | -$58.20 | $140.00 on a $100.00 order |
| You counter and lose | $56.80 - $115.00 - $15.00 + $40.00 | -$33.20 | $100.00 |
| You counter and win | $56.80 - $115.00 - $15.00 + $100.00 + $15.00 | +$41.80 | $40.00 |
Not responding is the only row where the customer is paid more than they paid you. The win row is the $60.00 you kept, minus the $3.20 processing fee and the $15.00 received fee. Disputes count toward your network ratios whatever the outcome; chargeback vs refund covers why refunding before a dispute is usually the cheaper path.
Refunding safely in code
Stripe enforces the "never more than the charge" rule on its side, but your system needs its own version, counting refunds that are still in flight, or two agents processing the same return will both pass a check that only counts completed refunds:
import stripe
# Refunds that still count against the payment. failed and canceled don't.
COMMITTED = {"pending", "requires_action", "succeeded"}
class RefundRejected(Exception):
pass
def refundable_cents(payment, refunds):
"""What's left to refund, counting refunds that are still in flight."""
committed = sum(r.amount_cents for r in refunds if r.status in COMMITTED)
return payment.captured_cents - committed
def partial_refund(payment, refunds, amount_cents, return_id):
"""Call with the payment row locked, so two agents can't both pass the check."""
if not 0 < amount_cents <= refundable_cents(payment, refunds):
raise RefundRejected("more than is left to refund on this payment")
try:
return stripe.Refund.create(
payment_intent=payment.intent_id,
amount=amount_cents,
metadata={"return_id": return_id},
# One key per return: a retried request can't refund twice.
idempotency_key=f"refund-{return_id}",
)
except stripe.InvalidRequestError as e:
# For example, a charge with an open dispute can't be refunded.
raise RefundRejected(str(e)) from e
Store each refund with its status and let the webhook events move it on. A refund that later fails drops out of COMMITTED, and the amount becomes refundable again, which is correct: the customer hasn't been paid.
The provider-neutral version of the arithmetic, for captures and refunds alike. From chapter 5.
Partial Captures and Refunds
Captures and refunds can both happen in pieces, and the arithmetic has to hold:
class PartialPaymentManager:
def __init__(self, total_amount):
self.total_amount = total_amount
self.captures = []
self.refunds = []
def partial_capture(self, amount, description):
"""Capture part of an authorized payment.
Generic model. On Stripe most payments allow a single capture, and
a partial capture releases the rest; multiple captures need an
eligible payment with multicapture enabled.
"""
if self.total_captured() + amount > self.total_amount:
raise PaymentError("Partial capture exceeds authorized amount")
capture = {
'amount': amount,
'timestamp': datetime.now(),
'description': description,
'status': 'captured'
}
self.captures.append(capture)
def partial_refund(self, amount, reason):
"""Refund part of a captured payment"""
if self.total_refunded() + amount > self.total_captured():
raise PaymentError("Refund amount exceeds captured amount")
refund = {
'amount': amount,
'timestamp': datetime.now(),
'reason': reason,
'status': 'processing'
}
self.refunds.append(refund)
def total_captured(self):
return sum(c['amount'] for c in self.captures)
def total_refunded(self):
# Count refunds still in flight too, or two quick partial refunds
# can together exceed what was captured.
return sum(r['amount'] for r in self.refunds
if r['status'] not in ('failed', 'canceled'))
Journal entries from reconciled transactions, the chart of accounts with Sales Returns and Chargeback Expenses, and the export to QuickBooks and Xero. From chapter 20.
Accounting Integration
The accounting integration creates double-entry journal entries from reconciled transactions and exports to accounting systems. The complete implementation with QuickBooks, Xero, and CSV export is in src/examples/20-reconciliation/accounting_integration.py.
from accounting_integration import AccountingIntegration, ReconciliationReporting
# Initialize accounting integration
accounting = AccountingIntegration(accounting_system='quickbooks')
# Create journal entries from reconciled transactions
reconciled_transactions = [
{'id': 'tx_001', 'amount': 100.00, 'fee': 3.20, 'status': 'matched',
'date': '2024-01-15T10:30:00', 'currency': 'USD', 'provider': 'stripe',
'description': 'Online purchase'}
]
entries = accounting.create_payment_journal_entries(reconciled_transactions)
print(f"Created {len(entries)} journal entries")
# Export to QuickBooks
result = accounting.export_to_quickbooks(entries)
print(f"Exported: {result['entries_created']} entries, ${result['total_amount']:,.2f}")
# Generate reconciliation report
reporting = ReconciliationReporting()
report = reporting.generate_reconciliation_report({
'period': '2024-01-15',
'stripe': reconciliation_records,
'paypal': paypal_records
})
print(f"Match rate: {report['summary']['overall_match_rate']:.1f}%")
print(f"Health: {report['summary']['reconciliation_health']}")
Key features of accounting integration:
- Double-entry bookkeeping: Creates balanced debit/credit entries for each transaction
- Chart of accounts: Configurable account mapping (bank: 1010, revenue: 4010, fees: 5010)
- Multi-system export: Supports QuickBooks IIF format, Xero API, and CSV export
- Reconciliation reporting: Generates health scores, variance analysis, and exception reports
Accounting Integration: Bridging Payments and Finance
The accounting integration layer turns raw transaction events into the double-entry records your accountant needs, in a shape that survives an audit.
The JournalEntry dataclass enforces double-entry bookkeeping: every transaction needs a debit account (where the money went) and a credit account (where it came from). That balance is what stops your books from drifting under audit.
The _load_chart_of_accounts method defines the financial structure with standard account numbers: 1010 (Bank Account) for actual cash, 4010 (Sales Revenue) for customer payments, 5010 (Processing Fees) for provider fees, 1200 (Accounts Receivable) for money owed but not received, 4020 (Sales Returns) for revenue reductions from refunds, and 5020 (Chargeback Expenses) for losses from disputes. These follow standard conventions, which keeps QuickBooks integration straightforward.
Always track processing fees in a separate expense account (5010) rather than netting them from revenue. Recording gross revenue of $100 with a $3.20 fee expense gives you accurate margin analysis, proper tax reporting, and the data you need to negotiate better rates. Netting to $96.80 revenue hides your true processing costs and makes fee optimization impossible.
The create_payment_journal_entries method generates the right entries for each scenario. Standard payment flow: customer pays $100, Stripe charges $3.20 (2.9% + $0.30), you receive $96.80. The entries debit Bank $96.80, credit Revenue $100, debit Fees $3.20 - revenue at gross, fees tracked separately. Tracking fees separately also gives you per-provider fee attribution and clean tax reporting (gross vs net matters to tax authorities), plus the hard data you want walking into a rate negotiation.
The export_to_quickbooks method shows the typical accounting integration pattern: batch processing for efficiency, transaction references for traceability, error handling that prevents partial exports, and summary reporting for verification. The ReconciliationReporting class reports at several levels: per-provider match rates, variance totals and patterns, the exceptions themselves, and how matching performance trends over time.
Exception management automatically categorizes unmatched transactions, partial matches needing manual review, large variances that signal systemic issues, and recurring patterns. The export_exceptions_report method writes CSVs sorted by variance amount, with the context someone needs to resolve each one, Excel-compatible for the finance team, and backed by a complete audit trail. The reconciliation health metric ('good' if matched / total_transactions > 0.95) gives instant status: 95%+ match rate is healthy, below 95% needs investigation, and trends over time reveal systematic issues.
The design holds up because payment processing stays separate from accounting, every transaction has a complete paper trail, a failed export can't corrupt the books, the abstraction keeps switching accounting systems straightforward, and batch processing handles the volume. It also absorbs the awkward realities: payments arrive 24/7 while accounting keeps business hours, refunds come partial and in stages, multi-entity setups keep separate books, currencies convert at different rates, and compliance requirements like SOX, GAAP, and local accounting standards all have to be met.
The ledger entries
Book revenue at gross and the fee as an expense, so a refund doesn't hide inside a smaller revenue number. For the same order, with a contra-revenue account for refunds:
| Event | Debit | Credit |
|---|---|---|
| Customer pays $100.00, fee $3.20 | Stripe balance $96.80; Processing fees $3.20 | Revenue $100.00 |
| Partial refund of $40.00 | Sales returns $40.00 | Stripe balance $40.00 |
| That refund fails | Stripe balance $40.00 | Refunds owed to customers $40.00 |
| You pay the customer by bank transfer | Refunds owed to customers $40.00 | Bank $40.00 |
There is no entry for the fee on the refund, because nothing happens to it. The failed refund doesn't reverse the sales return either: you still agreed to give the money back, so it becomes a liability until you do. Payments ledger covers the double-entry model behind this, and payment reconciliation is where a refund that lands in a different payout from its sale gets matched back.
Questions
Does Stripe return fees on a partial refund?
No. Stripe's pricing page says the payment processing, Connect and currency conversion fees from the original transaction are not returned. On standard pricing there's no fee for issuing the refund itself, except possibly for bank transfers.
Can you issue more than one partial refund on Stripe?
Yes. You can issue more than one refund against a charge, but the total can't be more than the original charge amount. On a $100 charge with $40 and $25 already refunded, $35 is left.
What happens if a refund fails?
The money returns to your Stripe balance, which can take up to 30 days, the refund moves to failed with a failure_reason, and Stripe sends refund.failed. The customer is still owed the money, so you have to refund them another way.
Can a customer dispute a payment after a partial refund?
Yes, and they can dispute the full amount. Stripe says to always respond with evidence of the partial refund. If you win you get the whole disputed amount back; if you lose you get back only the partially refunded amount. Not responding leaves the customer refunded twice for the same money.
How long does a partial refund take?
Stripe says the customer sees the credit roughly 5-10 business days after the refund, depending on their bank. A refund issued shortly after the charge can go through as a reversal instead, where the original charge drops off the statement and no separate credit appears.