Skip to content

Payment links

A payment link is a checkout URL you create once and share with any number of buyers. Each buyer who opens it gets their own checkout session and their own order, so the link is a template and the orders are the sales. Use a link when anyone with the URL can buy the same offer. To collect for one order from one buyer, create a checkout session; to bill a known customer with a due date, send an invoice. Payment links vs checkout sessions vs invoices compares the three.

Your server creates, reads, and updates links with an API key: checkouts.payment_links.write to create and update, and checkouts.payment_links.read to list and retrieve. The public read and resolve routes take no credential, so a buyer's browser can call them to show the offer on your own page and start the buyer's checkout; see Start checkout from your own page. The public read returns the merchant's current display name, and if Flint can't load the merchant it fails with 500 INTERNAL_ERROR rather than showing a placeholder; retry it.

Resolve accepts optional client_reference (1 to 255 opaque characters, preserved exactly) and prefill.email (a valid email of 1 to 320 characters). Hosted URLs use client_reference and prefill_email. The reference is copied to the session and order as a nullable, immutable field readable by merchant credentials. Anyone with the URL can change it, so it is not proof of identity. Email prefill is editable and never links an existing customer. See Share the link.

Delivery address country requirements come from the session's pinned delivery methods, including their eligibility and rate-table conditions. Read input_requirements[].constraint.supported_countries on the checkout session or delivery quote, and intersect across choice groups. Automatic tax adds the order's tax.supported_countries limit, currently ["US"]. Non-US automatic tax locations are not supported. Unrestricted delivery excludes CU, IR, KP, and SY; Crimea, Donetsk, and Luhansk are excluded when address data identifies them.

The type decides what the buyer sees. You choose it on create with payment_link_type and subscription_plan_id, and neither can change afterward; create a new link instead.

LinkCreate it withThe buyer chooses
Standardline_items: catalog variant or bundle items, or ad hoc custom_fixed or custom_variable itemsA quantity or amount within the limits you set, and a variant on a variant_ids line
Donationpayment_link_type: "donation" and the donation_* amount fields, without line_itemsOne amount
Eventpayment_link_type: "event", event_config with event_at and timezone, and line_items as ticket tiersA ticket count for each tier
Subscription signupsubscription_plan_id instead of line_items. The link reads as payment_link_type: "standard".The plan's billing interval and quantity, from the options it offers

Delivery and inventory configuration#

Create, activation (status: "active"), and changes to line_items, delivery_method_ids, or inventory_routing_source validate checkout configuration before saving. Explicit delivery methods or settings.checkout.default_delivery_method_ids must cover the items' delivery profiles. This includes pickup-only profiles and every required bundle component; digital or service fulfillment without a checkout choice needs no method. At least one offered variant must have usable configuration for each variant_ids line.

Tracked demand requires an active routing location with inventory_allocation_enabled: true. An allocation policy can include disabled locations when another location remains usable. Untracked and ad hoc items need no allocation check, and temporary stock shortages do not prevent these writes.

Tracked demand that omits inventory_routing_source uses and stores settings.inventory.default_routing_source when set. Otherwise, Flint uses the active Location in the current environment that has had inventory allocation enabled the longest. The link resolves that fallback again each time it is used. If no Location is eligible, send a routing source or configure the merchant default.

Every required line needs a usable option. Adjustable event tiers may be skipped, so one unusable optional tier does not block a link when another tier can be checked out. For a pinned policy revision, enable allocation at an active location in that revision or change the link's inventory_routing_source; publishing a new parent-policy revision does not change the pin.

Configuration gaps return 409 ACTION_NOT_ALLOWED, reason configuration_required, retry none, and the blocking resource in error details. Follow remediation.next_actions for configuration that needs a separate write. Clearing delivery_method_ids validates the inherited defaults. Renaming, editing metadata, and deactivating an unsellable link remain allowed.

What each checkout creates#

When a buyer continues from the link, Flint creates an order and a checkout session for that buyer. You fulfill, refund, and report on the order, not the link.

  • Where it came from. The order has origin: "payment_link" and the link's payment_link_id. GET /v1/orders?payment_link_id=pl_... lists one link's orders, and GET /v1/checkout-sessions?payment_link_id=pl_... lists the checkouts it started.
  • Metadata. The order's metadata holds a copy of the link's metadata. Orders created before Flint recorded answers in custom_field_answers also hold each answer there as custom_field_<key>.
  • Custom field answers. The order and its checkout sessions return the buyer's answers in custom_field_answers, frozen when checkout started and returned only to merchant credentials. See Orders.
  • Line item keys. Each order line created from a link line item has that item's key as payment_link_line_item_key. It is null on lines added to the order later and on subscription signup orders' plan lines. See Orders.
  • Snapshots. A checkout keeps the items, prices, and settings the link had when it started. Edits apply to checkouts that start afterward. Deactivation closes open, unpaid checkouts; payments already in progress can finish.
  • Counters. completed_count counts paid checkouts, and an event link's total_quantity_sold counts tickets sold. A full refund gives that order's capacity back to the link and lowers both, and it voids the order's remaining tickets.

Fulfill from the order.paid webhook rather than the buyer's success redirect, after you check the order's dispute_status (access rules); Fulfill and reconcile lists the events.

Variant quantity pricing#

The public link read includes quantity_price_breaks for each offered variant in available_variants, alongside its base unit_price_money. A fixed variant line returns quantity_price_breaks in its resolved_line_items entry, where resolved_unit_price_money is the base price that applies below the first break. An empty array means the base price applies at every quantity. Bundles, variant choice lines, and ad hoc lines return an empty array there, because a variant choice line keeps a separate schedule for each offered variant in available_variants.

When checkout creates an order, each variant line uses the break with the largest minimum_quantity at or below that line's quantity. Separate lines are not combined. Payment links use the default variant schedule. The resulting order keeps its selected price and schedule; later catalog changes do not reprice an existing checkout. Subscription plans keep their own prices.

Status and availability#

status on payment link

Only your PATCH changes status, and there is no delete. A link stops taking new buyers in any of these cases; in the last three, its status stays active:

Stops new checkouts whenReopen it byStarting a checkout returns
status is inactiveSetting status to active409 ACTION_NOT_ALLOWED, reason unsupported_state
The sales end passes: sales_end_at, or event_config.event_at on an event link without oneSending a later sales_end_at, or null to remove it409 ACTION_NOT_ALLOWED, reason not_offered
completed_count reaches max_completionsRaising max_completions, or sending null to remove it409 LIMIT_REACHED, reason payment_link_completions
An event has no tickets left under event_config.max_total_quantity, or a catalog line has no stock at the link's inventory_routing_sourceRaising the ticket limit or adding stock409 INVENTORY_INSUFFICIENT

The public read returns status, is_past_sales_end, is_sold_out, and the link's completed_count and max_completions, so your page can show the right message before the buyer tries to check out. checkout_session_expires_in_seconds limits how long each buyer's checkout stays open; it never stops the link. Control availability has examples.

GET /v1/payment-links/{payment_link_id}/public also returns data.merchant_support: the support email, phone (E.164), and url (absolute http or https) the merchant set, each optional. The object is omitted when the merchant set none. It is available even when the link is inactive, at its completion limit, sold out, or past its sales end. Show these support links wherever your page tells the buyer to contact the merchant.

PATCH changes only the fields you send. Update a link covers clearing fields with null and merging metadata.

  • Versions. version starts at 1 and goes up by one with every saved change, including a status change. Sales and the counters above don't change it. Each change sends payment_link.updated with the new version.
  • Whole lists. line_items, custom_fields, and delivery_method_ids are replaced as a whole, and a PATCH that sends any of them needs the link's current version as expected_version. Include an entry's payment_link_line_item_id or payment_link_custom_field_id to keep it, leave the ID out to add an entry, and leave an entry out to remove it. Omit a list to leave it unchanged.
  • Conflicts. If the link changed since you read it, the request returns 409 VERSION_CONFLICT with the current version in details[0].current_version, and nothing changes. Read the link again and retry with that version.
  • Active links keep their line items. On an active link, every line item keeps its ID, key, and source: its variant, bundle, variant_ids product, or ad hoc item. You can change an ad hoc item's name and price, any item's quantity settings, and the variants listed within a variant_ids line's product. Adding, removing, re-keying, or re-sourcing an item returns 409 ACTION_NOT_ALLOWED with reason field_locked; send "status": "inactive" in the same PATCH, then reactivate the link.
  • Response-only line item fields. Reads add resolved_name, resolved_unit_price_money, resolved_price_range, is_catalog_item_unavailable, and product_id to catalog line items. They show the catalog's current values, and checkout resolves the catalog again when each checkout starts. Remove them before sending a fetched line item back, or the request fails with 400 INVALID_REQUEST.

This request lowers the price of the link's one item, keeping it by ID:

cURL
curl -X PATCH https://api.withflintpay.com/v1/payment-links/pl_01K4SPRINGTEE \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "expected_version": 3,
    "line_items": [{
      "payment_link_line_item_id": "plli_01K4TEE",
      "type": "custom_fixed",
      "key": "tee",
      "name": "Limited Tee",
      "unit_price_money": {"amount": 3000, "currency": "USD"},
      "allow_quantity_adjustment": true,
      "min_quantity": 1,
      "max_quantity": 5
    }]
  }'

Platform fee rule#

Requestplatform_fee_rule
POST /v1/payment-linksAn object copied onto each checkout the link starts.
PATCH /v1/payment-links/{payment_link_id}An object replaces the whole rule. null removes it. Omit it to keep the rule. Requires expected_version whenever the field is present.

Only the partner app install that created the link may set or remove its rule. PaymentLink returns an active rule with its partner_app_id. The public link and buyer checkout omit the rule.

percent is required and ranges from 0 to 25 with up to four decimal places. A percent of 0 requires fixed_fee_money. The optional fixed_fee_money and maximum_fee_money each take 1 to 1,000,000 minor units in the link's currency. The maximum must be at least the fixed amount. Until the app owner accepts a Flint Platform Agreement version that covers rules, setting or replacing a rule in live mode returns 409 ACTION_NOT_ALLOWED with reason platform_onboarding_required. The creating install can still remove the rule by sending null with expected_version. See Checks when you set a rule for consent, live eligibility, and cap errors.

Changing the rule advances the link's version and affects checkouts started afterward. If a buyer loaded the link before the change, they must reload it to start checkout. Open checkouts keep their copy. A rule change or removal includes the prior value in previous_attributes.platform_fee_rule.

Sales summary#

Add expand=sales_summary to GET /v1/payment-links/{payment_link_id} or GET /v1/payment-links to get each link's paid totals, one entry per currency. Flint computes it when you ask, for the whole page at once on a list.

cURL
curl -G https://api.withflintpay.com/v1/payment-links/pl_01K4SPRINGTEE \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "expand=sales_summary"
Response
{
  "data": {
    "payment_link_id": "pl_01K4SPRINGTEE",
    "status": "active",
    "version": 4,
    "sales_summary": {
      "paid_totals": [{"amount": 10500, "currency": "USD"}],
      "refunded_totals": [{"amount": 3500, "currency": "USD"}],
      "paid_order_count": 3,
      "computed_at": "2026-10-28T17:00:00Z",
      "checked_in_ticket_count": 0
    }
  }
}

paid_totals is what the link's paid orders collected before refunds, and paid_order_count still counts a refunded order. refunded_totals lists the refunds on those same orders in the same currency order, so subtract it entry by entry for what you kept. Three $35.00 orders with one fully refunded show $105.00 paid and $35.00 refunded, so you kept $70.00.

The summary differs from completed_count, which drops a fully refunded order. With no paid orders, both totals are [] and the count is 0.

For an event link, checked_in_ticket_count is the number of its tickets checked in when you read the summary. Undoing a check-in or voiding a ticket lowers it. It's 0 for a link that has issued no tickets.

Both reads accept these expand paths:

expandAddsAlso needs
sales_summaryThe sales summaryNo other scope
subscription_planThe plan summary for subscription_plan_id, or null on a link without a plancommerce.subscription_plans.read

A key without a scope a path needs gets 403 INSUFFICIENT_SCOPE with param: expand. Expand related records covers how Flint batches each page and keeps page tokens valid.

cURL
curl -G https://api.withflintpay.com/v1/payment-links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "has_subscription_plan=true" \
  --data-urlencode "expand=sales_summary,subscription_plan"
Payment linksCreate, share, and fulfill a link, with examples for every link type.Subscription billingPlans, trials, and renewals behind signup links.Catalog setupCreate the variants and bundles that catalog line items sell.

Event changes#

On PATCH /v1/payment-links/{payment_link_id}, notify_ticket_holders is an optional boolean that defaults to true for each request. Changing an event's event_at, timezone, or venue updates existing orders and buyer tickets, and sends each affected order's holder an email. Set it to false to send your own notice. Unchanged details and changes to other settings send no holder email. send_ticket_emails controls ticket confirmations separately.

Affected orders send order.updated with data.previous_attributes.ticketed_event. Read Reschedule an event for an example and cancellation steps.

The Payment link object#

A reusable link that opens checkout.

Returned by GET /v1/payment-links/{payment_link_id} and carried by the endpoints below.

Attributes

buyer_fieldsobject

What checkout asks the buyer for. Each field you leave out uses your checkout settings.

checkout_session_expires_in_secondsinteger

Seconds each checkout session the link starts stays open, from 60 to 86,400. Omit it to use your checkout settings, or 24 hours. It doesn't end the link; use sales_end_at for that.

completed_countintegerRequired

Number of paid checkout sessions started from this link.

created_atstringRequired

RFC3339 timestamp.

custom_fieldsarray of object

Questions buyers answer before paying. Answers are recorded on the order and checkout session in `custom_field_answers`.

custom_textobject

Custom text for checkouts started from this link.

delivery_method_idsarray of stringRequired

Delivery methods the link offers. Empty when the link has none, and then its checkouts offer settings.checkout.default_delivery_method_ids when the order has items to deliver.

descriptionstring

Text about what the link sells, returned to buyers when they open it.

donation_max_amount_moneyobject

Largest amount a buyer can give on a donation link. Must be greater than zero and greater than or equal to donation_min_amount_money. Omit on create for no maximum.

donation_min_amount_moneyobject

Smallest amount a buyer can give on a donation link.

donation_suggested_amount_money_optionsarray of object

Amounts a donation link offers as one-tap choices. Use the same currency for all suggested amounts and both bounds.

event_configobject

Event details for an `event` link: when and where it takes place and how many tickets it sells.

external_reference_idstring

Caller-owned identifier for this resource in an external system.

imageobject

Image shown to buyers with the link.

inactive_messagestring

Message to show the buyer when the link is inactive.

inventory_routing_sourceobject

The inventory location or routing policy that supplies stock for the link's catalog lines. Absent when using the implicit single-Location fallback, which is evaluated again on use.

legalobject

The terms and policy links checkouts started from this link show the buyer.

line_itemsarray of one of

What the link sells.

max_completionsinteger

Most payments the link accepts, counted by `completed_count`. Absent means no limit. Once the limit is reached, resolving the link fails with a request error. It can't be set below `completed_count`.

merchant_idstringRequired

ID of the merchant this resource belongs to.

metadatamap of string

Stored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.

namestringRequired

Name of the payment link.

payment_link_idstringRequired

Unique identifier for this payment link, prefixed `pl_`.

payment_link_typeenum

What kind of link this is.

  • standard
  • donation
  • event
paymentsobject

Payment options for checkouts started from this link.

platform_fee_ruleobject

The platform fee rule copied to checkouts started from this link.

promotion_configobject

Whether automatic promotions apply to checkouts started from this link and whether buyers can enter promotion codes.

redirectsobject

Where checkout sessions started from this payment link send the buyer after payment, cancellation, or expiration.

sales_end_atstring

RFC3339 timestamp after which the link stops starting checkouts and resolve fails with `ACTION_NOT_ALLOWED` and reason `not_offered`. Unset means sales do not end on their own, except that an event link without sales_end_at stops selling at event_config.event_at. A checkout opened before the end can still start payment for up to 15 minutes after it.

sales_start_atstring

RFC3339 timestamp when buyers can first start a checkout from this link. Stored to nanosecond precision. Before it, resolve fails with ACTION_NOT_ALLOWED and reason sales_not_started. Must be earlier than the link’s sales end, including the event start when no explicit end is set.

sales_summaryobject

Present only with expand=sales_summary on GET /v1/payment-links or GET /v1/payment-links/{payment_link_id}. Available to merchant callers, including dashboard sessions and API keys with checkouts.payment_links.read. Uses the same paid-order definition as the merchant sales summary.

statusenumRequired

Whether the link can start new checkouts.

  • active
  • inactive
subscription_planobject or null

Present only when `expand` includes `subscription_plan`; `null` when expanded and there is no related subscription plan.

subscription_plan_idstring

ID of the subscription plan the link sells. Absent for a link that doesn't sell a subscription.

taxobject

Tax settings for checkouts started from this link.

themeobject

The title and colors for checkouts started from this link, over your branding settings.

tipobject

Tip options for checkouts started from this link.

total_quantity_soldintegerRequired

Whole-number quantity; fractional quantities are not supported.

updated_atstringRequired

RFC3339 timestamp.

urlstringRequired

URL buyers open to use the link.

versionintegerRequired

Current version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.

JSON
{
  "completed_count": 3,
  "created_at": "2026-03-17T14:30:00Z",
  "custom_fields": [
    {
      "custom_field_type": "dropdown",
      "key": "meal_preference",
      "label": "Meal preference",
      "options": [
        "Vegetarian",
        "Chicken",
        "Fish"
      ],
      "payment_link_custom_field_id": "plcf_01KEZF7C00QNHSJ1VY3MASHT73",
      "required": true
    }
  ],
  "delivery_method_ids": [],
  "description": "Event checkout",
  "event_config": {
    "event_at": "2027-05-12T19:00:00Z",
    "max_total_quantity": 500,
    "send_ticket_emails": true,
    "ticket_prefix": "GAL",
    "timezone": "America/New_York",
    "venue": "Pier 57, New York"
  },
  "image": {
    "alt": "Spring gala",
    "height": 900,
    "url": "https://images.withflintpay.com/ia_spring_gala/original",
    "width": 1600
  },
  "line_items": [
    {
      "is_catalog_item_unavailable": false,
      "key": "general-admission",
      "name": "General Admission",
      "payment_link_line_item_id": "plli_01KEZF7C0050J6WVC0XHSD9WSS",
      "product_type": null,
      "quantity": 1,
      "type": "custom_fixed",
      "unit_price_money": {
        "amount": 2500,
        "currency": "USD"
      }
    }
  ],
  "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
  "metadata": {
    "campaign": "spring-gala"
  },
  "name": "Spring Gala",
  "payment_link_id": "pl_01KEZF7C00FEBVYY6R0DKKQRWX",
  "payment_link_type": "event",
  "payments": {
    "enabled_payment_options": [
      "card",
      "apple_pay",
      "google_pay"
    ]
  },
  "status": "active",
  "total_quantity_sold": 42,
  "updated_at": "2026-03-17T14:30:00Z",
  "url": "https://checkout.withflintpay.com/pay/pl_01KEZF7C00FEBVYY6R0DKKQRWX",
  "version": 1
}

Get public payment link#

GET/v1/payment-links/{payment_link_id}/public

No API key required

Rate limit: per IP

Returns the sanitized buyer-facing payment-link snapshot and a private resolution context for this browser operation.

Path parameters

payment_link_idstringRequired

Flint payment link ID. Must be a valid ID with prefix pl_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Response · 200

The public payment link and private resolution context.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier of this API request, used to correlate logs and support requests.

curl https://api.withflintpay.com/v1/payment-links/pl_01KEZF7C007WDMA5P9BPZ8J2AM/public \
  -H "Flint-Version: 2026-09-07"

The public payment link and private resolution context.

JSON
{
  "data": {
    "checkout_start_due_at": "2026-05-13T18:58:00Z",
    "checkout_theme": {
      "accent_color": "#f59e0b",
      "background_color": "#ffffff",
      "corner_radius": 12,
      "font_family": "instrument_sans",
      "primary_color": "#0f766e",
      "text_color": "#1f2937"
    },
    "is_past_sales_end": false,
    "is_sold_out": false,
    "merchant_icon": {
      "alt": "Merchant icon",
      "height": 256,
      "url": "https://images.withflintpay.com/ia_merchant_icon/original",
      "width": 256
    },
    "merchant_logo": {
      "alt": "Merchant logo",
      "height": 512,
      "url": "https://images.withflintpay.com/ia_merchant_logo/original",
      "width": 512
    },
    "merchant_name": "Cedar & Stone Coffee",
    "payment_link": {
      "completed_count": 3,
      "custom_fields": [
        {
          "custom_field_type": "dropdown",
          "key": "roast_preference",
          "label": "Roast preference",
          "options": [
            "Light",
            "Medium",
            "Dark"
          ],
          "payment_link_custom_field_id": "plcf_01KEZF7C00QNHSJ1VY3MASHT73",
          "required": true
        }
      ],
      "description": "Monthly coffee membership",
      "image": {
        "alt": "Monthly roast box",
        "height": 800,
        "url": "https://images.withflintpay.com/ia_roast_box/original",
        "width": 1200
      },
      "name": "Roaster's club membership",
      "payment_link_id": "pl_01KEZF7C00FEBVYY6R0DKKQRWX",
      "payment_link_type": "standard",
      "payments": {
        "enabled_payment_options": [
          "card",
          "apple_pay",
          "google_pay"
        ]
      },
      "status": "active",
      "subscription_plan_id": "plan_01KEZF7C008KKWX51R5KFPPXHD",
      "version": 1
    },
    "resolution_context": "plrc_v1.example_signed_resolution_context",
    "resolution_context_expires_at": "2026-05-13T19:00:00Z",
    "show_flint_mark": true,
    "subscription_preview": {
      "billing_interval": "monthly",
      "billing_interval_count": 1,
      "billing_interval_options": [
        {
          "billing_interval": "monthly",
          "billing_interval_count": 1
        }
      ],
      "contract_term_months": 12,
      "delivery_required": false,
      "early_termination_fee_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "line_items": [
        {
          "allow_quantity_adjustment": false,
          "max_quantity": 9999,
          "min_quantity": 1,
          "name": "Membership",
          "quantity": 1,
          "subscription_plan_line_item_id": "spli_01KEZF7C00CEPTZ7FN2H9F4SF9",
          "unit_price_money": {
            "amount": 2400,
            "currency": "USD"
          }
        }
      ],
      "plan_image": {
        "alt": "Monthly roast box",
        "height": 800,
        "url": "https://images.withflintpay.com/ia_roast_box/original",
        "width": 1200
      },
      "plan_name": "Roaster's club",
      "recurring_total_money": {
        "amount": 2400,
        "currency": "USD"
      },
      "setup_fee_money": {
        "amount": 1000,
        "currency": "USD"
      },
      "trial_period_days": 14
    }
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6SD8WS97QNDG1V09Z7SGN"
}

Was this helpful?