# Delx Commerce — Token Amount to Raw Converter

> Delx Commerce — Token Amount to Raw Converter is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Converts a human-readable token amount and decimal precision into the raw integer representation used in on-chain transactions.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/token-amount-to-raw?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-token-amount-to-raw-converter-8450f1db
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Tox9QIs9p5bgUoCDbLdSg

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability delx-commerce-token-amount-to-raw-converter-8450f1db -d '<json body>'
```

Example prompt: Convert 1.25 USDC to its raw integer amount using 6 decimal places so I can use it in a blockchain transaction.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "amount": {
   "type": "number",
   "description": "Input field: amount."
  },
  "decimals": {
   "type": "integer",
   "description": "Input field: decimals."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "raw": "1250000",
  "amount": 1.25,
  "schema": "delx/util-token-amount-to-raw/v1",
  "decimals": 6
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-token-amount-to-raw-converter-8450f1db/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
