Skip to main content

Quickstart for Buyers

This guide walks you through creating an x402 payment authorization using Paratro’s MPC signing service.

Prerequisites

  • A Paratro API key and secret
  • A funded USDC wallet on a supported chain
  • An active account with sufficient USDC balance

Create a Payment Authorization

1

Request a signature

Call POST /x402/sign to create an ERC-3009 authorization signature:
curl -X POST https://api.paratro.com/api/v1/x402/sign \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "from_address": "0xYourPayerAddress",
    "to_address": "0xRecipientAddress",
    "chain": "base-sepolia",
    "amount": "1.00",
    "scheme": "exact",
    "valid_before": 1774601102
  }'
Response:
{
  "tx_id": "7f9da3de-5899-43c6-8104-b96187df024f",
  "status": "PENDING",
  "eip712_hash": "0xabc123...",
  "nonce": "0xdef456...",
  "valid_after": 0,
  "valid_before": 1774601102
}
2

Poll for the signature

The MPC engine signs the authorization asynchronously. Poll until status becomes X402_SIGNED:
curl https://api.paratro.com/api/v1/x402/sign/7f9da3de-5899-43c6-8104-b96187df024f \
  -H "Authorization: Bearer $TOKEN"
Response when signed:
{
  "tx_id": "7f9da3de-5899-43c6-8104-b96187df024f",
  "status": "X402_SIGNED",
  "signature_v": 28,
  "signature_r": "0x...",
  "signature_s": "0x..."
}
3

Use the signature

Construct the x402 payment payload using the signature and send it to the seller’s resource endpoint or directly to a Facilitator.

Using the upto Scheme

For usage-based payments, set scheme to "upto". The amount becomes the maximum authorized:
curl -X POST https://api.paratro.com/api/v1/x402/sign \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "from_address": "0xYourPayerAddress",
    "to_address": "0xRecipientAddress",
    "chain": "base-sepolia",
    "amount": "5.00",
    "scheme": "upto",
    "valid_before": 1774601102
  }'
The seller can then settle any amount up to $5.00 USDC.
The upto scheme only works with Permit2 on EVM chains. ERC-3009 signatures bind to an exact value and cannot support partial settlement.