---
title: "Mint a checkout-intent token (extension Upgrade → web checkout binding)"
method: POST
path: "/api/v2/billing/checkout-intent"
tags: ["v2 Billing"]
---

# Mint a checkout-intent token (extension Upgrade → web checkout binding)

`POST /api/v2/billing/checkout-intent`

## Request

- Base URL: `https://pdf2md.dev`
- URL: `https://pdf2md.dev/api/v2/billing/checkout-intent`
- Auth: one of:
  - API key in cookie `p2m_session`
  - HTTP bearer

EP-028. Device-signed (or web session) via AccountAuthMiddleware. Mints a one-time, short-lived token (DEVICE_LINK_CODE_TTL_SEC) naming the acting account to charge. The extension opens the web pricing page with ?ci=<ci_token>, so the resulting checkout binds to the extension's account even if the browser is signed into a different web account (or none). Stored server-side (Redis), single-use (consumed by POST /billing/checkout).

## Response `200`

Intent token

- object
  - `ci_token` string, required
  - `expires_in_sec` integer

## Other responses

- `401`: Missing/invalid API key or session
- `403`: Device is not linked to an account (sign in first)

---

[API](https://skmtc.dev/pdf2md/apis/pdf-to-markdown-api-facade.md) · [All operations](https://skmtc.dev/pdf2md/apis/pdf-to-markdown-api-facade/llms.txt) · [OpenAPI document](https://skmtc.dev/pdf2md/apis/pdf-to-markdown-api-facade/revisions/4636782fb8b6?raw)
