> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mitu.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mitu.ai/_mcp/server.

# Accept payments from agents

Accept payments from AI agents without implementing payment protocols yourself. Connect the API that already powers your product, choose the operations agents should pay for and configure how those operations are priced.

When an agent uses a paid operation, Mitu handles the payment flow between the agent and your API. Once payment is confirmed, your backend receives the request, verifies that it came through Mitu and delivers the product, service or result as it normally would.

> **Mitu handles the agent payment flow**
>
> You do not need to build separate x402 or MPP integrations into your API. Configure the paid operation and the payment methods you want to support, and Mitu handles the payment flow with the agent.

## Before you begin

You need a Mitu account, a server-side API key, an API that Mitu can reach and at least one operation you want AI agents to pay for. You also need the signing secret provided when you connect your API so your backend can verify requests sent through Mitu.

If your API is not connected yet, start with [Connect to AI agents](/guides/integration-guides/connect-to-ai-agents).

#### Connect your API

Start with the API that already powers your product. In the dashboard, provide the base URL Mitu should use when calling your API.

```text
https://api.example.com
```

You do not need to create separate endpoints for paid agent requests. Your existing API can continue handling the underlying product, order, booking, report or other service you already provide.

When you connect the API, Mitu provides a signing secret that your backend uses to verify requests sent through Mitu. Keep this secret on your server and use it to verify requests before processing them.

Learn more about [Request verification](/platform/security/request-verification).

#### Choose what agents can pay for

Select the operations that should require payment when an AI agent uses them. You can keep some operations free while charging for others based on the value they provide.

For example, a research product might let agents search companies for free while charging to generate a complete company report.

```yaml
name: company_report
method: POST
path: /reports
description: Generates a company report for a domain
when_to_use: Use after the customer has confirmed the company and report they want
pricing_type: fixed
price: 5.00
requires_auth: false
```

Describe the operation clearly so an AI agent can understand what it provides and when it should be used. Your existing endpoint remains responsible for the actual work after payment has been confirmed.

Learn more about [MCP endpoints](/platform/mcp/endpoints).

#### Configure the price

Choose a pricing model that matches how you charge for the operation. Use fixed pricing when every request costs the same amount, or dynamic pricing when the final amount depends on the request.

With fixed pricing, configure the price directly on the operation. Mitu can present that amount to the agent and handle payment before your API is called to perform the paid work.

With dynamic pricing, your API determines the amount based on the request before payment takes place. This is useful when the price depends on factors such as quantity, selected items, delivery, availability or other information known by your system.

The detailed quote flow and pricing behaviour are covered separately so you do not need to implement them from this guide.

Learn more about [Pricing](/platform/payments/pricing).

#### Make the paid operation available to agents

Once the operation and its pricing are configured, make it available through your MCP connection. Compatible AI clients can discover the operation alongside the other capabilities you have chosen to make available.

When an agent decides to use the paid operation, Mitu handles the payment requirement and lets the agent complete the payment using a supported method. Your API does not need to determine which agent payment protocol is being used or implement a separate payment flow for each one.

Learn more about [Agent payments](/platform/payments/agent-payments).

#### Receive the paid request

After payment is confirmed, Mitu sends the request to the API operation you configured. The request contains the information your endpoint needs to perform the work, together with payment context that identifies it as a paid request.

For example, if the agent paid to generate a company report, your `/reports` endpoint receives the request after payment and can generate the report using the same business logic your product already uses.

You do not need to create a separate fulfilment system for AI agents. Treat the agent as another client of the API you already operate, while Mitu handles the payment step before the paid request reaches your application.

Learn more about [Agent payments](/platform/payments/agent-payments).

#### Verify the request

Before processing a paid request, verify that it came through Mitu using the signing secret provided when you connected your API. This prevents your backend from trusting requests that reach the endpoint directly without going through the expected payment flow.

Request verification confirms that the request was sent through Mitu. It is separate from customer authentication, which determines which customer the agent may be acting for when your integration uses customer accounts.

After verification succeeds, your application can trust the payment context attached to the request and continue with the operation.

See [Request verification](/platform/security/request-verification) for the verification process and implementation examples.

#### Deliver the product or service

Once the request has been verified, process it using the same business logic your application already uses. Create the order, generate the report, confirm the booking, provide the data or perform whatever action the paid operation represents.

Return your normal API response when the work is complete.

```json
{
  "id": "rep_8841",
  "status": "complete",
  "company": "acme.com",
  "sections": [
    "overview",
    "financials",
    "competitors"
  ]
}
```

Mitu returns the result to the AI agent so it can continue the task it was performing. Your response does not need a special agent-specific format unless that format is already part of your own API contract.

#### Handle retries safely

A paid request may be delivered again if an earlier delivery could not be confirmed. Operations that create orders, bookings or other side effects should therefore be handled idempotently so the same paid request does not produce the result twice.

Use the request identifier provided with the paid request to recognise requests you have already processed. If the same request is delivered again, return the result from the original operation instead of creating another order, booking or resource.

Detailed request fields and retry behaviour are covered in [Agent payments](/platform/payments/agent-payments).

#### Track payments

Configure webhooks so your backend can keep its own records updated when agent payments complete or fail. Payment events can be associated with your own records and used for reconciliation, reporting and customer support.

Webhooks are separate from the request your API receives to perform the paid operation. The request tells your application to fulfil the paid action, while payment events give your backend an independent record of payment activity.

Learn more about [Webhooks](/platform/webhooks/overview) and [Events](/platform/webhooks/events).

#### Settle your funds

Payments you receive from AI agents are added to your Mitu balance. Your business does not need to manage the agent's payment method or settlement protocol after receiving the payment.

From your balance, you can settle funds to a supported bank account or withdraw them to an onchain address. This keeps the way an agent pays separate from how your business ultimately receives its money.

Learn more about [Settlement](/platform/payments/settlement).

## Fixed and dynamic pricing

Most integrations only need to decide whether an operation has a known price or whether your system needs to calculate the price for each request.

With **fixed pricing**, you configure the amount on the operation and Mitu handles the payment before sending the paid request to your API. Your backend only needs to verify the request, perform the work and return the result.

With **dynamic pricing**, your API calculates the amount from the request before the agent pays. Once that amount has been paid, your API receives the request again to perform the actual work. Keep price calculation separate from fulfilment so the product, order or booking is only created after payment.

See [Pricing](/platform/payments/pricing) for the complete dynamic pricing flow.

## Payment and delivery are separate outcomes

Payment is confirmed before your API performs the paid operation. This means your application should treat payment and successful delivery as separate outcomes.

If your API cannot complete the operation after payment, do not ask the agent to make the same payment again. Handle the existing paid request appropriately by completing the work later, resolving the failure or refunding the customer where necessary.

Design paid operations so fulfilment is reliable and retries are safe. Learn more about these cases in [Agent payments](/platform/payments/agent-payments).

## Your API can now accept agent payments

AI agents can now pay before using the operations you configured, without your backend implementing agent payment protocols directly. Mitu handles the payment flow, confirms payment and sends the paid request to your existing API.

Your application remains responsible for the product or service being delivered. Verify the request, perform the work using your existing business logic and return the normal result. The payment is added to your Mitu balance and can then be settled to your bank account or onchain address.

## Continue building

#### [Agent payments](/platform/payments/agent-payments)

Understand how agent payments are handled before a paid request reaches your API.

#### [Pricing](/platform/payments/pricing)

Configure fixed and dynamic pricing for paid operations.

#### [Request verification](/platform/security/request-verification)

Verify requests from Mitu before processing paid operations.

#### [Settlement](/platform/payments/settlement)

Settle the funds you receive to a bank account or onchain address.