Dial x402

Credits & Account

Buy prepaid credits and manage your account balance.

Credits & Account

Credits let you prepay for API access. Buy credits via x402, then use a Bearer token for subsequent calls — no per-request x402 payment needed.

1 credit = 1 API call (SMS, lookup, or breach search)

POST /api/v1/credits/top-up

Auth: x402 payment ($0.10 USDC) + Bearer token

Buy 100 credits. Requires both x402 payment and a Privy access token (to identify which account to credit).

Example Request (cURL)

curl -X POST https://x402.dial.wtf/api/v1/credits/top-up \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_PRIVY_ACCESS_TOKEN" \
  -H "Payment-Signature: BASE64_ENCODED_PAYMENT"

Example Request (JavaScript)

// paidFetch handles x402 automatically
const response = await paidFetch("https://x402.dial.wtf/api/v1/credits/top-up", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${privyAccessToken}`,
  },
});

Response

{
  "success": true,
  "creditsAdded": 100,
  "credits": 250
}

GET /api/v1/account

Auth: Bearer token (free)

Check your account balance and user info.

Example Request (cURL)

curl https://x402.dial.wtf/api/v1/account \
  -H "Authorization: Bearer YOUR_PRIVY_ACCESS_TOKEN"

Response

{
  "privyUserId": "did:privy:abc123",
  "credits": 250
}

Credit Economics

ItemValue
Cost per top-up$0.10 USDC
Credits per top-up100
Cost per credit$0.001
Credits per SMS1
Credits per lookup1
Credits per breach search1

Auto-Refunds

If a provider fails after credits are deducted, the credit is automatically refunded. You'll see a 502 response with the provider error, and your credit balance remains unchanged.

On this page