# Contra examples Learn about revenue recognition with contra examples. Unless stated otherwise, these contra examples assume that revenue recognition takes place on a per-day basis. ## Customer credit balance This example uses the following assumptions: - On January 15, at 00:00:00 UTC, a customer starts a monthly subscription that costs 31 USD. - The subscription generates an invoice. - The invoice finalizes on January 15, at 00:00:00 UTC. - The customer has -11 USD in its customer credit balance. Stripe automatically applies -11 USD to the invoice and adjusts the customer credit balance to 0 USD. - The customer pays 20 USD on February 9. In this example, the invoice and revenue periods are from 1/15/2026 to 2/14/2026. The 31 USD is recognized across 17 days in January and 14 days in February. If you looked at the summary after January ends, you might see something like: | Account | Jan | Feb | | --- | --- | --- | | AccountsReceivable | +20.00 | -20.00 | | Cash | | +20.00 | | CustomerBalance | -11.00 | | | Revenue | +17.00 | +14.00 | | DeferredRevenue | +14.00 | -14.00 | In this scenario, the customer has an existing customer credit balance that’s used to pay the invoice. It’s also possible for a negative amount on an invoice to credit the customer credit balance, which is then used to pay the invoice. This often happens when a customer downgrades to a cheaper subscription. For example, assume that: - A -31 USD invoice with one invoice line item finalizes on January 15, at 00:00:00 UTC. - The service period for the -31 USD invoice line item is from January 15 00:00:00 UTC to February 15 00:00:00 UTC. - Stripe automatically credits 31 USD to the customer credit balance and closes the invoice. The -31 USD line item books a journal entry that debits DeferredRevenue and credits AccountsReceivable. When Stripe credits the customer credit balance, it books another journal entry that debits AccountsReceivable and credits CustomerBalance. In the summary at the end of January, you might see something like: | Account | Jan | Feb | | --- | --- | --- | | AccountsReceivable | | | | Cash | | | | CustomerBalance | +31.00 | | | Revenue | -17.00 | -14.00 | | DeferredRevenue | -14.00 | +14.00 | Notice that eventually the net revenue is -31 USD. ## Refund This example uses the following assumptions: - On January 1, at 00:00:00 UTC, a customer starts a three month subscription that costs 90 USD. - The subscription generates an invoice. - The invoice finalizes and the customer pays 90 USD. - On February 1, they receive a full refund. When you make a full refund: - The customer receives cash. - Recognized revenue is offset by contra revenue in the refunds account. - Deferred revenue from the subscription that hasn’t been recognized is cleared. In this example, the customer received one month of service, so they receive a 31 USD refund. The refund also decreases the cash balance in your Stripe account by 90 USD. At the time of the refund, there was 59 USD remaining in deferred revenue, so this is also cleared. If you viewed the summary after March ends, it might look something like this: | Account | Jan 2026 | Feb 2026 | Mar 2026 | | --- | --- | --- | --- | | Revenue | +31.00 | | | | DeferredRevenue | +59.00 | -59.00 | | | Cash | +90.00 | -90.00 | | | Refunds | | +31.00 | | ## Partial refund This example uses the following assumptions: - On January 1, at 00:00:00 UTC, a customer starts a three month subscription that costs 90 USD. - The subscription generates an invoice. - The invoice finalizes and the customer pays 90 USD. - On February 1, they receive a partial refund of 9 USD. When the partial refund is made: - The customer receives 9 USD. - Recognized revenue is proportionally offset by contra revenue in the refunds account. - Deferred revenue from the subscription that hasn’t been recognized is also proportionally reduced. In this example, the customer received one month of service, so 31 USD has been recognized. There is 59 USD remaining in deferred revenue. The partial refund of 9 USD is 10% of 90 USD. Therefore, the refunds account (part of contra revenue) increased by 3.10 USD (10% of 31 USD), and deferred revenue decreased by 5.90 USD (10% of 59 USD). If you viewed the summary after March ends, it might look something like this: | Account | Jan 2026 | Feb 2026 | March 2026 | | --- | --- | --- | --- | | Revenue | +31.00 | +25.20 | +27.90 | | DeferredRevenue | +59.00 | -31.10 (= -25.20 + -5.90) | -27.90 | | Cash | +90.00 | -9.00 | | | Refunds | | +3.10 | | ## Void This example uses the following assumptions: - On January 1, at 00:00:00 UTC, a customer starts a three month subscription that costs 90 USD. - The subscription generates an invoice. - The invoice finalizes, but the customer hasn’t paid yet. - On February 1, you void the invoice. When you void the invoice: - The accounts receivable account is cleared because we don’t expect to get paid. - Recognized revenue is offset by contra revenue in the voids account. - Deferred revenue from the subscription that hasn’t been recognized is cleared. In this example, the customer received one month of service, so 31 USD in recognized revenue is voided. At the time of the invoice being voided, there was 59 USD remaining in deferred revenue, so this is also cleared. If you viewed the summary after March ends, it might look something like this: | Account | Jan 2026 | Feb 2026 | Mar 2026 | | --- | --- | --- | --- | | AccountsReceivable | +90.00 | -90.00 | | | Revenue | +31.00 | | | | DeferredRevenue | +59.00 | -59.00 | | | Voids | | +31.00 | | ## Uncollectible This example uses the following assumptions: - On January 1, at 00:00:00 UTC, a customer starts a three month subscription that costs 90 USD. - The subscription generates an invoice. - The invoice finalizes, but the customer hasn’t paid yet. - On February 1, the invoice is marked as uncollectible. When the invoice is marked as uncollectible: - The accounts receivable account is cleared because we don’t expect to get paid. - Recognized revenue is offset by contra revenue in the bad debt account. - Deferred revenue from the subscription that hasn’t been recognized is cleared. In this example, the customer received one month of service, so 31 USD in recognized revenue becomes bad debt. At the time of the invoice being marked as uncollectible, there was 59 USD remaining in deferred revenue, so this is also cleared. If you viewed the summary after March ends, it might look something like this: | Account | Jan 2026 | Feb 2026 | Mar 2026 | | --- | --- | --- | --- | | AccountsReceivable | +90.00 | -90.00 | | | Revenue | +31.00 | | | | DeferredRevenue | +59.00 | -59.00 | | | BadDebt | | +31.00 | | An uncollectible invoice might still be paid. When the invoice is paid, the bad debt account is cleared out using a part of the received cash amount. The remaining cash amount goes to the recoverables account. If the invoice is paid in April, the summary might look something like this: | Account | Jan 2026 | Feb 2026 | Mar 2026 | Apr 2026 | | --- | --- | --- | --- | --- | | AccountsReceivable | +90.00 | -90.00 | | | | Revenue | +31.00 | | | | | DeferredRevenue | +59.00 | -59.00 | | | | BadDebt | | +31.00 | | -31.00 | | Cash | | | | +90.00 | | Recoverables | | | | +59.00 | An uncollectible invoice might still be voided. When the invoice is voided, the bad debt account is cleared out and the contents are moved into the void account. If the invoice is voided in April, the summary might look something like this: | Account | Jan 2026 | Feb 2026 | Mar 2026 | Apr 2026 | | --- | --- | --- | --- | --- | | AccountsReceivable | +90.00 | -90.00 | | | | Revenue | +31.00 | | | | | DeferredRevenue | +59.00 | -59.00 | | | | BadDebt | | +31.00 | | -31.00 | | Void | | | | +31.00 | ## Uncollectible invoice with applied customer credit balance This example uses the following assumptions: - On January 15 at 00:00:00 UTC, a customer starts a monthly subscription that costs 31 USD. - The subscription generates an invoice. - The invoice finalizes on January 15 at 00:00:00 UTC. - The customer’s credit balance is -11 USD. Stripe automatically applies -11 USD to the invoice and adjusts the credit balance accordingly. - On February 15, the invoice is marked as uncollectible. In this example, the invoice and revenue periods are from January 15, 2026 to February 14, 2026. Stripe recognizes the 31 USD across 17 days in January and 14 days in February. Stripe automatically offsets recognized revenue with the bad debt account if an invoice is set as uncollectible. With the customer’s 11 USD credit balance, Stripe considers 6 USD (11 × 17 / 31) as recognized revenue and 5 USD (11 × 14 / 31) as deferred revenue. The portion of paid deferred revenue is considered as a gain and booked in the recoverables account. The summary after February end might look something like: | Account | Starting | Jan | Feb | Ending | | --- | --- | --- | --- | --- | | AccountsReceivable | 0.00 | +20.00 | -20.00 | 0.00 | | BadDebt | 0.00 | | +11.00 | 11.00 | | CustomerBalance | 11.00 | -11.00 | | 0.00 | | Recoverables | 0.00 | | +5.00 | 5.00 | | Revenue | 0.00 | +17.00 | | 17.00 | | DeferredRevenue | 0.00 | +14.00 | -14.00 | 0.00 | As another example, you can increase the customer’s invoice due amount when there’s an outstanding balance (that is, they owe some amount to you). Consider the following: - A 31 USD invoice with one invoice line item finalizes on January 15 at 00:00:00 UTC. - The service period for the 31 USD invoice line item is from January 15 00:00:00 UTC to February 15 00:00:00 UTC. - There is a customer credit balance of 10 USD. Because of this, Stripe adds that amount to the invoice making the outstanding balance be 0 USD. - This debits AccountsReceivable and credits CustomerBalance for 10 USD. - Stripe marks the invoice as uncollectible on February 15. For an uncollectible invoice, the portion of due customer credit balance isn’t collected. Because of this, it’s considered a negative gain and booked as a negative amount to the recoverables account. The summary after February end might look something like: | Account | Starting | Jan | Feb | Ending | | --- | --- | --- | --- | --- | | AccountsReceivable | 0.00 | +41.00 | -41.00 | 0.00 | | BadDebt | 0.00 | | +17.00 | 17.00 | | CustomerBalance | -10.00 | +10.00 | | 0.00 | | Recoverables | 0.00 | | -10.00 | -10.00 | | Revenue | 0.00 | +17.00 | | 17.00 | | DeferredRevenue | 0.00 | +14.00 | -14.00 | 0.00 | ## Uncollectible and disputed or refunded An uncollectible invoice can be paid, then later disputed or refunded. This example uses the following assumptions: - On January 1, at 00:00:00 UTC, a customer starts a three month subscription that costs 90 USD. - The subscription generates an invoice. - The invoice finalizes, but the customer hasn’t paid yet. - On February 1, the invoice is marked as uncollectible. - On April 1, the invoice is paid. - On May 1, the corresponding charge is disputed. As shown in the [uncollectible](https://docs.stripe.com/revenue-recognition/examples/contra.md#uncollectible) example, when the invoice is marked as uncollectible and later paid: - The bad debt account is cleared out. - The remainder is booked as recoverables. In this example, the customer later decides to dispute the charge. When a dispute occurs, the summary might look something like: | Account | Jan 2026 | Feb 2026 | Mar 2026 | Apr 2026 | May 2026 | | --- | --- | --- | --- | --- | --- | | AccountsReceivable | +90.00 | -90.00 | | | | | Revenue | +31.00 | | | | | | DeferredRevenue | +59.00 | -59.00 | | | | | BadDebt | | +31.00 | | -31.00 | | | Cash | | | | +90.00 | -90.00 | | Disputes | | | | | +31.00 | | Recoverables | | | | +59.00 | -59.00 | An invoice marked as uncollectible, paid, and later refunded works in a similar manner except that it uses the refunds account instead of the disputes account. ## Dispute In case of a dispute, revenue recognition works similarly to how a refund works except that it uses the disputes account instead. This example also shows what happens if you win a dispute. It uses the following assumptions: - On January 1, at 00:00:00 UTC, a customer starts a three month subscription that costs 90 USD. - The subscription generates an invoice. - The invoice finalizes and the customer pays 90 USD. - On February 1, they dispute the payment. - On April 1, you win the dispute because the bank rules in your favor. When the customer makes the dispute: - Cash is returned to the customer. - Recognized revenue is offset by contra revenue in the disputes account. - Deferred revenue from the subscription that hasn’t been recognized is cleared. When you win the dispute: - Cash is returned to you. - Recognized revenue and deferred revenue don’t change. - Cash is offset by an increase in the recoverables account. In this example, the customer received one month of service, so 31 USD in recognized revenue is disputed. The dispute also decreases the cash balance in your Stripe account by 90 USD. At the time of the dispute, there was 59 USD remaining in deferred revenue, so this is also cleared. Later in time, in April, the bank rules in your favor, so the cash is returned to you. If you viewed the summary after April ends, it might look something like this: | Account | Jan 2026 | Feb 2026 | Mar 2026 | Apr 2026 | | --- | --- | --- | --- | --- | | Revenue | +31.00 | | | | | DeferredRevenue | +59.00 | -59.00 | | | | Cash | +90.00 | -90.00 | | +90.00 | | Disputes | | +31.00 | | | | Recoverables | | | | +90.00 | ## Other loss This example is based on the following details: - On January 1, at 00:00:00 UTC, a customer starts a 10 month subscription that costs 100 USD. - One month of revenue is recognized (10 USD). - The invoice is paid. - On February 1, an 80 USD refund happened, and a proportionate amount of revenue was recognized. - On March 1, an 80 USD dispute happened. | Account | Jan | Feb | Mar | | --- | --- | --- | --- | | Cash | +100.00 | -80.00 | -80.00 | | Revenue | +10.00 | +2.00 | | | DeferredRevenue | +90.00 | -74.00 | -16.00 | | Refund | | +8.00 | | | Dispute | | | +4.00 | | OtherLoss | | | +60.00 | ## Subscription cancellation The following examples show how Revenue Recognition handles different subscription cancellation scenarios. ### Cancellation at period end This example uses the following assumptions: - On January 1, at 00:00:00 UTC, a customer starts a three month subscription that costs 90 USD. - The subscription generates an invoice. - The invoice finalizes and the customer pays 90 USD. - On February 1, the customer cancels the subscription effective at the end of the current billing period (March 31). When a subscription is canceled at the end of the period, the customer continues to receive service until the period ends. Revenue continues to amortize over the original service period because the customer is still receiving service. No refund is issued and no contra revenue is recorded. If you viewed the summary after March ends, it might look something like this: | Account | Jan 2026 | Feb 2026 | Mar 2026 | | --- | --- | --- | --- | | Revenue | +31.00 | +28.00 | +31.00 | | DeferredRevenue | +59.00 | -28.00 | -31.00 | | Cash | +90.00 | | | ### Immediate cancellation with full refund This example uses the following assumptions: - On January 1, at 00:00:00 UTC, a customer starts a three month subscription that costs 90 USD. - The subscription generates an invoice. - The invoice finalizes and the customer pays 90 USD. - On February 1, the customer cancels the subscription immediately and receives a full refund of 90 USD. When the subscription is canceled immediately with a full refund: - The customer receives 90 USD in cash. - Recognized revenue is offset by contra revenue in the refunds account. - Deferred revenue from the subscription that hasn’t been recognized is cleared. In this example, 31 USD was recognized in January. The full refund of 90 USD clears the 59 USD remaining in deferred revenue and offsets the 31 USD of recognized revenue through the refunds account. If you viewed the summary after March ends, it might look something like this: | Account | Jan 2026 | Feb 2026 | Mar 2026 | | --- | --- | --- | --- | | Revenue | +31.00 | | | | DeferredRevenue | +59.00 | -59.00 | | | Cash | +90.00 | -90.00 | | | Refunds | | +31.00 | | ### Immediate cancellation with partial refund This example uses the following assumptions: - On January 1, at 00:00:00 UTC, a customer starts a three month subscription that costs 90 USD. - The subscription generates an invoice. - The invoice finalizes and the customer pays 90 USD. - On February 1, the customer cancels the subscription immediately and receives a partial refund of 45 USD (half the invoice amount). When the subscription is canceled immediately with a partial refund: - The customer receives 45 USD in cash. - The partial refund proportionally reduces recognized revenue and deferred revenue. - A portion of the refund is recorded as contra revenue in the refunds account. In this example, the partial refund of 45 USD is 50% of 90 USD. Therefore, the refunds account increases by 15.50 USD (50% of 31 USD already recognized), and deferred revenue decreases by 29.50 USD (50% of 59 USD). The remaining deferred revenue of 29.50 USD continues to amortize over February and March. If you viewed the summary after March ends, it might look something like this: | Account | Jan 2026 | Feb 2026 | Mar 2026 | | --- | --- | --- | --- | | Revenue | +31.00 | +14.00 | +15.50 | | DeferredRevenue | +59.00 | -43.50 | -15.50 | | Cash | +90.00 | -45.00 | | | Refunds | | +15.50 | | ### Immediate cancellation with no refund This example uses the following assumptions: - On January 1, at 00:00:00 UTC, a customer starts a three month subscription that costs 90 USD. - The subscription generates an invoice. - The invoice finalizes and the customer pays 90 USD. - On February 1, the customer cancels the subscription immediately. No refund is issued. When the subscription is canceled immediately with no refund: - No cash is returned to the customer. - The remaining deferred revenue is recognized immediately on the cancellation date because the performance obligation is considered fulfilled. - No contra revenue is recorded. In this example, 31 USD was recognized in January. On February 1, the remaining 59 USD in deferred revenue is recognized immediately. If you viewed the summary after March ends, it might look something like this: | Account | Jan 2026 | Feb 2026 | Mar 2026 | | --- | --- | --- | --- | | Revenue | +31.00 | +59.00 | | | DeferredRevenue | +59.00 | -59.00 | | | Cash | +90.00 | | |