Skip to main content
POST
Starts a checkout from an embedded widget. You get back an invoiceUrl — send the visitor there and the hosted checkout takes over. The created payment appears in your normal payment list and webhook stream like any other.

How authorization works

There is no credential header. Three things together authorize the request:
  1. The publishableKey (pk_live_*, safe to expose — see the Authentication guide for fetching and rotating it; rotating invalidates the old one immediately, so update your embeds).
  2. The widgetId.
  3. The page’s Origin header matching the widget’s allowedOrigins.
Rate limit: 30 requests per minute per IP.
What a publishable key can NEVER do: create widget payments — that’s all. It cannot read payments, balances, or anything else; it grants no access to any other endpoint. Leaking it costs you nothing beyond possible junk invoices (bounded by the origin allowlist + rate limit); rotate it if spammed.

Parameters

string
Sent by the browser for the embedding page. Its hostname must match the widget’s allowedOrigins — host-equal or a subdomain at any depth (listing example.com also allows shop.example.com) — unless the widget’s allowlist is empty (empty = any origin).
string
required
Your publishable key (pk_live_*).
string
required
The widget to check out through.
string | number
Only for variable widgets: the amount the visitor typed.
object
Donor details, per the widget’s donor-field configuration (donorFields / requiredDonorFields). Recognized keys: name, email, phone, address, comment. Any other key is silently ignored (stripped), not rejected — a misspelled key such as emial produces no error and its value is dropped, so the checkout succeeds with that field missing.
string
Optional double-submit protection (8–64 chars of [A-Za-z0-9_-]). A retry with the same token and an identical payload dedupes to the same invoice instead of minting a second one; a differing payload under the same token deliberately mints a distinct invoice. A malformed token is silently ignored (the request still succeeds, but with no dedupe) — server-side integrators that skip this field get no dedupe at all, so a network retry mints two invoices for one purchase.
string | number | boolean | object | array
Arbitrary metadata attached to the created payment. Any JSON value is accepted; it’s stored as informational hints and never overrides system fields.
Send the visitor to https://dash.liddie.io + invoiceUrl as soon as the 201 arrives — it’s the hosted checkout for the payment that was just created, and the payment already shows in your payment list and webhook stream.

Response

string
The invoice slug.
string
Hosted checkout path, not a full URL — send the visitor to https://dash.liddie.io + this value.
string
The created payment’s id, visible in your normal payment list.

Errors

See also

  • Create a widget — configure allowedOrigins, amounts and donor fields for this endpoint.
  • Authentication — where the publishable key comes from and how to rotate it.
  • Webhooks & IPN — get notified when a widget-created payment confirms.