Skip to navigation

Accepting payment

How an AI agent completes a payment before your API delivers the product, service or action it requested.
View as Markdown

How agent payments work

When an AI agent calls a paid operation, Mitu handles the payment before your API processes the request. The agent receives a payment requirement, completes the payment using a supported method and, once payment is confirmed, Mitu sends the paid request to your API.

Sequence diagram with three participants: AI Agent, Mitu and Your API. The agent calls a paid tool. Mitu replies with 402 Payment Required and the accepted methods. The agent completes the payment. Mitu processes and confirms it, then sends the request with the payment confirmation to Your API. Your API verifies Mitu, processes the request, and returns the result through Mitu to the agent.
Mitu completes the payment before your API is asked to do any work.

Once payment is confirmed, your API receives the request with payment context and a verification signature. Verify that the request came through Mitu before delivering the product or service, then process it using your existing business logic and return your normal response.

See Request verification for verifying incoming requests and Agent payments for the complete payment flow.

An Agent Wallet is not required

An AI agent does not need a Mitu Agent Wallet to pay you. Agent Wallets are a separate capability for businesses that want to give their own customers wallets their AI agents can spend from. An Agent Wallet is one possible source of funds for an agent payment.

Payment methods

Mitu supports agent payments through x402 and MPP. You choose which supported methods are available for the paid operation, and the agent uses a method it can complete.

Your API does not need separate integrations for each payment protocol. Mitu handles the payment flow and sends your API the paid request once payment has been confirmed.

See Agent payments for supported payment methods and how each works.

What gets charged

Pricing is configured on the operation rather than determined by the payer. An operation can be free or use a pricing model such as fixed, dynamic, tiered or session pricing.

For fixed pricing, the amount is already known when the agent calls the operation. With dynamic pricing, your API determines the amount from the request before the agent pays. Other pricing models support different usage patterns.

See Pricing for the available pricing models and how amounts are determined.

Paying with an Agent Wallet

If the agent is acting for a customer who has a funded Agent Wallet, that wallet can be used to complete supported payments on the customer’s behalf.

When payment is required, the agent receives a payment URL and passes it to Mitu’s pay tool. Mitu uses an Agent Wallet available to the connected customer, checks the wallet balance and applicable controls, and completes the payment when it is permitted.

The customer remains the owner of the funds. Their agent cannot withdraw funds, change wallet controls or take ownership of the wallet simply because it can use the wallet for payments.

See Wallet tools for the current pay tool schema and Build agents that can pay for the complete purchasing flow.

After payment

Payment confirmation does not replace fulfilment. Once payment is complete, your API still needs to verify the request and deliver the product, service or action the agent paid for.

If your API cannot complete the operation after payment, treat payment and fulfilment as separate states. Do not ask the agent to make the same payment again simply because delivery failed.

See Agent payments for handling paid requests, retries and payments that complete without successful delivery.

Settlement

Payments you receive from AI agents are added to your Mitu balance. The payment method used by the agent does not change how your business settles the resulting funds.

From your balance, you can settle funds to a supported bank account or withdraw them to an onchain address.

See Settlement.