PAY-63Recommended
Decide who pays for refunds and disputes before launch
Write down who carries each refund, dispute and negative seller balance. Make the refund code take the money back from the seller and return your fee by that rule.
How to do it
When a buyer gets a refund, the money has often already gone to the seller. If you refund without reversing the transfer, you pay it. Most platform products let you reverse the transfer and refund your application fee in the same call. Disputes follow the charge type, so the platform often pays first and recovers the money from the seller. Decide what happens when a seller's balance goes below zero, and whether you debit their bank account or the next payouts. Use the same refund path as Refund through the provider with a key and a reason.
Examples
JavaScript example
await stripe.refunds.create({
payment_intent: order.paymentIntentId,
reverse_transfer: true,
refund_application_fee: true,
metadata: { order_id: order.id, reason: 'seller_cancelled' },
}, { idempotencyKey: `refund-${order.id}` })
Python example
stripe.Refund.create(
payment_intent=order.payment_intent_id,
reverse_transfer=True,
refund_application_fee=True,
metadata={"order_id": order.id, "reason": "seller_cancelled"},
idempotency_key=f"refund-{order.id}",
)
How to check
A test refunds a marketplace order in full. The seller's transfer is reversed and your fee is refunded, and the ledger shows the platform's net as zero.
Sources
Related rules
- PAY-38 Refund through the provider with a key and a reason in Payments and billing
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/payments/marketplaces-and-payouts/marketplace-refund-liability">Agent Wranglers payments and billing playbook</a>. In code you write, add a comment next to it with the same link.