Switch between test and live
The Test / Live switch is at the bottom of the sidebar. It sets which data every page of the dashboard shows. While you are in test mode, a strip across the top of the dashboard says Test mode · No real payments are processed. When you switch to test, the dashboard confirms with Switched to Test mode: “You are now viewing test data. Payments use test funds.” If your business is not verified yet, Live takes you to the go-live page instead of an empty live view. See Go live.Pay a test checkout
Open any test product’s checkout link. A banner at the top of the checkout shows the test card: Test payment · 4242 4242 4242 4242 · any expiry · any CVC Click the number to copy it, then paste it into the card field on the checkout. Use any future expiry date and any three-digit CVC. The payment succeeds, and the checkout shows its success page.Test a failed payment
Use these cards on a test checkout to see what a buyer sees when a payment fails. Each one takes any future expiry date and any CVC. Every row below was run on the AgentaOS checkout.Test invoices, receipts and emails
AgentaOS issues invoices and receipts for test payments, and marks each one so that nobody mistakes it for a real document:- The checkout success page says “Test payment: no money was paid. This invoice and receipt are not valid.”
- A test invoice PDF has a TEST badge next to its title and the line “TEST MODE: not a tax invoice. No money was paid.”
- A test receipt PDF has the same badge and the line “TEST MODE: not a valid receipt. No money was paid.”
- Emails about a test payment have
[TEST]at the start of the subject line.
Money, payouts and verification
Test cards are not charged, so test payments bring no real money into your balance and nothing is paid out to your bank account. You do not need to verify your business to sell in test mode; verification applies to live mode only.For developers
Test keys and live keys
An API key belongs to one mode. The key’s prefix tells you which one:
To create a test key, switch to Test, open Developers → API keys in the sidebar, and click Generate Test Key. The same button reads Generate Live Key in live mode. There is one base URL for both modes; the key decides the mode, so you do not set a mode anywhere else. Keep keys in environment variables and never commit them.
Webhooks in test mode
Test payments send webhooks, the same as live payments. Test events and live events go to the same webhook endpoint. Each event has alivemode field: false for a test event and true for a live event. Check livemode in your handler so that a test event never triggers a real fulfillment.
To receive test events on your own machine, expose your local server with a tunnel and register the tunnel URL as your webhook endpoint. See Webhooks.
Embed a test product on localhost
A test product’s embedded checkout loads on any page served fromlocalhost or 127.0.0.1, on any port and over http or https. You do not need to add these to your approved sites. A live product loads only on the approved sites you add.
Go live
When your tests pass, verify your business and replace yoursk_test_ key with an sk_live_ key. Add a bank account before your first payout. The Go live guide lists each step.
Go live
Verify your business and take real payments.
Webhooks
Receive and verify events.