Guides / Get started
Test mode
Test mode is for building and testing your integration. It never uses a real provider sandbox. Weav simulates every channel and lets you decide how each payment ends.
How it works
- Send requests with a
wv_test_key. Everything else stays the same as live. - Responses have the same shape as live.
next_actionstill holds a QR string, a checkout URL or a payment code, depending on the channel. - Every test payment has a
test_checkout_url: the Weav test checkout page, where you pay, decline or let it expire. The QR string and the checkout URL lead there too. A counter payment’spayment_codeis a sample code that starts withTP; finish it at itstest_checkout_url. In live mode,test_checkout_urlis null. - A test payment expires 15 minutes after you create it (48 hours for a counter channel), even as a payment link.
- Your balance, balance history and signed webhooks all behave as they do in live mode.
The test checkout page
The page shows the payment’s amount, channel and your reference, with three buttons.
| Button | Result | Webhook sent |
|---|---|---|
| Pay | Status becomes COMPLETED and the amount is added to your test balance. |
PAYMENT_COMPLETED |
| Decline | Status becomes FAILED with failure code DECLINED. |
PAYMENT_FAILED |
| Let it expire | Status becomes FAILED with failure code EXPIRED. |
PAYMENT_FAILED |
Test saved cards
A test save link (POST /v1/payment-methods) opens Weav’s test save page. Choose a test card, or make the bank’s check fail. Then charge the saved card with payment_method_id on POST /v1/payments:
| Test card | When you charge it | Expires |
|---|---|---|
| Visa •••• 4242 | COMPLETED, at once |
December, 3 years ahead |
| Visa •••• 0002 | FAILED with failure code DECLINED |
December, 3 years ahead |
| Mastercard •••• 4444 | COMPLETED, at once |
This month, so expires_by finds it |
A card saved while paying (save_payment_method) is Visa •••• 4242. See Saved cards and Subscriptions.
Test withdrawals
Withdrawals are created in the dashboard. In test mode, the dashboard also lets you move a withdrawal to COMPLETED or FAILED, so you can test the WITHDRAWAL_COMPLETED and WITHDRAWAL_FAILED webhooks.
The test checkout page only works for test payments. Opening it for a live payment returns 404.