---
title: "A payment link for an unpaid order"
method: POST
path: "/api/v1/orders/{orderId}/checkout"
---

# A payment link for an unpaid order

`POST /api/v1/orders/{orderId}/checkout`

## Request

- Base URL: `https://ipmusk.com`
- URL: `https://ipmusk.com/api/v1/orders/{orderId}/checkout`
- Auth: HTTP bearer

Returns the open payment link of an unpaid one-time order, or opens a new one when the last expired. 409 invalid_state_transition when the order is paid, closed or past its payment window; 404 when it is not this account's. Needs the Idempotency-Key header.

## Path parameters

- `orderId` string, required

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `provider` 'stripe' | 'paypal' | 'infini': Payment provider for the link. Default: the first one this deployment offers.

## Response `200`

A payment link for an unpaid order

- object
  - `data` object, required
    - `order_id` string, required
    - `amount_minor` integer, required
    - `currency` string, required
    - `provider` 'stripe' | 'paypal' | 'infini', required: Payment provider for the link. Default: the first one this deployment offers.
    - `checkout_url` string, uri, required
    - `expires_at` string, date-time, required
  - `request_id` string, required

## Other responses

- `default`: Any failure: 400 validation_error, 401 authentication_required, 403 forbidden / capability_unavailable, 404 not_found, 409 invalid_state_transition / idempotency_conflict, 422 product_unavailable, 429 rate_limited, 500 internal_error.

---

[API](https://skmtc.dev/ipmusk/apis/ipmusk-customer-api.md) · [All operations](https://skmtc.dev/ipmusk/apis/ipmusk-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ipmusk/apis/ipmusk-customer-api/revisions/89f8b46fda61?raw)
