Public documentation

BepPay Partner API Documentation

Use API keys to manage balances, issue keys, purchase eSIMs and virtual numbers, and track order history. Public catalog endpoints are available for eSIM plans and virtual number countries and tiers, while purchase and account routes require a valid `pk_live_...` key. Production partner API requests should target `https://esim.beppay.com`. Wallet addresses are intentionally hidden and balance top-ups are handled manually.

Authentication

External partners must authenticate API requests with `Authorization: Bearer pk_live_...` or `X-API-Key`. Session cookie routes are for the dashboard only and are not part of the public integration API.

Catalog endpoints are public

`/api/partner/esim/plans`, `/api/partner/virtual-numbers/countries`, and `/api/partner/virtual-numbers/tiers` are accessible without authentication.

Top-ups are manual

Deposit addresses are disabled. Internal balance is topped up manually.

API Keys

Manage your API keys programmatically.

GET/api/partner/keys

List all API keys.

Request
curl https://esim.beppay.com/api/partner/keys \
  -H "Authorization: Bearer pk_live_your_key_here"
Response
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "Production Key",
      "key_prefix": "pk_live_abc",
      "is_active": true,
      "last_used_at": "2026-03-30T12:00:00Z",
      "created_at": "2026-03-01T00:00:00Z"
    }
  ]
}
POST/api/partner/keys

Create a new API key.

Request
curl -X POST https://esim.beppay.com/api/partner/keys \
  -H "Authorization: Bearer pk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name":"New Key"}'
Response
{
  "success": true,
  "data": {
    "api_key": "pk_live_abc123...",
    "key_prefix": "pk_live_abc",
    "created_at": "2026-03-30T12:00:00Z"
  }
}
DELETE/api/partner/keys?id=1

Revoke an API key.

Request
curl -X DELETE "https://esim.beppay.com/api/partner/keys?id=1" \
  -H "Authorization: Bearer pk_live_your_key_here"
Response
{
  "success": true,
  "message": "Key revoked successfully"
}

Balance

Check your wallet balance. Deposit addresses are not exposed.

GET/api/partner/balance

Get total balance across all partner wallets.

Request
curl https://esim.beppay.com/api/partner/balance \
  -H "Authorization: Bearer pk_live_your_key_here"
Response
{
  "success": true,
  "data": {
    "total_balance_usd": "500.00",
    "wallets": [
      {
        "id": 1,
        "balance": "500.00",
        "currency": "USDT_TRC20"
      }
    ]
  }
}

eSIM Plans

Browse available eSIM plans. This endpoint is public.

GET/api/partner/esim/plans

List all available eSIM plans.

Request
curl https://esim.beppay.com/api/partner/esim/plans
Response
{
  "success": true,
  "data": [
    {
      "id": "867924fdaf913e7fe11434972587449d",
      "plan_id": "867924fdaf913e7fe11434972587449d",
      "name": "USA 5GB 30 Days",
      "days": "30",
      "price": "25.00",
      "data": "5GB",
      "countries_included": "United States",
      "countryIso2": "US",
      "plan_type": "country",
      "is_visible": true
    }
  ],
  "total": 1520
}

eSIM Purchase

Purchase eSIMs programmatically.

POST/api/partner/esim/purchase

Purchase an eSIM using your internal partner balance.

Request
curl -X POST https://esim.beppay.com/api/partner/esim/purchase \
  -H "Authorization: Bearer pk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "plan_id": "867924fdaf913e7fe11434972587449d",
    "email": "customer@example.com"
  }'
Response
{
  "success": true,
  "data": {
    "esim": {
      "iccid": "8944501234567890123",
      "qr_code": "data:image/png;base64,...",
      "activation_code": "LPA:1$8944501234567890123"
    },
    "plan": {
      "id": "867924fdaf913e7fe11434972587449d",
      "name": "USA 5GB 30 Days",
      "price_usd": 25
    }
  },
  "meta": {
    "amount_charged": "25.00",
    "currency": "USDT_TRC20",
    "remaining_balance": "475.00"
  }
}

Virtual Numbers Catalog

Browse available virtual number countries and pricing tiers. These endpoints are public.

GET/api/partner/virtual-numbers/countries

List available countries for virtual number purchase.

Request
curl https://esim.beppay.com/api/partner/virtual-numbers/countries
Response
{
  "success": true,
  "data": [
    {
      "code": "US",
      "name": "United States"
    },
    {
      "code": "GB",
      "name": "United Kingdom"
    }
  ],
  "total": 2
}
GET/api/partner/virtual-numbers/tiers

List available virtual number pricing tiers.

Request
curl https://esim.beppay.com/api/partner/virtual-numbers/tiers
Response
{
  "success": true,
  "data": [
    {
      "id": "7d",
      "name": "7 Days",
      "days": 7,
      "price_usd": 10
    },
    {
      "id": "1y",
      "name": "1 Year",
      "days": 365,
      "price_usd": 40
    }
  ],
  "total": 2
}

Virtual Numbers Purchase

Purchase virtual numbers programmatically.

POST/api/partner/virtual-numbers/purchase

Purchase a virtual number using your internal partner balance.

Request
curl -X POST https://esim.beppay.com/api/partner/virtual-numbers/purchase   -H "Authorization: Bearer pk_live_your_key_here"   -H "Content-Type: application/json"   -d '{
    "country_code": "US",
    "country_name": "United States",
    "tier_id": "7d"
  }'
Response
{
  "success": true,
  "data": {
    "phone_number": "+12025550123",
    "country_code": "US",
    "country_name": "United States",
    "tier": {
      "id": "7d",
      "name": "7 Days",
      "days": 7,
      "price_usd": 10
    },
    "expires_at": "2026-04-15T12:00:00.000Z"
  },
  "meta": {
    "amount_charged": "10.00",
    "currency": "USDT_TRC20",
    "remaining_balance": "490.00"
  }
}

Virtual Number Orders

View virtual number order history.

GET/api/partner/virtual-numbers/orders

Get virtual number order history.

Request
curl https://esim.beppay.com/api/partner/virtual-numbers/orders   -H "Authorization: Bearer pk_live_your_key_here"
Response
{
  "success": true,
  "data": [
    {
      "id": 1,
      "phone_number": "+12025550123",
      "country_code": "US",
      "country_name": "United States",
      "tier_id": "7d",
      "tier_name": "7 Days",
      "duration_days": 7,
      "cost_usd": "10.00",
      "currency": "USDT_TRC20",
      "status": "completed",
      "autorenew": false,
      "expires_at": "2026-04-15T12:00:00.000Z",
      "created_at": "2026-04-08T12:00:00.000Z"
    }
  ],
  "total": 1
}

Orders

View order history.

GET/api/partner/esim/orders

Get eSIM order history.

Request
curl https://esim.beppay.com/api/partner/esim/orders \
  -H "Authorization: Bearer pk_live_your_key_here"
Response
{
  "success": true,
  "data": [
    {
      "id": 1,
      "iccid": "8944501234567890123",
      "plan_id": "867924fdaf913e7fe11434972587449d",
      "plan_name": "USA 5GB 30 Days",
      "cost_usd": "25.00",
      "currency": "USDT_TRC20",
      "email": "customer@example.com",
      "created_at": "2026-03-30T12:00:00Z",
      "status": "completed"
    }
  ],
  "total": 1
}