Testing
Mock mode vs Stripe test mode, the test card table, simulating refunds, disputes and payouts, and dev-only time travel.
Testing
Mock mode vs Stripe test mode
Biz Invoice Pay ships with a mock payments gateway as the default provider. It behaves like Stripe but runs fully offline: no real money, no network calls, and no real data is collected (the mock onboarding page is clearly labeled).
- Mock mode — what you get out of the box and in dev. Use the test cards below. Perfect for learning the dashboard, building your integration, and running automated tests.
- Stripe test mode — when the real Stripe gateway is configured with test keys, you can use Stripe's own test cards. The Biz Invoice Pay API, webhooks, and fee math behave identically; only the provider changes.
Both modes use inv_test_… API keys. Live keys require completed Stripe onboarding.
Test cards (mock mode)
Any future expiry date and any CVC work. Card data is validated in memory and discarded — never stored or logged.
| Card number | Result |
|---|---|
| 4242 4242 4242 4242 | Success |
| 4000 0000 0000 0002 | Declined — payment status: "failed", failure_code: "card_declined" |
| 4000 0000 0000 9995 | Insufficient funds — failure_code: "insufficient_funds" |
| 4000 0000 0000 0259 | Succeeds, then creates a dispute after a delay |
| Anything else | Declined |
Simulating the money lifecycle
- Refunds: open any succeeded payment in the dashboard and click Refund, or call
POST /api/v1/payments/:id/refunds. Try a partial refund ($20 of $100) and watch the fee refund proportionally: $1.04 on a $5.20 fee. - Disputes: pay with
4000 0000 0000 0259, then open Disputes to practice responding with evidence. - Payouts: in mock mode, payouts run on the dev schedule with visible
pending→in_transit→paidtransitions and arrival dates. - Webhooks: use Send test event on any endpoint to get a real signed delivery without paying. Then run a full end-to-end: create a session, pay with the success card, and watch the webhook land in your delivery log.
Dev-only time travel
The dev server exposes clock controls (see the dev tools in the app) to fast-forward time: make invoices overdue, trigger reminder jobs, advance payout schedules, and age a session past expires_at. Time travel only exists in dev builds and never in production.
Last updated: October 14, 2026
Was this page helpful?