Environment Overview

Mavapay provides two distinct environments for your integration:

Staging Environment

The staging environment is designed for development and testing. Key characteristics:

  • Base URL: https://staging.api.mavapay.co/api/v1
  • Uses Bitcoin’s Signet network for Lightning Network transactions
  • All Lightning invoices are test invoices (prefixed with lntbs)
  • Generated coins are not spendable or transferable
  • Simulated bank transfers and mobile money transactions
  • No real funds involved
  • Test API keys required
  • Webhook notifications work identically to production

Production Environment

The production environment is for live transactions:

  • Base URL: https://api.mavapay.co/api/v1
  • Uses the main Bitcoin Lightning Network
  • Real funds are involved
  • Requires completed KYC verification
  • Live bank transfers and mobile money transactions
  • Production API keys required

Never use production API keys in staging or staging API keys in production. Always test thoroughly in staging before moving to production.

Getting Started with Staging

Prerequisites

  1. Create a Mavapay account
  2. Get your test API keys
  3. Complete basic account setup

Testing Features

Lightning Network Payments

  • All invoices are generated on Bitcoin’s Signet network
  • Test invoices are prefixed with lntbs
  • Example test invoice:
lntbs64740n1pney8wspp538tl6et3ez7lgfpqjx2n257zvg5d6kmk09ef6g927txgfuqq6x7q

Bank Transfers

Test different scenarios with:

  • Mock bank account numbers
  • Various response states (success/failure)
  • Different currencies (NGN, KES, ZAR)

Mobile Money

Test mobile money features using:

  • Test phone numbers
  • Simulated provider responses
  • All supported providers (M-PESA, etc.)

Error Scenarios

The staging environment allows testing various error cases:

  • Insufficient funds
  • Network timeouts
  • Rate limit exceeded
  • Invalid API key
  • Invalid request

Webhooks in Staging

Webhook notifications work identically to production:

  1. Configure your webhook URL in the API reference
  2. Receive notifications for all test transactions
  3. Test your webhook handling code

Use tools like webhook.site or ngrok for local webhook testing.

Moving to Production

Before going live:

  1. Complete all integration testing in staging
  2. Verify webhook handling
  3. Complete KYC verification
  4. Request production API keys
  5. Update API endpoints to production URLs
  6. Test with small amounts initially

Support

Need help during development?

The staging environment is reset periodically. Don’t rely on staging data persistence for long-term testing.