PaybytokenDocs
Payment Links
API reference · Payment Links

Create and manage Payment Links

Create, list, retrieve, activate and deactivate reusable checkout links.

POST /api/v1/payment_links

curl https://api-prod.paybytoken.io/api/v1/payment_links \
  -X POST \
  -H "Authorization: Bearer $PAYBYTOKEN_SECRET_KEY" \
  -H "Idempotency-Key: payment-link:starter-pack" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Starter pack",
    "currency": "usd",
    "amount_mode": "fixed",
    "line_items": [
      {
        "quantity": 1,
        "unit_amount": "50.00",
        "product_data": { "name": "Starter pack" }
      }
    ],
    "supported_tokens": [
      { "chain": "base", "currency": "USDC" }
    ],
    "collect_customer_email": "auto",
    "metadata": { "catalog_id": "starter_pack" }
  }'

For customer_entered, omit line items and configure minimum_amount, optional maximum_amount, and optional suggested_amounts. Monetary values are decimal strings.

Merchant operations

MethodEndpointPurpose
GET/api/v1/payment_linksList links by active state or amount mode.
GET/api/v1/payment_links/:idRetrieve the current version and public URL.
POST/api/v1/payment_links/:id/activateAllow new Checkout Sessions.
POST/api/v1/payment_links/:id/deactivateStop new sessions without canceling existing ones.

Mutations require an Idempotency-Key. Treat the public URL as shareable customer content, but keep the merchant API key and internal link-management endpoints on your server.

On this page

API Workbench

Full Explorer

Open in new tab