{"uid":"cap_Tox9QIs9p5bgUoCDbLdSg","slug":"delx-commerce-token-amount-to-raw-converter-8450f1db","name":"Delx Commerce — Token Amount to Raw Converter","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/token-amount-to-raw?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"amount":{"type":"number","description":"Input field: amount."},"decimals":{"type":"integer","description":"Input field: decimals."}}},"responseSchema":{"type":"json","example":{"raw":"1250000","amount":1.25,"schema":"delx/util-token-amount-to-raw/v1","decimals":6}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_k2iVk8hI8mCKw4tdWzWqn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a human-readable token amount and decimal precision into the raw integer representation used in on-chain transactions.","exampleAgentPrompt":"Convert 1.25 USDC to its raw integer amount using 6 decimal places so I can use it in a blockchain transaction.","exampleUseCases":[{"title":"Prepare USDC payment amount on-chain","prompt":"I need to send 2.50 USDC on-chain — can you convert that to the raw integer value using 6 decimals so I can pass it to the smart contract?"},{"title":"Normalize token amount for DeFi protocol","prompt":"I want to supply 100.5 tokens with 18 decimal places to a DeFi protocol — give me the raw integer representation I need for the contract call."},{"title":"Validate raw amount before submitting transaction","prompt":"Before I submit this transaction, convert 0.001 USDC with 6 decimals to its raw form so I can double-check it matches what the contract expects."}],"resultDescription":"Returns a JSON object containing the raw integer string (e.g. '1250000'), the original decimal amount, the number of decimals used, and a schema identifier ('delx/util-token-amount-to-raw/v1') confirming the conversion format.","failureModes":["Missing 'amount' or 'decimals' fields returns a 400 validation error","Non-integer decimals value may be rejected","Extremely large amounts may cause overflow or precision loss","Invalid input types (e.g. string instead of number) return schema validation errors","Payment failure via x402 protocol prevents the call from completing"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to convert human-readable token amounts (like 1.25 USDC) into raw on-chain integer representations before submitting blockchain transactions, especially within a pay-per-result, no-signup workflow using USDC on Base or Solana via the x402 protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:56.951Z","isFirstParty":false,"canonicalSlug":"delx-commerce-token-amount-to-raw-converter-8450f1db"}