Buy DIR tokens with a custom USDC amount via x402 payment on Base network
What it does
This x402 endpoint allows agents and users to purchase DIR tokens (contract 0x78e2bABb02BAECeA3449fA3Bea7b190B2e49DB07) by spending a custom amount of USDC on the Base network. The endpoint accepts a POST request with an optional `amount` field specifying the USDC value to spend (e.g., '10', '0.5'). If no amount is provided, it defaults to 5 USDC. The maximum payment accepted per call is 5 USDC (maxAmountRequired: 5000000 in 6-decimal USDC units). Payment is routed to 0x93109d14F6665a9c9675290D3cD5A6c07bBAfdbd.
On success, the endpoint returns a JSON object containing the swap transaction hash, send transaction hash, the number of DIR tokens received, and the USDC amount paid. The DIR token was created via Clanker and is viewable on clanker.world. According to the landing page, the service has processed 5 total transactions with a 100% success rate, average latency of 2.69 seconds, and a trust score of 85%.
The endpoint is live and returns a valid x402 challenge (version 1, scheme: exact). Documentation beyond the landing page is not available — the /docs, /api, /pricing, and /README paths all return placeholder pages. The x402 outputSchema embedded in the challenge is the primary source of technical detail.
Capabilities
Use cases
- —Programmatically purchasing DIR tokens with USDC via an AI agent
- —Automating token swaps on Base network through x402 payment protocol
- —Integrating DIR token acquisition into agent workflows without manual wallet interaction
Fit
Best for
- —AI agents that need to acquire DIR tokens autonomously
- —Developers building x402-compatible payment flows on Base
- —Automated trading or portfolio strategies involving Clanker-launched tokens
Not for
- —Purchasing tokens on networks other than Base
- —Large USDC swaps exceeding 5 USDC per transaction
- —Users seeking detailed API documentation or OpenAPI specs
Quick start
curl -X POST https://dir.x420.dev/api/puff-custom \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <x402-payment-header>" \
-d '{"amount": "5"}'Example
Request
{
"amount": "5"
}Response
{
"message": "Successfully swapped USDC for DIR tokens",
"tokensReceived": "1250.00",
"usdcAmountPaid": "5.00",
"sendTransactionHash": "0x789abc...012def",
"swapTransactionHash": "0xabc123...def456"
}Endpoint
Quality
The x402 challenge is live and includes a useful outputSchema describing both input and output fields. However, there is no OpenAPI spec, no dedicated documentation (all doc paths return placeholder pages), and the response example had to be inferred from the schema. Transaction stats are minimal (5 total). The max amount of 5 USDC limits utility.
Warnings
- —No documentation available — /docs, /api, /pricing, /README all return placeholder pages
- —Response example is inferred from outputSchema, not from an actual observed response
- —Maximum payment per request is 5 USDC (5000000 in 6-decimal units), which limits transaction size
- —DIR is a Clanker-launched token — exercise caution regarding liquidity and token legitimacy
- —Very low transaction volume (5 total transactions reported)
Citations
- —The endpoint returns a valid x402 challenge with maxAmountRequired of 5000000 and scheme 'exact' on Base networkhttps://dir.x420.dev/api/puff-custom
- —DIR token contract address is 0x78e2bABb02BAECeA3449fA3Bea7b190B2e49DB07, created via Clankerhttps://dir.x420.dev
- —5 total transactions, 100% success rate, 2.69s average latency, 85% trust scorehttps://dir.x420.dev
- —Payment is made in USDC (asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) to address 0x93109d14F6665a9c9675290D3cD5A6c07bBAfdbdhttps://dir.x420.dev/api/puff-custom