Skip to main content

Overview

Wallets represent settlement destinations and wallet preferences for a merchant. Wallet management is intended for server/dashboard contexts.

Authentication

Listing wallets supports either a merchant API key or a dashboard bearer token. Creating, updating, deleting, and exporting private keys require a dashboard bearer token (Authorization: Bearer <jwt>).
const pepay = new Pepay({ apiKey: process.env.PEPAY_API_KEY }); // list only
const dashboard = new Pepay({ bearerToken: process.env.PEPAY_DASHBOARD_JWT }); // manage wallets

Request

List wallets

const wallets = await pepay.wallets.list();

Create a wallet

const created = await pepay.wallets.create({
  network: 'base',
  wallet_address: '0x1111111111111111111111111111111111111111'
});

Update wallet status

await pepay.wallets.updateStatus('wallet_123', { is_active: true });

Delete wallet

await pepay.wallets.remove('wallet_123');

Export private key (pincode required)

const pk = await pepay.wallets.getPrivateKey('wallet_123', { pincode: '123456' });

Response

Example list response (truncated):
[
  {
    "network": "base",
    "wallets": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "address": "0x1111111111111111111111111111111111111111",
        "type": "custodial",
        "is_active": true,
        "created_at": "2024-01-01T00:00:00Z"
      }
    ]
  }
]

Errors

  • 401 missing/invalid dashboard bearer token
  • 400 invalid pincode or invalid wallet state transitions
  • 404 wallet not found

Examples

  • For operational safety, avoid exposing private key export flows in automated pipelines; require interactive operator approval.
Next: Settlement