PayAI SDK
The layer that lets Ask PayAI run specific on-chain actions — swapping MON and USDC inside a plan, wrapping and unwrapping MON, and splitting one payment between several people — with every transaction checked before your wallet sees it.
Last updated 13 October 2026
What it is
The PayAI SDK is the protocol-action layer inside PayAI. Each supported protocol declares a small set of actions. An action's own transaction can only go to the contract it was reviewed for, and any token approval it needs is checked separately. Ask PayAI uses it when you ask for one of the actions below.
Available actions
swap 10 MON to USDC and send it to 0x…wrap 1 MONunwrap 1 WMONsplit 3 MON between 0x… and 0x…| Action | What it does | Try in Ask PayAI |
|---|---|---|
| Swap | Swap MON ⇄ USDC through PayAI's trade executor, as a step of a plan. | swap 10 MON to USDC and send it to 0x… |
| Wrap MON | Wrap native MON into WMON, 1:1. | wrap 1 MON |
| Unwrap WMON | Unwrap WMON back into native MON, 1:1. | unwrap 1 WMON |
| Split payment | Send MON or a token to 2–9 recipients in one transaction. | split 3 MON between 0x… and 0x… |
Swap is the trade step inside a multi-step plan, so a swap can feed a send in the same request. It covers MON → USDC and USDC → MON, exact input, and only through PayAI's trade executor: a route the executor can't take is refused here, never silently sent elsewhere. Trading any other Monad token — by symbol or contract address, on Uniswap, Kuru or Nad.Fun — uses PayAI's trading engine directly; see Trading.
These actions are offered on Monad mainnet. Split payment is only available where the Split Settlement contract is deployed, which is Monad mainnet. An action that isn't available on the network a deployment runs on is never offered there.
In Ask PayAI, a split is one token — MON or USDC — and 2–9 recipients. A recipient can be a full 0x address, a .nad name, or a payee name your PayAI deployment has configured; anything else is refused and you're asked who you meant. There are three ways to write one:
- Even:
split 3 MON between 0x… and 0x…. If the total doesn't divide exactly in the token's smallest unit, the last recipient receives the few extra units, so the amounts add up to exactly the total. - Your own amounts:
split 100 USDC: 60 to 0x… and 40 to name.nad. If you state a total, the amounts must add up to it. - The rest:
split 100 USDC: 20 to 0x… and the rest to name.nad. The total has to be in the same message.
A split message that can't be read exactly — a recipient that can't be resolved, amounts that don't add up, the same wallet twice — gets a question back. It is never guessed, and never turned into a different payment.
SDK actions and plans
Ask PayAI plans run several actions from one request on one approval. How each SDK action fits:
swap 10 MON to USDC and send it to name.nadwrap 1 MONsplit 30 USDC between alice.nad, name.nad and carol.nad| Action | In a multi-action plan? | Example |
|---|---|---|
| Swap | Yes — a step whose output the next payment can use | swap 10 MON to USDC and send it to name.nad |
| Wrap / unwrap | No — its own message | wrap 1 MON |
| Split payment | No — its own message, but it already pays 2–9 people in one transaction | split 30 USDC between alice.nad, name.nad and carol.nad |
To pay several people as separate steps of a plan instead of one split transaction, write them out — send 10 USDC each to alice.nad, name.nad and carol.nad. A split is one transaction with one fee leg; a plan is one transaction per payment.
How an action runs
- Recognised by fixed rules, not guessed. Protocol actions are matched by exact patterns in your message. The AI model is never allowed to choose a protocol, an action, a contract, or a split's recipients.
- Preview. You see what will happen — the amount, and the recipients for a split, including the address each .nad name resolved to — before anything is built. A split also shows its 0.25% platform fee and the total you pay, and is screened like a normal payment (sanctions and risk). Nothing is signed or sent.
- Build and check. When you confirm, PayAI builds the transaction and checks it: that it is exactly the action, version, inputs and fee terms you previewed, that it is on the right network, that the preview is less than 90 seconds old, the contract the transaction calls, and any token approval. One failed check stops the whole action. Each preview can be built once.
- You sign. Your own wallet signs and sends. For a token that needs an approval first, you sign that approval as a separate step.
- Confirmed on-chain. The result you see is read from the confirmed transaction on Monad, not from the preview. A split is added to your history, one entry per recipient, from what the contract actually paid.
Safety rules
- Allowlisted contracts only. The action itself may only call the contract listed for it below. A token approval goes to the token itself, and is checked so the allowance can only go to the listed contract. A transaction to anything else is refused before it reaches your wallet.
- Exact approvals. When a token approval is needed, it is for the exact amount of this action, to the one contract that will use it. Never unlimited.
- Right network. An action only runs on the network it was built for. A request made for one network is refused on another.
- No silent upgrades. The action version you previewed is the one that runs. If it changed in between, the action is refused, not swapped.
- Your wallet signs. These actions are signed by your own wallet. PayAI does not hold the key for them. See Security for the paths that are custodial.
Contracts involved
| Action | Contract | Operated by |
|---|---|---|
| Swap | PayAITradeExecutor (see Contracts) | PayAI |
| Wrap / unwrap | 0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A | WMON (wrapped MON) token |
| Split payment | 0xaC98a844E0F9688EA9758Db05c134b8B4BCeAf6F | PayAI (SplitSettlement) |
The full list of PayAI's own contracts is on Contracts.
Fees
A split payment carries PayAI's standard 0.25% platform fee, added on top of the recipients' total so each recipient receives exactly their amount. It is paid to PayAI's treasury as one extra leg of the same transaction, and shown before you sign. A swap pays the trade executor's fee (0.25%), also added on top, so the amount you set is swapped in full. Wrap and unwrap carry no platform fee. You pay Monad gas for each transaction you sign, including any approval. See Fees.
Limits
- A swap step is MON ⇄ USDC only, exact input, at the trading engine's 0.5% slippage. To set your own slippage or trade another token, trade on its own — see Trading.
- A split takes 2–9 recipients per transaction, each one only once. The contract's tenth slot carries the platform fee.
- From Ask PayAI, a split is in MON or USDC, and runs once — scheduled splits aren't supported.
- There is no public HTTP API or package for these actions.
- Other protocols are added only through a reviewed partner integration — see below. None is live yet.
Integrate your protocol
DeFi protocols on Monad can integrate with PayAI so their users can run them from a single sentence in Ask PayAI. Integration is a partnership: you describe your protocol's actions, PayAI reviews and implements the adapter, and nothing is offered to users until it has been tested and shipped. No DeFi protocol is live yet.
What your integration declares
| Part | What it is |
|---|---|
| Protocol | An id, a name, the chain (Monad mainnet, 143) and every contract address it may ever call. |
| Actions | Each action — supply, withdraw, stake, and so on — with an id and an exact version. A version change is a new action, never a silent upgrade. |
| Inputs | A typed schema for each action: amount, token, address, number, text or a list. Nothing untyped. |
| Quote | What the user sees before anything is built: a one-line summary and the details that matter (rate, what they receive). |
| Build | The unsigned transactions for the action, plus any token approval it needs (token, spender, exact amount). |
| Result | How to read the outcome from the confirmed receipt's events, so the user sees what actually happened, not the quote. |
What PayAI enforces
- Allowlisted contracts. A built transaction that calls anything outside the declared addresses is refused in full.
- Exact approvals. An approval is for this action's exact amount, to a declared contract. Never unlimited.
- Pinned chain and version. An action runs only on its chain, and only at the version the user previewed.
- Fixed matching. Requests are matched to an action by fixed rules. The AI model never chooses a protocol, a contract or an amount.
- The user signs. Every transaction is signed by the user's own wallet, after they review it.
- Verified results. What the user is told comes from the confirmed transaction on Monad.
How to apply
- Email support@usepayai.xyz with the subject Protocol integration.
- Include your contracts (verified on the Monad explorer), the actions you want users to run, and any audits.
- PayAI reviews the contracts and actions, builds the adapter and tests it against Monad.
- Once it ships, your actions appear in Ask PayAI with the exact wording users can say.