Lifepeaks Public API v2
The Lifepeaks /v2 REST API lets a partner build its own frontend while Lifepeaks protects gift-card pricing, QuickPay payment, commission, canonical order state, and fulfillment. It also supports gift-card operations, redemption and reporting, plus customization of the built-in Lifepeaks order page. Order-page configuration is additionally available through the Lifepeaks MCP server for approved AI agents.
Start with Headless checkout when building a partner storefront. Start with the Built-in order page when Lifepeaks should provide the storefront too.
Protected headless commerce
| Step | REST endpoint | Responsibility |
|---|---|---|
| Discover | GET /v2/products | Lifepeaks publishes active products, their limits, options, and fees, and on each one how the card can be delivered, what a buyer may add to it, and the terms they accept before paying. |
| Price | POST /v2/quotes | Lifepeaks returns the authoritative total. |
| Create | POST /v2/orders | Partner creates an unpaid order with a stable idempotency key. |
| Pay | POST /v2/orders/{order_id}/checkout-sessions | Lifepeaks returns its hosted QuickPay URL. |
| Reconcile | GET /v2/orders/{order_id} | Partner reads canonical payment and fulfillment state. |
| Subscribe | /v2/webhook-endpoints | Partner receives signed payment and fulfillment events. |
| Deliver | GET /v2/orders/{order_id}/lines/{line_id}/gift-card.pdf | Partner downloads each fulfilled gift-card document. |
The catalog holds four product families: the variable-value gift_card_value gift card, one gcv_ product per experience, one evt_ product per event, and one so_ product per special offer — each of the last three with its own priced options. Checkout sells all four. A gift card travels by e-mail or by post; a ticket and an offer voucher are electronic only. One order buys one family: a value line, or up to twenty lines of a single other family, priced by the options they name. Read fee_basis on each product, because an event charges its fee per seat where the rest charge per line. Restaurant, hotel, spa and wellness, retail, and experience templates are different presentations of that same supported contract.
Ticket coupons and the Saved and New Special Vouchers stay operator-issued and are not in the catalog. Benefit deals are read and redeemed by code, never bought. Any issued item prints at GET /v2/items/{code}/document.pdf.
Other v2 surfaces
| Capability | REST or MCP surface |
|---|---|
| Check what a key can do | GET /v2/me — no scope required |
| Discover the companies a key may act for | GET /v2/companies, GET /v2/companies/{slug} |
| Set brand identity for generated PDFs | /v2/companies/{company_id}/brand* |
| Search and inspect existing items | GET /v2/items, GET /v2/items/{code} |
| Redeem, refund, cancel, activate, resend | POST /v2/items/{code}/… |
| List gift-card campaigns | GET /v2/promotions |
| Read events and reporting | GET /v2/events, /v2/reports/*, /v2/subscribers |
| Customize built-in order page | /v2/order-page* and orderpage_* MCP tools |
| Brand gift-card PDFs | /v2/pdf-templates* and pdf_templates_* MCP tools |
| Issue, list, and revoke API keys | /v2/api-keys |
| Browse exact schemas | API Reference |
POST /v2/items and /v2/orders/{legacy_order_id}/capture remain compatibility operations for direct issuance and migration. They are not the protected public headless payment flow. New partner storefronts use catalog, quote, unpaid po_… order, and Lifepeaks-hosted checkout.
Contract-gated settlement at POST /v2/orders/{order_id}/settle is disabled by default. Agency/marketplace, POS/PMS, and non-Lifepeaks settlement models require negotiation and an active entitlement.
Tenancy
By default every request acts on the company that owns the key. If Lifepeaks has assigned other companies to yours, add the optional company query parameter to act on one of them — a POST or PATCH may carry the same slug in its body instead, and the query string wins when both do. See Endpoints — Conventions. Call GET /v2/companies to see which slugs your key may use. Unknown, inactive, foreign, and unassigned companies all return 404 not_found.
Servers
| Environment | Base URL |
|---|---|
| Production | https://api.lifepeaks.dk |
| Demo | https://api-demo.lifepeaks.dk |
| Development and QuickPay testing | https://api-dev.lifepeaks.dk |
Where to go next
- Authentication — issue least-privilege, server-only API keys
- Headless checkout — protected catalog-to-fulfillment flow
- Signed webhooks — raw-body verification, deduplication, and recovery
- Starter templates — runnable restaurant, hotel, wellness, retail, and experience starters
- Endpoints — v2 surface map plus compatibility issuance and item operations
- Events & Reporting — events, participants, analytics, claimed items, subscribers
- Built-in order page — reading, versioning, previewing, and publishing hosted-page configuration
- Branded gift-card PDFs — company defaults, partner uploads, validation, and publication
- Migrating from v1 — moving an existing OAuth2 integration to v2
- MCP Server — connecting AI agents via the MCP protocol
- AI Agents — machine-readable docs and llms.txt
- API Reference — interactive OpenAPI specification
Errors
All non-2xx responses return a JSON error envelope:
{
"error": {
"code": "string",
"message": "string",
"fields": { "field_name": ["error message"] }
}
}
The fields property is only present on 422 Unprocessable Entity responses.