REST APIJSON · Bearer authOn-site checkout

Glidure API reference

Create payments and render checkout on your own site from the checkout JSON payload — or use hosted links and embeds. Full field reference for payments, payment links, webhooks, and custom UI.

Overview

The Glidure REST API lets you create one-shot payments, reusable payment links, and receive real-time status updates via webhooks. All endpoints live under /api/v1/ and return JSON.

FieldTypeDefaultDescription
Base URL
Required
string—Your deployed app origin, e.g. https://glidure.com. Set NEXT_PUBLIC_APP_URL in production so checkout and embed URLs are absolute.
Content-Type
Required
headerapplication/jsonRequired on POST and PATCH requests with a body.
Authorization
Required
headerBearer gk_live_…API key from the Developers page in your dashboard.
Payments vs payment links vs payouts. Use the Payments API when your backend creates a single checkout for a known cart or invoice. Use Payment Links when you want a reusable URL or embed that mints a fresh order for each visitor — with optional multi-network pricing and full checkout customization. Use Withdrawals for one destination payout, or Auto settlements when you need many addresses in one request (waits for balance, then sends automatically).
Hosted vs merchant-rendered checkout. Every payment create returns checkoutUrl (hosted Glidure page) and a full checkout JSON object. Prefer rendering from checkout on your own domain when you want buyers to stay on your site, keep your branded gateway, and build trust with a familiar checkout — Glidure still verifies deposits server-side. Use checkoutUrl when you want a zero-UI integration. See Custom checkout UI.

Quick start

  1. Sign in and open the Developers page.
  2. Create an API key — shown once as gk_live_…. Enable Payments and/or Withdrawals permissions as needed.
  3. Add a receiving wallet in Settings (required before creating payments or links).
  4. Call the API with Authorization: Bearer YOUR_KEY.
  5. Optional: register a webhook URL on the Developers page for real-time events.
curl -X POST https://glidure.com/api/v1/payments \
  -H "Authorization: Bearer gk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "itemName": "Consulting hour",
    "amount": "25.00",
    "network": "polygon",
    "currencyToken": "USDC",
    "expiresAt": "2026-12-31T23:59:59.000Z"
  }'

# Prefer: render UI from response.checkout (amount, QR URI, address, instructions).
# Poll GET /api/v1/payments/{id} (same checkout shape) until status is "paid".
# Optional shortcut: redirect the customer to response.checkoutUrl.

Authentication

Every /api/v1/* route requires a valid Bearer token. Keys are scoped to your merchant account and can be revoked from the dashboard at any time. Each key has one or both permissions:

  • payment — create/list payments and payment links.
  • withdraw — withdrawals and auto settlements from your balance.

Requests to an endpoint without the required permission return 403.

FieldTypeDefaultDescription
Authorization
Required
header—Format: Bearer gk_live_…. Keys must start with the gk_live_ prefix.
curl -H "Authorization: Bearer gk_live_..." \
  https://glidure.com/api/v1/payments

Invalid or missing keys return 401. Suspended accounts return 403 even with a valid key.

Rate limits

Limits are per IP address. When exceeded, the API returns 429 with a Retry-After header (seconds until the window resets).

EndpointLimitWindow
POST /api/v1/payments30 requests10 minutes
GET /api/v1/payments60 requests1 minute
GET /api/v1/payments/{id}90 requests1 minute
POST /api/v1/withdrawals20 requests10 minutes
GET /api/v1/withdrawals60 requests1 minute
GET /api/v1/withdrawals/{id}90 requests1 minute
POST /api/v1/settlements20 requests10 minutes
GET /api/v1/settlements60 requests1 minute
GET /api/v1/settlements/{id}60 requests1 minute
POST /api/v1/settlements/{id}/cancel30 requests1 minute
POST /api/v1/payment-links20 requests10 minutes
PATCH /api/v1/payment-links/{id}30 requests10 minutes

Billing model

Glidure is free with unlimited payment links, embeds, and API access. Fees vary by payment size (USD equivalent): 0.75% for $1–$30; 0.65% for $31–$50; 0.45% for $51–$150, otherwise 0.35%. Each order gets a unique deposit address; any amount received on-chain confirms the checkout. Your net payout is based on the listed minimum (exact/overpaid) or the amount actually received (underpaid). The fee percent is stored on each order as platform_fee_percent at creation time.

Payment requests below 10 USDT (or the USD equivalent when using pricingMode: "usd") are rejected at creation.

Payments API

Create a single checkout order programmatically. Each call mints one order with its own QR code, expiry, and checkout page at /pay/{orderId}.

POST /api/v1/payments — Create payment

POST/api/v1/payments

Returns 201 with the order id, optional hosted checkoutUrl, and a full checkout object to render pay UI on your own site.

FieldTypeDefaultDescription
itemName
Required
string—Label shown on checkout. 1–80 characters.
amount
Required
string—Payment amount. Decimal string, up to 18 places.
network
Optional
enumpolygonpolygon, ethereum, bnb, or tron.
currencyToken
Optional
enumPOLPOL, ETH, BNB, TRX, USDC, or USDT. Must be valid for the chosen network.
pricingMode
Optional
enumfixedfixed — amount is in the token. usd — amount is USD; converts to native token. USD mode requires native token.
expiresAt
Required
string (ISO 8601)—When this checkout stops accepting payment. Must be in the future.
successRedirectUrl
Optional
string (URL)—Redirect after successful payment. Omit to keep the customer on Glidure. redirectUrl is a legacy alias.
failureRedirectUrl
Optional
string (URL)—Redirect after expired/failed checkout. Omit to keep the customer on Glidure.
POST /api/v1/payments
Content-Type: application/json

{
  "itemName": "Consulting hour",
  "amount": "25.00",
  "network": "polygon",
  "currencyToken": "USDC",
  "pricingMode": "fixed",
  "expiresAt": "2026-12-31T23:59:59.000Z"
}

Response (201)

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "paymentUrl": "ethereum:0x...@137/transfer?...",
  "checkoutUrl": "https://glidure.com/pay/550e8400-e29b-41d4-a716-446655440000",
  "checkout": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "item_name": "Consulting hour",
    "merchant_name": "Acme Store",
    "network": "polygon",
    "network_label": "Polygon",
    "amount": "25.00",
    "payable_amount": "25.00",
    "currency_token": "USDC",
    "status": "pending",
    "expires_at": "2026-12-31T23:59:59.000Z",
    "payment_url": "ethereum:0x...@137/transfer?...",
    "recipient_wallet": "0xDepositAddress...",
    "instructions": {
      "how_to_pay": [{ "n": 1, "text": "…" }],
      "is_stablecoin": true
    },
    "copy": { "waiting_label": "Waiting for secure confirmation", "order_short_id": "550e8400" },
    "ui": {
      "layout": "split",
      "active_step": "scan",
      "sections": ["brand", "steps", "how_to_pay", "qr", "address", "…"],
      "poll": {
        "url": "https://glidure.com/api/v1/payments/550e8400-e29b-41d4-a716-446655440000",
        "interval_ms": 8000
      }
    },
    "appearance": { "showHowToPay": true, "theme": "light" }
  }
}
On-site path: render from checkout (QR from payment_url, copy recipient_wallet / payable_amount). Poll GET /api/v1/payments/{id} — same session shape — until status is terminal. Hosted checkoutUrl remains available as a fallback.
pricingMode: "usd" treats amount as a USD figure and converts it to the native token (POL, ETH, BNB, and TRX) at the current rate. Only valid when currencyToken is the network's native asset. Stablecoins always use fixed.

GET /api/v1/payments — List payments

GET/api/v1/payments
FieldTypeDefaultDescription
status
Optional
query—Filter by status: pending, paid, expired, or failed.
limit
Optional
query50Max results per page. Capped at 100.
GET /api/v1/payments?status=paid&limit=50

Response (200)

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "item_name": "Consulting hour",
      "status": "paid",
      "network": "polygon",
      "network_label": "Polygon",
      "currency_token": "USDC",
      "amount": "25.00",
      "payable_amount": "25.00",
      "price_usd": null,
      "platform_fee_percent": "1.5",
      "platform_fee_amount": "0.375",
      "merchant_net_amount": "24.625",
      "payout_status": "sent",
      "payment_status": "exact",
      "received_amount": "25.00",
      "transaction_hash": "0xabc...",
      "payment_link_id": null,
      "created_at": "2026-08-29T10:00:00.000Z",
      "paid_at": "2026-08-29T10:05:00.000Z",
      "expires_at": "2026-08-29T10:15:00.000Z",
      "checkout_url": "https://glidure.com/pay/550e8400-e29b-41d4-a716-446655440000",
      "payment_url": "ethereum:0x...@137/transfer?..."
    }
  ]
}

GET /api/v1/payments/{id} — Get payment

GET/api/v1/payments/{id}

Returns the same checkout session object nested on create (UI-ready JSON — not the list-row shape). If the order is still pending, this endpoint also checks the unique deposit address for payment and updates the status before responding — use it for polling a merchant-rendered checkout (see checkout.ui.poll / recommended 8000 ms). When paid, payment_status is exact, overpaid, or underpaid; received_amount is the on-chain amount detected.

FieldTypeDefaultDescription
id
Required
path (UUID)—Order id returned from create.

When status changes to expired or failed, a webhook is dispatched automatically (if configured).

Withdrawals API

Pay out from your balance to any valid on-chain address. Requires the withdraw permission on your API key.

Fee model. The platform fee is always paid by you (the merchant). The API amount is what the recipient receives; your balance is debited amount + platform fee. Fee tiers match payments. On-chain gas is paid by the platform wallet.

This is separate from the dashboard Withdraw page, which sends to your own configured receiving wallet with no extra fee at withdraw time. There is no minimum withdrawal amount — any positive amount is allowed. Locked reserve funds are never debited; only the withdrawable surplus above the lock is used.

POST /api/v1/withdrawals — Create withdrawal

POST/api/v1/withdrawals

Returns 201 when the withdrawal is sent, or 200 when an existing idempotencyKey matches. Withdrawals are sent immediately.

FieldTypeDefaultDescription
amount
Required
string—Decimal token amount the recipient receives. Your balance is debited this amount plus the platform fee.
network
Required
string—polygon, ethereum, bnb, or tron.
currencyToken
Required
string—POL, ETH, BNB, TRX, USDC, or USDT (must be available on the network).
destinationAddress
Required
string—Recipient wallet address on the chosen network.
reference
Optional
string—Your internal reference (max 120 characters).
idempotencyKey
Optional
string—8–128 characters. Retrying with the same key returns the original withdrawal.
POST /api/v1/withdrawals
Content-Type: application/json

{
  "amount": "5.00",
  "network": "polygon",
  "currencyToken": "USDT",
  "destinationAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "reference": "user-123-cashout",
  "idempotencyKey": "cashout-user-123-2026-09-01"
}

Response (201)

{
  "id": "660e8400-e29b-41d4-a716-446655440001",
  "status": "sent",
  "network": "polygon",
  "network_label": "Polygon",
  "currency_token": "USDT",
  "amount": "5.00",
  "requested_amount": "5.00",
  "platform_fee": "0.05",
  "gas_fee": "0",
  "total_debited": "5.05",
  "destination_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "reference": "user-123-cashout",
  "transaction_hash": "0xabc...",
  "idempotency_key": "cashout-user-123-2026-09-01",
  "created_at": "2026-09-01T10:00:00.000Z"
}

GET /api/v1/withdrawals — List withdrawals

GET/api/v1/withdrawals
FieldTypeDefaultDescription
status
Optional
query—Filter: pending_approval, processing, sent, failed, declined, or reverted.
limit
Optional
query50Max results. Capped at 100.

GET /api/v1/withdrawals/{id} — Get withdrawal

GET/api/v1/withdrawals/{id}

Auto settlements API

Pay many addresses in one request. If your merchant balance covers the total, Glidure sends immediately. If not, the batch waits until enough funds arrive (from payments or balance loads), then executes automatically. Requires the withdraw permission.

All-or-nothing funding. The whole batch waits until your withdrawable balance covers every destination (plus fees). While waiting, that debit is settlement-locked — it reduces withdrawable balance and cannot be used for manual withdrawals until the batch finishes. Older waiting batches keep first claim on funds (FIFO). Destinations share one network and token. Same fee model as withdrawals. Max 50 destinations per request.

POST /api/v1/settlements — Create settlement

POST/api/v1/settlements

Returns 201 when completed immediately, 202 when waiting for funds, or 200 for an idempotent replay.

FieldTypeDefaultDescription
network
Required
string—polygon, ethereum, bnb, or tron.
currencyToken
Required
string—POL, ETH, BNB, TRX, USDC, or USDT.
destinations
Required
array—List of { address, amount, reference? }. 1–50 items. Same fee rules as POST /api/v1/withdrawals.
idempotencyKey
Optional
string—8–128 characters. Safe to retry the same batch.
POST /api/v1/settlements
Authorization: Bearer glidure_…
Content-Type: application/json

{
  "network": "polygon",
  "currencyToken": "USDT",
  "idempotencyKey": "payout-run-2026-09-05",
  "destinations": [
    { "address": "0xabc…", "amount": "25.00", "reference": "user-1001" },
    { "address": "0xdef…", "amount": "10.50", "reference": "user-1002" }
  ]
}

Statuses: waiting_funds, processing, completed, partial, failed, cancelled. Webhooks: settlement.waiting, settlement.completed, settlement.partial, settlement.failed, settlement.cancelled.

GET /api/v1/settlements — List settlements

GET/api/v1/settlements

GET /api/v1/settlements/{id} — Get settlement

GET/api/v1/settlements/{id}

POST /api/v1/settlements/{id}/cancel — Cancel settlement

POST/api/v1/settlements/{id}/cancel

Cancels a waiting_funds batch and releases its soft-lock on withdrawable balance. Returns 409 if the settlement is already processing, completed, or otherwise not cancellable. Emits settlement.cancelled.

Multi-network pricing

A payment link can accept payment on 1–4 networks. Each network gets exactly one price entry in the prices array.

  • Single network — Customer goes straight to checkout. No network picker shown.
  • Multiple networks — Customer picks a network first, then a fresh order is minted for that chain. Each order has its own deposit address, QR code, expiry, and on-chain verification.
Rules. At most one price per network. Maximum 4 prices (one per supported network: polygon, ethereum, bnb, tron). Token must be available on that network.

pricingMode per price

Modeamount meansValid tokens
fixed defaultExact token amount (e.g. "9.99" USDC or "0.01" ETH)Any supported token on that network
usdUSD dollar amount converted to native token at current rateNative token only — POL on Polygon, ETH on Ethereum, BNB on BNB Chain, TRX on Tron

Appearance & visibility

These fields control how the checkout page looks. All are optional on create; omitted fields use the defaults below.

Appearance

FieldTypeDefaultDescription
displayTitle
Optional
string—Checkout headline. Max 80 chars.
description
Optional
string—Subtitle. Max 280 chars.
imageUrl
Optional
string (URL)—Product/hero image URL.
accentColor
Optional
string—Hex color for buttons and accents (#rrggbb).
backgroundColor
Optional
string—Hex color for page background.
buttonText
Optional
string—Pay button label. Max 40 chars.
theme
Optional
enumlightlight or dark color scheme.

Visibility toggles

Each toggle hides a specific UI element on the checkout page. Defaults are true (shown). These always remain visible regardless of toggles: the QR code, wallet address, pay button, and payment status.

FieldTypeDefaultDescription
showImage
Optional
booleantrueProduct image block.
showTitle
Optional
booleantrueTitle / displayTitle heading.
showDescription
Optional
booleantrueDescription text.
showMerchantChip
Optional
booleantrueMerchant name chip.
showHowToPay
Optional
booleantrue"How to pay" instructions section.
showUsdReference
Optional
booleantrueUSD equivalent reference for token amounts.
showCountdown
Optional
booleantrueExpiry countdown timer.
showExactAmountBox
Optional
booleantrueMinimum amount copy box.
showOrderFooter
Optional
booleantrueOrder metadata footer (order id, timestamps).
showBranding
Optional
booleantrue"Powered by Glidure" branding footer.
showBranding. Controls the "Powered by Glidure" footer. If platform admin has disabled merchant branding control, branding is always shown and showBranding: false is ignored.

Networks & tokens

NetworkAPI valueNative tokenStablecoins
PolygonpolygonPOLUSDC, USDT
EthereumethereumETHUSDC, USDT
BNB ChainbnbBNBUSDC, USDT
TrontronTRXUSDC, USDT

Amount strings accept up to 18 decimal places for tokens (2 for USD pricing mode). Amounts must be greater than zero and within per-token maximums enforced by the API.

Custom checkout UI

Build Glidure pay flows inside your product. Create a payment, then render from the checkout object — no redirect required. Hosted checkoutUrl stays available when you want Glidure to host the page.

Why merchants choose on-site checkout.
  • Stay on site — buyers never leave your domain for payment.
  • Branded gateway — amount, QR, address, and status use your design system.
  • Security for buyers — each order still gets a unique deposit address; confirmation is server-side. Your UI is presentation only.
  • Extra trust — familiar domain and brand during payment reduce drop-off versus off-site redirects.
Settlement and webhooks remain Glidure-verified. Do not treat a client-side QR render as payment confirmation — poll until status is paid (or use webhooks).

Flow

  1. POST /api/v1/payments → read checkout.
  2. Render sections listed in checkout.ui.sections (QR from payment_url, copy boxes from recipient_wallet / payable_amount, steps from instructions.how_to_pay).
  3. Poll GET /api/v1/payments/{id} every checkout.ui.poll.interval_ms (or subscribe to webhooks).
  4. On paid / expired / failed, use copy.result, redirect_url, and explorer_tx_url as needed.

UI section → JSON fields

Hosted UI sectionJSON fields
How to payinstructions.how_to_pay, ui.layout
Merchant / title / amountmerchant_name, item_name, amount, currency_token
QR + addresspayment_url, recipient_wallet, copy.address_*
Waiting / countdowncopy.waiting_label, expires_at
Exact amountpayable_amount, copy.exact_amount_label
Paid / expired / failedstatus, copy.result, redirect_url, explorer_tx_url

Webhooks

Register webhook endpoints on the Developers page in your dashboard. There is no REST API for webhook management — configure URLs, secrets, and subscribed events from the UI.

Events

  • payment.pending
  • payment.paid
  • payment.expired
  • payment.failed
  • withdrawal.pending
  • withdrawal.sent
  • withdrawal.failed
  • settlement.waiting
  • settlement.completed
  • settlement.partial
  • settlement.failed
  • settlement.cancelled
EventWhen fired
payment.pendingNew order created and awaiting on-chain payment.
payment.paidPayment verified on-chain and settled.
payment.expiredOrder expired before payment (share links and one-shot payments).
payment.failedOrder marked failed.
withdrawal.pendingOlder withdrawals that were waiting for approval. New withdrawals are sent immediately.
withdrawal.sentWithdrawal confirmed on-chain.
withdrawal.failedWithdrawal failed before broadcast; balance restored.
settlement.waitingAuto settlement queued — merchant balance not yet enough to send.
settlement.completedAll destinations in the settlement batch were sent on-chain.
settlement.partialSome destinations sent; failed ones were refunded to merchant balance.
settlement.failedNo destinations were sent; debited amount was refunded when applicable.
settlement.cancelledWaiting settlement was cancelled; soft-lock released and destinations will not be paid.

Request headers

POST https://your-server.com/webhooks/glidure
Content-Type: application/json
User-Agent: Glidure-Webhooks/1.0
Glidure-Event: payment.paid
Glidure-Timestamp: 1690000000
Glidure-Signature: sha256=<hmac_hex>

Payload

{
  "event": "payment.paid",
  "created_at": "2026-08-29T10:05:00.000Z",
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "item_name": "Consulting hour",
    "status": "paid",
    "network": "polygon",
    "currency_token": "USDC",
    "amount": "25.00",
    "payable_amount": "25.00",
    "payment_status": "exact",
    "received_amount": "25.00",
    "transaction_hash": "0xabc...",
    "payment_link_id": null,
    "paid_at": "2026-08-29T10:05:00.000Z",
    "expires_at": "2026-08-29T10:15:00.000Z"
  }
}

Withdrawal payload

{
  "event": "withdrawal.sent",
  "created_at": "2026-09-01T10:05:00.000Z",
  "data": {
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "status": "sent",
    "network": "polygon",
    "currency_token": "USDT",
    "amount": "5.00",
    "platform_fee": "0.05",
    "destination_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
    "reference": "user-123-cashout",
    "transaction_hash": "0xabc..."
  }
}

Settlement payload

{
  "event": "settlement.completed",
  "created_at": "2026-09-05T12:00:00.000Z",
  "data": {
    "id": "770e8400-e29b-41d4-a716-446655440002",
    "status": "completed",
    "network": "polygon",
    "network_label": "Polygon",
    "currency_token": "USDT",
    "total_send": "35.50",
    "total_fee": "0.36",
    "total_debited": "35.86",
    "item_count": 2,
    "destinations": [
      {
        "id": "…",
        "address": "0xabc…",
        "reference": "user-1",
        "amount": "25.00",
        "status": "sent",
        "transaction_hash": "0x…",
        "error": null
      }
    ]
  }
}

Verify signature

Signature is HMAC-SHA256 over {timestamp}.{raw_body} using your webhook secret. Compare against the Glidure-Signature header (strip the sha256= prefix).

const crypto = require('crypto')

function verifyGlidureWebhook(secret, rawBody, timestamp, signatureHeader) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(`${timestamp}.${rawBody}`)
    .digest('hex')
  const provided = signatureHeader.replace(/^sha256=/, '')
  return expected === provided
}

// In your route handler — use the raw request body, not re-serialized JSON:
app.post('/webhooks/glidure', (req, res) => {
  const timestamp = req.headers['glidure-timestamp']
  const signature = req.headers['glidure-signature']
  const rawBody = req.rawBody // express.raw() or equivalent

  if (!verifyGlidureWebhook(process.env.GLIDURE_WEBHOOK_SECRET, rawBody, timestamp, signature)) {
    return res.status(401).send('Invalid signature')
  }
  const payload = JSON.parse(rawBody)
  // handle payload.event ...
  res.sendStatus(200)
})

Embeds

Embed links load at /l/{linkId}. Append ?mode=card|inline|button to pick the layout. The checkout page sends postMessage events so your iframe can auto-resize.

HTML iframe

<iframe
  id="glidure-checkout"
  src="https://glidure.com/l/{linkId}?mode=card"
  width="420"
  height="640"
  style="border:0;border-radius:16px;"
  title="Pay with Glidure"
></iframe>
<script>
window.addEventListener('message', function (event) {
  if (!event.data || event.data.type !== 'glidure:resize') return
  var iframe = document.getElementById('glidure-checkout')
  iframe.style.height = event.data.height + 'px'
  if (event.data.width) iframe.style.width = event.data.width + 'px'
})
</script>

postMessage payload

{
  "type": "glidure:resize",
  "height": 640,
  "width": 420
}

Copy ready-made HTML, JavaScript, and React snippets from the Developers page after creating an embed link — they include the resize listener and correct initial dimensions per mode.

Initial iframe sizes

modewidthheight
card420640
inline42084
button18060

Examples

Minimal share link (single network)

POST /api/v1/payment-links
{
  "itemName": "Coffee",
  "prices": [
    { "network": "polygon", "currencyToken": "USDC", "amount": "4.50" }
  ]
}

Multi-network link (customer picks chain)

POST /api/v1/payment-links
{
  "linkType": "share",
  "itemName": "Annual membership",
  "prices": [
    { "network": "polygon", "currencyToken": "USDC", "amount": "99.00" },
    { "network": "ethereum", "currencyToken": "USDC", "amount": "99.00" },
    { "network": "bnb", "currencyToken": "USDC", "amount": "99.00" }
  ]
}

USD-priced native token

POST /api/v1/payment-links
{
  "itemName": "Tip jar",
  "prices": [
    {
      "network": "polygon",
      "currencyToken": "POL",
      "amount": "5.00",
      "pricingMode": "usd"
    }
  ]
}

Full embed with redirect

POST /api/v1/payment-links
{
  "linkType": "embed",
  "itemName": "Pro plan",
  "prices": [
    { "network": "polygon", "currencyToken": "USDC", "amount": "29.00" }
  ],
  "successRedirectUrl": "https://yoursite.com/welcome",
  "failureRedirectUrl": "https://yoursite.com/payment-failed",
  "displayMode": "button",
  "theme": "dark",
  "accentColor": "#ff6b2b",
  "showBranding": false
}

One-shot payment from backend (on-site UI)

POST /api/v1/payments
{
  "itemName": "Order #1042",
  "amount": "150.00",
  "network": "ethereum",
  "currencyToken": "USDC",
  "expiresAt": "2026-12-31T23:59:59.000Z"
}

// Primary: render from response.checkout on your site (QR, address, amount, instructions).
// Poll GET /api/v1/payments/{id} until status is "paid" (same checkout session shape).
// Optional: redirect the customer to response.checkoutUrl for hosted checkout.

Errors

All errors return JSON: { "error": "…" }

StatusMeaning
400Invalid JSON, validation failure, missing wallet, unknown token/network combo, or empty PATCH body.
401Missing or invalid API key.
403Suspended account, or merchant unavailable.
404Payment or payment link not found (or not owned by your account).
429Rate limited — check Retry-After header.
500Server error — safe to retry idempotent reads; retry creates with care.
503Platform wallet not configured — payment processing temporarily unavailable.