Skip to Content
Core ConceptsEnvironments

Environments

Two different things are called “environment” in VectaPay, and keeping them apart explains every rule on this page:

  • API key environment — a key is either test pk_test_… or live pk_live_…. Every request inherits it.
  • Provider environment — every payment and provider account is either SANDBOX or PRODUCTION. Test-key traffic only ever reaches SANDBOX records; live-key traffic only ever reaches PRODUCTION records.

A request with a test key cannot resolve a production payment method, and a live key cannot resolve a test one.

What each mode can reach

Test (pk_test_)Live (pk_live_)
M-Pesa prompt goes toOnly your verified test phone, from our test lineThe customer’s phone, through your connected Paybill/Till
Airtel promptNot available — Airtel has no test modeThe customer’s phone, through your Airtel merchant account
PaystackYour sk_test_ account, if you added oneYour live Paystack account
Recorded asSANDBOXPRODUCTION
Counts toward billingNeverYes
Payouts, refunds, retriesRefused (401)Allowed, subject to role and plan
Webhook environment field"test""live"

Payment methods you connect are almost always production: M-Pesa and Airtel credentials belong to a real business account. The one exception is Paystack, whose test mode is a separate key pair you own — VectaPay stores that account as SANDBOX and labels it Test keys everywhere it appears. See Testing for the full test workflow.

Why M-Pesa has no merchant test account

Safaricom’s sandbox can send a real prompt to a real handset, so a test payment can prove the whole path — your app, VectaPay, Daraja, the customer’s PIN, and your webhook. VectaPay runs that on a single platform-owned test line per business instead of asking you to create Daraja sandbox credentials.

See Testing for verification, limits, and what to do when a prompt fails.

Viewing test activity in the dashboard

Once Developer mode is on (Settings → Account), a Sandbox view toggle appears in the same settings panel. Turning it on switches Home, Payments, Analytics, and Money in over to SANDBOX data — the test payments your smoke tests produced and any Paystack test-key activity — and a banner stays visible the whole time so it’s never ambiguous which one you’re looking at. Production data is hidden while the toggle is on; switching it off brings production straight back.

The toggle only affects your own browser and it never changes what the API returns.

Sandbox view is a reading mode, not a mode switch. Nothing you do with it turns a production account into a test account, or the other way round.

Last updated on