POST https://staging.elementpay.net/api/v1/orders/create x-api-key: YOUR_API_KEY_HERE Content-Type: application/json { "user_address": "0x40C2f2e0326bD1f647fbeB8732529e08B4DB309f", "token": "0x05D032ac25d322df992303dCa074EE7392C117b9", "order_type": 0, "webhook_url": "https://yourdomain.com/webhook", "fiat_payload": { "amount_fiat": 10, "cashout_type": "PHONE", "phone_number": "254712531490" } }
user_address
const contract = new ethers.Contract(tokenAddress, erc20ABI, signer); await contract.approve("0xELEMENT_CONTRACT", "6900000"); // e.g. 6.9 USDC (6 decimals)
POST https://staging.elementpay.net/api/v1/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" } }
GET https://staging.elementpay.net/api/v1/orders/tx/{tx_hash} x-api-key: YOUR_API_KEY_HERE