Skip to main content
POST
/
api
/
v1
/
x402
/
sign
Create x402 sign
curl --request POST \
  --url https://api.paratro.com/api/v1/x402/sign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from_address": "0xbFa643c784f1DAB3169a856107c992Fb15f29912",
  "to_address": "0x379d92924fe31AAC58D039FfE60215fd3a2B773B",
  "chain": "base",
  "amount": "1.5",
  "valid_after": 0,
  "valid_before": 1774601102
}
'
{
  "tx_id": "<string>",
  "status": "PENDING",
  "eip712_hash": "<string>",
  "nonce": "<string>",
  "valid_after": 123,
  "valid_before": 123
}

Create x402 Sign

Request the platform to generate an ERC-3009 transferWithAuthorization signature using MPC threshold signing. The system computes the EIP-712 typed data hash, locks the USDC balance, and dispatches the signing task to the TSS engine. The signing result is returned directly in the response.
from_address
string
required
Payer address (must belong to the authenticated client, max 128 characters).
to_address
string
required
Recipient address (max 128 characters).
chain
string
required
Enabled x402 signing chain configured in the gateway, for example base, base-sepolia, ethereum, or polygon.
amount
string
required
Amount in human-readable units (e.g., "1.5" for 1.5 USDC). For upto scheme, this is the maximum authorized amount.
scheme
string
Payment scheme: "exact" (default) or "upto". With exact, the payer authorizes a fixed amount. With upto, the payer authorizes a maximum amount and the actual settlement can be any amount up to this limit.
valid_after
integer
Unix timestamp (seconds) before which the authorization is not yet valid. Defaults to 0 (immediately effective). Must be less than valid_before.
valid_before
integer
required
Unix timestamp (seconds) after which the authorization expires. Must be greater than 0.

Response

{
  "tx_id": "7f9da3de-5899-43c6-8104-b96187df024f",
  "status": "PENDING",
  "eip712_hash": "0xabc123...",
  "nonce": "0xdef456...",
  "valid_after": 0,
  "valid_before": 1774601102
}
FieldTypeDescription
tx_idstringUnique transaction ID for polling
statusstringInitial status: PENDING
eip712_hashstringEIP-712 typed data hash
noncestringRandom nonce for the authorization (hex)
valid_afterintegerUnix timestamp echoed from the request
valid_beforeintegerExpiration Unix timestamp

Errors

HTTPCodeCondition
400invalid_parameterInvalid request body or missing required fields
400insufficient_balanceInsufficient USDC balance
400invalid_addressAddress format invalid
400wallet_not_activeWallet is not in active state
404not_foundNo matching asset found for the address/chain
500internal_errorInternal processing failure

Authorizations

Authorization
string
header
required

JWT access token obtained from the /api/v1/auth/token endpoint.

Body

application/json
from_address
string
required
Maximum string length: 128
to_address
string
required
Maximum string length: 128
chain
string
required
amount
string
required
valid_before
integer<int64>
required
valid_after
integer<int64>
default:0

Response

Signing request accepted.

tx_id
string
required
status
string
required
Example:

"PENDING"

eip712_hash
string
required
nonce
string
required
valid_after
integer<int64>
required
valid_before
integer<int64>
required