> 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.

# Payment links

A payment link is a request for payment that you create once and share wherever your customers are, by email, in a message, on your website or within your own product. Each payment link comes as a checkout link and an agent link, both leading to the same payment. A person opens the checkout link and pays through a hosted page, while an AI agent pays through the agent link programmatically on behalf of the person it works for. Whichever way it is paid, the link records a single payment against your reference, and your systems are notified as soon as it completes.

Payment links can be created in the dashboard without any development work, or through the API when your product needs to generate them as part of its own flow, in another currency or for one of the specialised payment types.

## What payment links provide

1. **No checkout to build**\
   The hosted page presents what is being paid for and the methods available to the payer, so your product never handles payment details.
2. **Payment by people and agents**\
   The same link is payable by a person or by an AI agent, without creating a separate request for each.
3. **Specialised payment types**\
   Beyond a single payment, links can sign the payer up to a subscription, open a prepaid session or charge for calls to your API.
4. **Visibility of engagement**\
   Every time a link is opened is recorded, so you can see whether a request has been seen before it is paid.

## Creating a payment link

#### Create the link

In the [Mitu dashboard](https://app.mitu.ai), select **New link** under **Payment links**, set the amount and what the payment is for, and choose how long the link remains open, from one day to thirty days or without expiry. Links created in the dashboard are single payments in US dollars.

To create links from your product, or in another currency or payment type, use the API and send an Idempotency-Key header so that a retried request never creates a second link.

```bash
curl --request POST \
  --url https://api.mitu.ai/v1/payment-links \
  --header "x-api-key: $MITU_API_KEY" \
  --header "Idempotency-Key: link-INV-2026-0441" \
  --header "Content-Type: application/json" \
  --data '{
    "type": "charge",
    "amount": 1250.00,
    "currency": "USD",
    "description": "Implementation services, phase one",
    "reference": "INV-2026-0441",
    "expiresAt": "2026-12-31T23:59:59Z"
  }'
```

| Parameter        | Description                                                                                  |
| ---------------- | -------------------------------------------------------------------------------------------- |
| `type`           | The payment type, described in [payment types](#payment-types). The default is `charge`.     |
| `amount`         | The amount to collect. Required for `charge` and `per_request`.                              |
| `currency`       | The currency of the payment. Required except for subscriptions, which take it from the plan. |
| `description`    | What the payer is paying for, shown on the checkout page.                                    |
| `reference`      | Your own identifier, returned with every notification for this link.                         |
| `expiresAt`      | When the link stops accepting payment, as an ISO 8601 timestamp.                             |
| `paymentMethods` | The agent payment methods to accept, from `x402`, `mpp_crypto` and `mpp_spt`.                |
| `metadata`       | Additional values to store with the link. Never place secrets here.                          |

#### Share the right link

The response contains both links.

```json
{
  "id": "pay_n8d7piu1yc6h",
  "type": "charge",
  "amount": "1250.00",
  "currency": "USD",
  "reference": "INV-2026-0441",
  "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"
  }
}
```

Send the checkout link to a person and provide the agent link to an AI agent. If the payer changes, the same link is used.

#### Confirm the payment

When the link is paid, your systems are notified through [events](/platform/webhooks/events), with your reference included. Fulfil from that notification, or retrieve the link through the API, rather than relying on a browser redirect or what an agent reports.

#### Manage the link

Retrieve, update and cancel links through the API, and review each time a link was opened. A cancelled link can no longer be paid.

```http
GET    /v1/payment-links?status=pending&reference=INV-2026-0441
GET    /v1/payment-links/{id}
PATCH  /v1/payment-links/{id}
GET    /v1/payment-links/{id}/views
DELETE /v1/payment-links/{id}/cancel
```

Links can be listed and filtered by type, status, reference and the source that created them.

## Payment types

| Type           | Use it for                                                                                       | Configuration                                                                                              |
| -------------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
| `charge`       | A single payment of a known amount.                                                              | The default. Set `amount` and `currency`.                                                                  |
| `subscription` | Signing the payer up to a recurring [subscription](/platform/payment-experiences/subscriptions). | Set `planId`, or offer several plans and let the payer choose. The amount and currency come from the plan. |
| `session`      | A deposit the payer funds once and draws on across an ongoing interaction.                       | Set the largest deposit with `sessionMaxDeposit`, and optionally when the session expires.                 |
| `per_request`  | Payment for calls to a specific path in your API.                                                | Set the path with `endpointPattern`.                                                                       |

## Payment link states

| State       | Meaning                                           |
| ----------- | ------------------------------------------------- |
| `pending`   | Open and waiting for payment.                     |
| `partial`   | Part of the amount has been received.             |
| `settling`  | A payment is being settled.                       |
| `paid`      | The full amount has been received.                |
| `expired`   | The expiry passed before the link was fully paid. |
| `cancelled` | You cancelled the link.                           |

If a link expires or is cancelled after a partial payment, the amount already received remains yours, so reconcile it against the corresponding record rather than treating the link as unpaid.

Payment links give your business a single, shareable way to be paid by anyone, without building or maintaining a checkout. The same link serves a customer paying from their phone and an agent paying on their behalf, and both reach your records in exactly the same way.