> ## Documentation Index
> Fetch the complete documentation index at: https://devs.elementpay.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

Get up and running with Element Pay in minutes!

## 1. Get Your API Key

Contact [elementpay.info@gmail.com](mailto:elementpay.info@gmail.com) / sign up on the ElementPay console to get an API key for staging or production.

### Try the API in Postman

[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/46832108-fa2374b3-c6ca-4524-89dc-2c8014343a09?action=collection%2Ffork\&source=rip_markdown\&collection-url=entityId%3D46832108-fa2374b3-c6ca-4524-89dc-2c8014343a09%26entityType%3Dcollection%26workspaceId%3Dca7325ab-0063-4631-883d-3e214e77ebab)

## 2. Make Your First Onramp Order

```http theme={null}
POST $BASE_URL/orders/create
x-api-key: YOUR_API_KEY_HERE
Content-Type: application/json

{
  "user_address": "0x40C2f2e0326bD1f647fbeB8732529e08B4DB309f",
  "token": "0x05D032ac25d322df992303dCa074EE7392C117b9",
  "order_type": 0,
  "fiat_payload": {
    "amount_fiat": 10,
    "cashout_type": "PHONE",
    "phone_number": "+254712531490",
    "currency": "KES",
    "narrative": "Top up for order #1007",
    "client_ref": "INV-1024",
    "metadata": {
      "device_id": "device_12345",
      "batch_id": "batch_2024_01"
    }
  }
}
```

* User receives an MPESA STK push.
* On payment, crypto is sent to `user_address`.
* Webhook receives order status.

## 3. Make Your First Offramp Order

1. **Approve the Token** (ERC-20):

```js theme={null}
const contract = new ethers.Contract(tokenAddress, erc20ABI, signer);
await contract.approve("0xELEMENT_CONTRACT", "6900000"); // e.g. 6.9 USDC (6 decimals)
```

2. **Create the Offramp Order:**

```http theme={null}
POST $BASE_URL/orders/create
x-api-key: YOUR_API_KEY_HERE
Content-Type: application/json

{
  "user_address": "0xabc123...",
  "token": "0x06efdbff2a14a7c8e15944d1f4a48f9f95f663a4",
  "order_type": 1,
  "fiat_payload": {
    "amount_fiat": 1000,
    "phone_number": "254712345678",
    "cashout_type": "PHONE"
  }
}
```

* Tokens are withdrawn from the wallet and paid out to the MPESA number.

## 4. Check Order Status

```bash theme={null}
curl "$BASE_URL/orders/tx/0xabc123..." -H "X-API-Key: $API_KEY"
```

## 5. Receive webhooks (recommended)

Configure Webhook URL + Secret on your API key. You’ll receive events like `order.settled` or `order.failed`.

**Next:** [Verify webhook signatures](guides/webhooks/verify-signatures)
