API Playground

Test Element Pay API endpoints directly from your browser. Perfect for exploring the API, testing integrations, and understanding response formats.
Sandbox Environment: This playground uses the staging API. No real money will be transferred.API Key Required: You’ll need a valid API key to test endpoints.

Quick Setup

1

Get API Key

Contact elementpay.info@gmail.com for a staging API key
2

Set Base URL

Use https://staging.elementpay.net/api/v1 for testing
3

Test Endpoints

Start with the rates endpoint, then try creating orders

Interactive Testing

1. Get Exchange Rates

curl -X GET "https://staging.elementpay.net/api/v1/rates?currency=usdc" \
  -H "x-api-key: YOUR_STAGING_API_KEY"

2. Create Test Order

curl -X POST "https://staging.elementpay.net/api/v1/orders/create" \
  -H "x-api-key: YOUR_STAGING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount_fiat": 100,
    "currency": "KES",
    "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "order_type": 0,
    "wallet_address": "0x742d35Cc6634C0532925a3b8D4C0532925a3b8D4",
    "phone_number": "254700000001",
    "webhook_url": "https://webhook.site/your-unique-url"
  }'

3. Check Order Status

# Replace with actual transaction hash from create order response
curl -X GET "https://staging.elementpay.net/api/v1/orders/tx/0xYOUR_TX_HASH" \
  -H "x-api-key: YOUR_STAGING_API_KEY"

Testing Tools & Resources

Postman Collection

Import this collection to test all endpoints in Postman:
{
  "info": {
    "name": "Element Pay API",
    "description": "Complete Element Pay API collection for testing",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://staging.elementpay.net/api/v1",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "YOUR_API_KEY_HERE",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Get Exchange Rates",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/rates?currency=usdc",
          "host": ["{{baseUrl}}"],
          "path": ["rates"],
          "query": [
            {
              "key": "currency",
              "value": "usdc"
            }
          ]
        }
      }
    },
    {
      "name": "Create Onramp Order",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"amount_fiat\": 100,\n  \"currency\": \"KES\",\n  \"token\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  \"order_type\": 0,\n  \"wallet_address\": \"0x742d35Cc6634C0532925a3b8D4C0532925a3b8D4\",\n  \"phone_number\": \"254700000001\",\n  \"webhook_url\": \"https://webhook.site/your-unique-url\"\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/orders/create",
          "host": ["{{baseUrl}}"],
          "path": ["orders", "create"]
        }
      }
    },
    {
      "name": "Check Order Status",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/orders/tx/{{transactionHash}}",
          "host": ["{{baseUrl}}"],
          "path": ["orders", "tx", "{{transactionHash}}"]
        }
      }
    }
  ]
}

Test Data

Use these test values for sandbox testing:

Common Test Scenarios

Successful Onramp Flow

1

Get Current Rate

curl -X GET "https://staging.elementpay.net/api/v1/rates?currency=usdc" \
  -H "x-api-key: YOUR_API_KEY"
2

Create Onramp Order

curl -X POST "https://staging.elementpay.net/api/v1/orders/create" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount_fiat": 100,
    "currency": "KES",
    "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "order_type": 0,
    "wallet_address": "0x742d35Cc6634C0532925a3b8D4C0532925a3b8D4",
    "phone_number": "254700000001",
    "webhook_url": "https://webhook.site/your-unique-url"
  }'
3

Monitor Order Status

curl -X GET "https://staging.elementpay.net/api/v1/orders/tx/TX_HASH_FROM_STEP_2" \
  -H "x-api-key: YOUR_API_KEY"

Test Webhook Integration

1

Set up Webhook Receiver

Go to webhook.site and copy your unique URL
2

Create Order with Webhook

Include your webhook.site URL in the webhook_url field
3

Monitor Webhooks

Watch webhook.site for real-time status updates

Error Testing

Test error scenarios to ensure proper error handling:
curl -X GET "https://staging.elementpay.net/api/v1/rates" \
  -H "x-api-key: invalid_key"

# Expected: 401 Unauthorized

Next Steps