Axiomatic

Payments

Execute on-chain payments from your Axiomatic smart wallet — pay bills, send transfers, and track payment intents.

Overview

The Payments module lets you execute on-chain token transfers directly from your entity's Axiomatic smart wallet. Payments are submitted as ERC-4337 UserOperations, with gas fees sponsored by the Axiomatic paymaster — no ETH balance required.

Smart Wallet Architecture

Each entity in Axiomatic has a smart contract wallet deployed on-chain using the Diamond pattern (EIP-2535). The wallet is managed server-side — the platform constructs UserOperations, a paymaster sponsors gas, and a bundler submits the transaction to the network.

sequenceDiagram
    participant User
    participant PayPage as /pay Page
    participant API as /api/pay/execute
    participant Bundler
    participant Paymaster
    participant Wallet as Entity Smart Wallet
    participant Token as ERC-20 Contract

    User->>PayPage: Confirm payment details
    PayPage->>API: POST (entityId, token, amount, recipient)
    API->>API: Build UserOp calldata
    API->>Bundler: eth_sendUserOperation
    Bundler->>Paymaster: Validate + sponsor gas
    Bundler->>Wallet: Execute UserOp
    Wallet->>Token: transfer(recipient, amount)
    API-->>PayPage: userOpHash
    PayPage-->>User: Transaction submitted

Payment Types

The platform supports several payment intent types:

TypeDescription
AP_PAYMENTPay a vendor bill
AR_COLLECTIONCollect payment on an invoice
DISTRIBUTIONDistribute to investors or stakeholders
CAPITAL_CALLRequest and collect capital
TRANSFERFreeform token transfer

Payment Intent Lifecycle

Payment intents track the full lifecycle of an on-chain payment:

stateDiagram-v2
    [*] --> PENDING: Intent created
    PENDING --> SUBMITTED: UserOp sent to bundler
    SUBMITTED --> CONFIRMED: Transaction mined
    SUBMITTED --> FAILED: Transaction reverted
    PENDING --> EXPIRED: TTL exceeded (24h)

Using the Pay Page

Entry Points

The /pay page can be accessed in three ways:

URLBehavior
/payOpens the payment type selector
/pay?intent=<id>Loads a payment intent and skips to confirmation
/pay?bill=<id>Pre-selects a bill and skips to confirmation

Three-Step Flow

Step 1 — Select payment type:

  • Pay a bill — choose from open bills with payCrypto enabled
  • Upload a bill — upload a received invoice and enter vendor details
  • Send a transfer — enter recipient address, amount, token, and chain

Step 2 — Confirm details:

Review recipient, amount, token, chain, and gas sponsorship before submitting.

Step 3 — Execute:

The payment is submitted to the bundler. You receive a UserOp hash for tracking.

From the AP Page

When you click Pay on a bill in the Payables page, it creates a payment intent and navigates to /pay?intent=<id>. The Pay page loads the intent details and presents the confirmation step.

Supported Tokens

ChainTokenAddress
BaseUSDC0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
BaseETHNative
Base SepoliaUSDC0x036CbD53842c5426634e7929541eC2318f3dCF7e
Base SepoliaETHNative

API Reference

Execute Payment

POST /api/pay/execute

Execute a token transfer from the entity's smart wallet.

Request body:

{
  "entityId": "uuid",
  "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "amount": "1000000",
  "recipient": "0x...",
  "chain": "base",
  "paymentIntentId": "uuid (optional)"
}
  • amount is in the token's smallest unit (e.g. 1 USDC = 1000000 with 6 decimals)
  • token set to 0x0000000000000000000000000000000000000000 for native ETH
  • paymentIntentId links the payment to an existing intent and updates its status

Response:

{
  "success": true,
  "userOpHash": "0x...",
  "chain": "base",
  "from": "0x...",
  "to": "0x...",
  "token": "0x...",
  "amount": "1000000"
}

Error codes:

StatusMeaning
400Missing fields, invalid intent status, or bundler rejection
401Unauthorized
404Payment intent not found
409Intent already submitted/confirmed
502Bundler submission failed
503Wallet or bundler not configured for chain

Payment Intents

GET /api/payment-intents?entityId=<uuid>
POST /api/payment-intents
PATCH /api/payment-intents

See the AR & AP documentation for the full payment intent API.

On this page