> 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 a payment with a payment link

A payment link represents a single payment that can be completed in two ways. A person can open it and pay through a hosted checkout, and an AI agent can pay the same link programmatically on behalf of the person it works for. Both are the same payment, so the amount, your reference and the final status stay consistent however it is paid.

You can create payment links in the dashboard without writing any code, or through the API when your application needs to create them as part of its own flow, such as when a customer places an order.

#### Create the payment link

#### In the dashboard

In the [Mitu dashboard](https://app.mitu.ai), select **Payment links** under **Payments** and then **New link**. Set the amount and describe what the payment is for, so the payer knows exactly what they are paying for.

#### With the API

Create the payment link from your server, using your own reference so you can match the payment to the order or booking it belongs to. See [authentication](/api-reference/authentication) for how requests are authorised.

```bash
curl --request POST \
  --url https://api.mitu.ai/v1/payment-links \
  --header "x-api-key: $MITU_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "type": "charge",
    "amount": 25.00,
    "currency": "USD",
    "description": "Order 8841",
    "reference": "ORDER-8841"
  }'
```

The response contains two URLs for the same payment. The checkout URL is for a person, and the agent URL is for an AI agent.

```json
{
  "id": "pay_n8d7piu1yc6h",
  "reference": "ORDER-8841",
  "url": {
    "checkout": "https://mitu.ai/pay/pay_n8d7piu1yc6h",
    "agent": "https://agent.mitu.ai/pay/pay_n8d7piu1yc6h",
    "docs": "https://agent.mitu.ai/pay/pay_n8d7piu1yc6h/llms.txt"
  }
}
```

#### Share the link with the payer

Send the link through whichever channel your customer already uses with your business, such as your website, email or a messaging app. How it is paid depends on who completes it.

* **A person**\
  Opens the hosted checkout, reviews what they are paying for and pays with one of the available payment methods. You do not need to build a checkout of your own.
* **An AI agent**\
  Receives the payment requirement and completes it programmatically on behalf of its user, then continues with its task. Mitu handles the agent payment flow, so your application does not need to support agent payment protocols itself.

If the payer changes, for example when a customer asks their agent to pay a link you sent them, the same link is used. There is no need to create a second payment.

#### Confirm the payment

The **Payment links** page shows each link as waiting to be paid until the payment completes, and every completed payment appears in **Transactions** with the funds added to your **Balances**.

If your systems need to act on the payment, such as fulfilling an order, rely on a [webhook](/guides/get-started/webhooks/configure-webhooks) rather than on what the payer's browser or agent reports. Each event includes your reference, so you can reconcile the payment against your own records.

The [Universal payments](/guides/universal-payments) guide covers invoices, subscription plans and the other ways to request payment from people and AI agents.