Gallery Platform API
Reference

Mint a cart checkout (public)

Checks out N cart lines — unique works and/or editioned formats — all-or-nothing: holds every unique work, verifies editioned stock, creates one sale + one multi-line invoice, and mints one Stripe Checkout session on the gallery's connected account (hosted redirect URL, or an embedded client secret with `ui_mode: embedded`). On a lost race nothing stays reserved and the 409's `details.lines` itemizes exactly which lines sold out (`reason: not_available | sold_out | drop_not_open`) so the storefront can retry with the rest. Authenticated with a `gpub_` publishable token; CORS-open, with the gallery's storefront origin allowlist enforced server-side when configured.

POST
/public/checkout

Checks out N cart lines — unique works and/or editioned formats — all-or-nothing: holds every unique work, verifies editioned stock, creates one sale + one multi-line invoice, and mints one Stripe Checkout session on the gallery's connected account (hosted redirect URL, or an embedded client secret with ui_mode: embedded). On a lost race nothing stays reserved and the 409's details.lines itemizes exactly which lines sold out (reason: not_available | sold_out | drop_not_open) so the storefront can retry with the rest. Authenticated with a gpub_ publishable token; CORS-open, with the gallery's storefront origin allowlist enforced server-side when configured.

Authorization

bearerAuth artworks:read
AuthorizationBearer <token>

A gallery API key, sent as Authorization: Bearer gpk_… (or the x-api-key header).

In: header

Scope: artworks:read

Header Parameters

Idempotency-Key?string

Optional. Send a unique key per logical operation to make retries safe: a retry with the same key replays the stored success for 14 days instead of re-running the write. Reusing a key with a different body returns 400.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

A public cart checkout: N lines (unique works and/or editioned formats), reserved all-or-nothing. On a lost race nothing is reserved and the 409 details itemize exactly which lines sold out.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

{  "checkout_mode": "hosted",  "checkout_url": "string",  "client_secret": "string",  "invoice_url": "string",  "expires_at": "string"}