Skip to main content

Overview

These endpoints control network access and environment selection for merchant integrations:
  • Check or activate mainnet access (if required for your account).
  • Set your default environment (devnet or mainnet) for SDK/API calls that support it.

Authentication

Merchant auth:
  • x-api-key: sk_live_... (server-to-server), or
  • Authorization: Bearer <jwt> (dashboard context)

Request

Endpoints:
  • POST /api/v1/user/mainnet-access/activate
  • GET /api/v1/user/mainnet-access/status
  • PUT /api/v1/user/environment
Example (check status):
BASE_URL=${PEPAY_API_URL}

curl "$BASE_URL/api/v1/user/mainnet-access/status" \
  -H "x-api-key: sk_live_..."

Response

Example response:
{
  "has_mainnet_access": false,
  "current_environment": "devnet"
}

Errors

  • 401/403 missing/invalid credentials
  • 400 invalid environment value

Examples

Example (set environment):
BASE_URL=${PEPAY_API_URL}

curl -X PUT "$BASE_URL/api/v1/user/environment" \
  -H "x-api-key: sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"environment":"mainnet"}'
Next: Settlement