Payment links
A payment link is a checkout URL you create once and share with any number of buyers: in an email, on a pricing page, behind a QR code, or in a social bio. Each buyer who opens it gets their own checkout and their own order, so one link can take one payment or thousands. You don't write frontend code or make an API call for each buyer.
| Use | When |
|---|---|
| Payment link | Anyone with the URL can buy the same offer. |
| Checkout session | Your app has a specific order for a specific buyer and sends them to pay it now. |
| Invoice | A known customer owes a known amount, with a due date, reminders, and a PDF. |
Payment links vs checkout sessions vs invoices compares the three in detail. If a site without a backend used Stripe's redirectToCheckout, Stripe redirectToCheckout removed explains why it stopped working and how a payment link replaces it.
How a payment link works#
- Your backend sends 1. create the payment link, once to Flint
- Flint returns the link and its url to Your backend
- Buyer sends 2. open the url and continue to Flint
- Flint sends 3. create an order and checkout to Flint
- Buyer sends 4. pay to Flint
- Flint returns confirmation or your success URL to Buyer
- Flint sends 5. order.paid webhook to Your backend
- A link is a template, not a sale. In step 3, Flint creates a new order with
origin: "payment_link"and a checkout session with the link'spayment_link_id. You fulfill, refund, and report on each order, not on the link. - The link's metadata is copied to every order. Tag a link with
"campaign": "spring_drop"when you create it, and every order it produces carries that tag. A subscription signup keeps the link ID and campaign metadata. Renewal orders copy the original campaign, and the link's collected totals include their paid amounts. - Changes apply to checkouts that start afterward. A buyer already in checkout keeps the items and prices they started with. Deactivating the link closes its open, unpaid checkouts; payments already in progress can finish.
Create a payment link#
You need a test API key with the checkouts.payment_links.write scope. Reading and listing links needs checkouts.payment_links.read, which the write scope includes.
A standard link needs name and line_items. A subscription signup link sends subscription_plan_id instead of line_items, and a donation link sends payment_link_type: "donation" and no line_items. Sending name alone returns 400 INVALID_REQUEST with detail REQUIRED and param: line_items. This link sells a $35 t-shirt and lets each buyer take up to five:
curl -X POST https://api.withflintpay.com/v1/payment-links \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: payment-link-spring-tee-001" \
-d '{
"name": "Spring drop: Limited Tee",
"description": "Limited release t-shirt",
"line_items": [{
"type": "custom_fixed",
"key": "tee",
"name": "Limited Tee",
"unit_price_money": {"amount": 3500, "currency": "USD"},
"allow_quantity_adjustment": true,
"min_quantity": 1,
"max_quantity": 5
}],
"buyer_fields": {"require_email": true},
"redirects": {
"success_url": "https://example.com/thanks",
"cancel_url": "https://example.com/shop"
},
"metadata": {"campaign": "spring_drop"}
}'
Flint responds with 201 Created. Abridged:
{
"data": {
"payment_link_id": "pl_01K4SPRINGTEE",
"url": "https://checkout.withflintpay.com/pay/pl_01K4SPRINGTEE",
"status": "active",
"payment_link_type": "standard",
"version": 1,
"completed_count": 0,
"name": "Spring drop: Limited Tee",
"line_items": [{
"payment_link_line_item_id": "plli_01K4TEE",
"key": "tee",
"name": "Limited Tee",
"quantity": 1,
"unit_price_money": {"amount": 3500, "currency": "USD"},
"allow_quantity_adjustment": true,
"min_quantity": 1,
"max_quantity": 5,
"is_catalog_item_unavailable": false
}],
"metadata": {"campaign": "spring_drop"}
}
}
The link takes payments as soon as Flint returns it. Save payment_link_id to manage the link later, and share url exactly as returned. In live mode, if you've set up a custom checkout domain, url uses it.
- Amounts are integers in the currency's minor unit, so
3500is $35.00. Idempotency-Keyis optional on create. If the response is lost, retrying with the same key returns the original link instead of creating a second one. See Idempotency.keynames the line item in checkouts you start from code and on every order line item the link creates. Without one, Flint assignsline_item_1,line_item_2, and so on, in order. Set your own keys so they read well in your reports.- Settings you leave out come from your checkout settings when each checkout starts: payment methods, tips, tax, promotions, and how long a checkout stays open. To keep a link's total fixed whatever those settings are, set
"tip": {"enabled": false}and"tax": {"enabled": false}on it.
Price each line item#
Each line item gets its price in one of three ways:
Send type custom_fixed with name and unit_price_money. Nothing needs to exist in your catalog first.
{
"type": "custom_fixed",
"key": "tee",
"name": "Limited Tee",
"unit_price_money": {"amount": 3500, "currency": "USD"}
}
A custom line can also send product_type, one of physical, digital, service, or fee. It tells Flint what kind of sale the line is, which decides whether a buyer can pay by ACH debit. Leave it out and the line is unclassified, so that order takes card only unless a physical or digital line sits beside it. Catalog lines take their type from the product.
Send type variant with a product variant's variant_id, or type bundle with a bundle's bundle_id. The name and price come from your catalog when each checkout starts, so a catalog price change applies to the link without editing it.
{
"type": "variant",
"key": "kit",
"variant_id": "var_01K4BREWKIT"
}
The link returns the catalog's current values as resolved_name and resolved_unit_price_money, and sets is_catalog_item_unavailable to true while the variant or bundle is missing or inactive. A catalog line item can't also send name, description, unit_price_money, tax, or buyer-chosen price fields; the request fails with 400 INVALID_REQUEST and detail code NOT_ALLOWED. Catalog setup creates variants and bundles to sell. To let the buyer pick among a product's variants, such as its sizes, send variant_ids instead.
Send type custom_variable, set allow_unit_price_adjustment, and let the buyer enter the price, within min_unit_price_money and max_unit_price_money. Up to three suggested_unit_price_money_options appear as buttons, and each must fall within the range. unit_price_money, if you send it, is the starting amount. A maximum must be greater than zero and at least the minimum. Omit the maximum for no upper limit.
{
"type": "custom_variable",
"key": "zine",
"name": "Pay what you want: Issue 4",
"allow_unit_price_adjustment": true,
"min_unit_price_money": {"amount": 300, "currency": "USD"},
"suggested_unit_price_money_options": [
{"amount": 500, "currency": "USD"},
{"amount": 1000, "currency": "USD"},
{"amount": 2000, "currency": "USD"}
]
}
For a page that only collects an amount, use a donation link.
Quantity works the same way for all three. quantity is what the buyer starts with, 1 by default. allow_quantity_adjustment lets the buyer change it between min_quantity and max_quantity, which can each be 1 to 9,999. A buyer can't lower a line item on a standard link to zero; only event tiers can be skipped.
Let buyers choose a variant#
Send variant_ids instead of variant_id to sell one product in several sizes or colors on a single line item. The checkout page shows a control for each of the product's options. The buyer's order gets an ordinary line for the variant they pick, with that variant's price, selected_options, tax, and delivery requirement.
This link offers three sizes of a tee, opens with medium selected, and routes stock from one location. The tee's variants are physical, so the link needs a delivery method, or it returns 409 ACTION_NOT_ALLOWED. A new account has none, so create a delivery method first and send its ID in delivery_method_ids, as the sample does. You can set settings.checkout.default_delivery_method_ids instead; Configure delivery and inventory before sharing describes both:
curl -X POST https://api.withflintpay.com/v1/payment-links \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: payment-link-classic-tee-001" \
-d '{
"name": "Classic tee",
"line_items": [{
"type": "variant",
"key": "tee",
"variant_ids": ["var_01K4TEESMALL", "var_01K4TEEMEDIUM", "var_01K4TEELARGE"],
"default_variant_id": "var_01K4TEEMEDIUM",
"quantity": 1,
"allow_quantity_adjustment": true,
"max_quantity": 5
}],
"delivery_method_ids": ["dmet_01K4STANDARD"],
"inventory_routing_source": {"type": "fixed_location", "location_id": "loc_01K4WAREHOUSE"}
}'
The line item in the response, abridged. The variant IDs come back in the order you sent them, and product_id names the product they belong to:
{
"payment_link_line_item_id": "plli_01K4CLASSICTEE",
"key": "tee",
"variant_ids": ["var_01K4TEESMALL", "var_01K4TEEMEDIUM", "var_01K4TEELARGE"],
"default_variant_id": "var_01K4TEEMEDIUM",
"product_id": "prod_01K4CLASSICTEE",
"resolved_name": "Classic tee",
"resolved_price_range": {
"min_unit_price_money": {"amount": 2400, "currency": "USD"},
"max_unit_price_money": {"amount": 2600, "currency": "USD"}
},
"quantity": 1,
"allow_quantity_adjustment": true,
"max_quantity": 5,
"is_catalog_item_unavailable": false
}
A line item has one source: variant_id, variant_ids, bundle_id, or an ad hoc name and price. These rules apply to variant_ids:
- The list. Send 1 to 100 unique
var_IDs. All must be variants of one product, active and available for sale when you save, and priced in one currency. Flint keeps the order you send. Flint doesn't offer "all variants" as a setting, so list every variant you want to sell and add new ones with aPATCH. - The default.
default_variant_idis optional and must be one ofvariant_ids. Without it, no variant is selected when the page opens and the buyer must choose. It's allowed only withvariant_ids. APATCHreplacesline_itemsas a whole, so a line you send back withoutdefault_variant_idhas none. When a checkout start doesn't pick a variant for a line that has a default, Flint uses the default. - Everything else on the line.
quantity,allow_quantity_adjustment,min_quantity,max_quantity, andkeyapply to whichever variant the buyer picks. The catalog owns the name, description, price, and tax, as for avariant_idline. - One variant per line. A buyer who wants a small and a medium checks out twice, or you add the product as two line items.
- Standard links only. An event link refuses
variant_ids, and donation and subscription signup links have no line items. - Stock. If any listed variant tracks inventory, the link needs an
inventory_routing_source, the same as avariant_idline, unlesssettings.inventory.default_routing_sourcesupplies one. Inventory covers how stock is checked and held.
When you read the link, the line returns these fields:
resolved_nameis the product name, without a variant label.resolved_unit_price_moneyis omitted, because no single price describes the line.resolved_price_rangegives the lowest and highest current price across the listed variants that can be sold now in the line's currency. It's omitted when none can be.is_catalog_item_unavailableistruewhen none of the listed variants can be sold: the product is inactive or archived, or every listed variant is.
payment_link.created and payment_link.updated carry the same line. The order a buyer's checkout creates has an ordinary variant line, with variant_id, product_id, selected_options, and payment_link_line_item_key, so order webhooks, fulfillment, and refunds work as for any catalog line.
When the catalog changes.
- A listed variant that becomes inactive or archived drops out of what buyers can choose, and a checkout that picks it is refused. The link keeps selling the others. If it was the default, the page opens with nothing selected.
variant_idsstill lists its ID. - Flint blocks deactivating or archiving a variant only when that would leave a
variant_idsline on an active link with no active listed variant. The request returns409 RESOURCE_IN_USE, anddetails[0].blocking_resourceslists thepayment_link. A variant on avariant_idline is blocked as before. Deactivating or archiving the product is blocked while an active link has avariant_idsline for it. - Price changes apply to the next read and checkout start, as for
variant_idlines. - Stock doesn't change the link. A sold-out variant is flagged in the public read, and buyers can still choose the others. When every listed variant is sold out, the line's
is_sold_outistrue, which makes the link sold out too (see Sold-out state).
Share the link#
Use url wherever a buyer can tap or scan it: buy buttons and pricing pages, email and SMS campaigns, QR codes on packaging and posters, social bios, and support conversations. In test mode the URL opens a checkout that takes test cards.
The URL never changes. When an offer has to end at once for everyone, such as a price change mid-campaign, create a new link and deactivate the old one rather than editing it. Buyers who open the old URL see your inactive_message.
Add client_reference to carry your buyer or cart reference and prefill_email to fill in the next step's email field:
https://checkout.withflintpay.com/pay/pl_01K4SPRINGTEE?client_reference=cart_1842&prefill_email=ada%2Btag%40example.com
URL-encode each value. A bare + in a query string reads as a space, so encode a literal + as %2B, as in the example's ada+tag@example.com. client_reference is an opaque string of 1 to 255 characters, preserved exactly, including spaces and case. Flint copies it to the checkout session and order. Anyone with the URL can change both parameters, so the reference is a claim, not proof of identity. Validate it against your own records before crediting an account. The hosted page drops an empty or over-long reference, a reference containing a NUL character, and a malformed email, and writes a browser console warning that names the parameter. Checkout continues without that value. A resolve request that carries an invalid value returns an error instead.
The prefilled email is editable and unverified. It sets no customer_id, shows no saved customer details, and never links a purchase to an existing customer. Checkout doesn't look the address up or send it a code when the page opens, so opening a link reveals nothing about whether that address has saved details. The order and its payments use the email the buyer submits, which may differ from the prefill.
Choose a link type#
A link's type decides what the buyer sees before checkout. Set it when you create the link; it can't change afterward.
| Link | Create it with | The buyer sees |
|---|---|---|
| Standard | line_items | Each item, with a quantity picker where you allow one |
| Donation | payment_link_type: "donation" | An amount picker |
| Event | payment_link_type: "event" and line_items as ticket tiers | The date, venue, and a count for each tier |
| Subscription signup | subscription_plan_id instead of line_items | The plan's recurring price and terms |
Take donations#
A donation link asks for one amount. Configure it with the top-level donation fields, not line_items:
curl -X POST https://api.withflintpay.com/v1/payment-links \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: payment-link-annual-fund-001" \
-d '{
"name": "Annual Fund",
"payment_link_type": "donation",
"donation_suggested_amount_money_options": [
{"amount": 2500, "currency": "USD"},
{"amount": 10000, "currency": "USD"},
{"amount": 50000, "currency": "USD"}
],
"donation_min_amount_money": {"amount": 500, "currency": "USD"},
"metadata": {"fund": "annual_2026"}
}'
- Flint creates the line item. It has the key
donationand the link'snameas its label. Sendingline_itemsreturns400 INVALID_REQUESTwith detail codeNOT_ALLOWED. - Amounts. Offer up to three suggested amounts, each within
donation_min_amount_moneyanddonation_max_amount_moneywhen you set them. Use the same supported currency for the minimum, maximum, and suggested amounts. Flint currently supports USD. An unsupported currency returns400 INVALID_REQUESTand names the field on create or update. On update, a supported currency that conflicts with a retained amount returns400 INVALID_REQUESTwith detail codeNOT_ALLOWEDon the submitted field. A maximum must be greater than zero and at least the minimum. A zero minimum is allowed. Omit the maximum on create or sendnullon update for no upper limit. A maximum outside the range returns400 INVALID_REQUESTwith detail codeINVALID_VALUEondonation_max_amount_money. - No tips, tax, or promotions. Flint turns them off. Sending
"enabled": truefor any of them, or atax.calculation, returns400 INVALID_REQUESTwith detail codeNOT_ALLOWED. - A thank-you page. Without a
redirects.success_url, donors land on Flint's thank-you page after paying.
Donation receipts. Set a receipt note in Dashboard under Settings → Buyer account and emails → Receipts. Set the organization's legal name and EIN under Settings → Invoices → Tax identity. For the API, read the current version with GET /v1/settings, then send settings like these to PATCH /v1/settings:
{
"expected_version": 3,
"receipts": {
"footer_text": "No goods or services were provided in exchange for this contribution."
},
"tax_identity": {
"legal_name": "Example Community Fund",
"tax_ids": [
{"country": "US", "identifier_type": "ein", "value": "12-3456789"}
]
}
}
Use your own acknowledgment and tax details. Sending tax_ids replaces the entire list. Keep any existing entries you still use, including their document_tax_id values. The note and seller identity appear on payment receipt emails and PDFs. See receipt notes and seller identity for how Flint handles resends and earlier orders.
Monthly gifts. Donation links collect a single gift. For monthly giving, create a monthly subscription plan for each amount you offer. Create a subscription signup link for each plan by passing its subscription_plan_id. Set plan change options if donors should be able to switch amounts in their buyer account.
Campaign totals. Open the donation link in Dashboard to see Raised. To list its orders through the API, call GET /v1/orders?payment_link_id=YOUR_PAYMENT_LINK_ID.
Sell event tickets#
Price each tier per admission: each purchased unit issues one ticket and uses one place. Event tiers reject catalog bundles and variants with component quantities with a 400 naming the line item field. To sell two admissions, use a tier priced per ticket and let the buyer select a quantity of two.
An event link sells ticket tiers that share a capacity. Its page shows the event's date and venue and a count for each tier. For the whole ticket workflow, from QR codes to check-in staff, door scanners, and refunds, see Sell event tickets with QR code check-in.
curl -X POST https://api.withflintpay.com/v1/payment-links \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: payment-link-spring-gala-001" \
-d '{
"name": "Spring Gala",
"payment_link_type": "event",
"event_config": {
"event_at": "2027-05-12T23:00:00Z",
"timezone": "America/New_York",
"venue": "Pier 57, New York",
"max_total_quantity": 500,
"ticket_prefix": "GAL",
"send_ticket_emails": true
},
"line_items": [
{
"type": "custom_fixed",
"key": "general",
"name": "General Admission",
"unit_price_money": {"amount": 7500, "currency": "USD"}
},
{
"type": "custom_fixed",
"key": "vip",
"name": "VIP",
"unit_price_money": {"amount": 20000, "currency": "USD"},
"max_quantity": 4,
"max_total_quantity": 20
}
]
}'
Checkout shows this event as "Wed, May 12, 2027, 7:00 PM EDT (New York time)".
Time zone.
event_atandtimezoneare required to create an event link.event_atis an RFC 3339 timestamp, andtimezoneis an IANA name. Flint shows the event in that time zone at checkout and in ticket emails.Sales end. Ticket sales close at
event_atunless you setsales_end_at, for example to stop sales an hour before doors open or to keep selling during the event. See Control availability.Tiers. Each tier starts at 0 and lets the buyer choose up to
max_quantity, 10 by default. The buyer can skip tiers but must choose at least one ticket. A tier withmin_quantityabove 10 needs an explicitmax_quantity.Capacity.
event_config.max_total_quantitycaps tickets across all tiers. Starting payment holds the buyer's tickets until the payment succeeds or fails, and those held tickets count against the cap. Opening checkout doesn't hold tickets, so a buyer can reach the payment step and find too few left. When 20 or fewer tickets remain, the page shows how many are left. The link'stotal_quantity_soldcounts tickets sold.Changing capacity. You can raise
event_config.max_total_quantityat any time, or sendnullto remove the limit. Lowering it below the tickets already sold or held returnsLIMIT_EXCEEDED.ticket_prefixcan't change after the first ticket is issued.Tickets. After paying, the buyer lands on a ticket confirmation page. Your
redirects.success_url, if set, becomes its Continue button. Checkout always asks event buyers for their email. Withsend_ticket_emails, Flint also emails their tickets. Ticket numbers areticket_prefix, up to five characters, followed by a three-digit sequence:GAL001,GAL002. Flint issues the numbers after the payment succeeds. Read them from the order'sticketed_event.ticket_numbers;ticketed_event.ticket_statusispendinguntil they exist. Each number is also a ticket record with its own ID.Attendee names. Set
event_config.collect_attendee_namestotrueto name every ticket. In the Dashboard, turn on Collect attendee names in the link's event settings. Hosted Checkout then shows a name field for each ticket, grouped by ticket type, and won't continue until each has a name. If you build your own checkout, resolving the link requiresattendee_names: one name per ticket, inline_itemsorder, skipping tiers the buyer didn't choose. For 2 General Admission tickets and 1 VIP ticket, send the 2 General Admission names, then the VIP name. Flint trims each name, which must then be 1 to 200 characters. A missing list returns400withparamattendee_names; a list with the wrong count returnsINVALID_VALUEatattendee_names, and a name that is empty or too long returnsINVALID_VALUEat its own position, such asattendee_names[1]. When the setting is off, you can still sendattendee_namesif you collect names yourself; Flint validates them the same way. When the payment succeeds, Flint copies each name to its ticket'sattendee_name. Names never appear in order or checkout metadata. If the order's ticket count changed after resolve, Flint still issues the tickets, withattendee_nameset tonull.Tier capacity. Set a tier's
line_items[].max_total_quantityto cap its admissions across all orders. For a 200-seat show with 20 VIP places, setevent_config.max_total_quantityto200and the VIP tier'smax_total_quantityto20.max_quantitystill limits one order. Each payment reserves both the tier and show capacity. A tier cap must be at least1and cannot exceed the show cap when one is set.Tier availability. The public read includes
remaining_quantityandis_sold_outon each event tier. Flint subtracts tickets sold and held by payments in progress from the tier and show limits, and returns the lower remainder. It is absent when neither limit is set. A payment that cannot fit its tier returns409 INVENTORY_INSUFFICIENT, with the tier key in the message and requested and available quantities. Voiding a ticket or fully refunding an order releases its tier capacity as well as its show capacity.Changing a tier cap. Replace
line_items, retaining each tier'spayment_link_line_item_idand sendingexpected_version. Omit a tier'smax_total_quantityto remove its cap. Lowering a cap below tickets sold or held returnsLIMIT_EXCEEDED. Keep the tier'spayment_link_line_item_idto rename itskey. Tickets and reserved capacity follow that ID. Some earlier purchases were tracked by key. If those tickets or payments in progress still use the old key, changing it returns400 INVALID_REQUESTwith detailNOT_ALLOWEDuntil those admissions are released.
Reschedule an event#
Change event_config.event_at, timezone, or venue with PATCH /v1/payment-links/{payment_link_id}. Existing orders' ticketed_event, buyer tickets, and ticket emails use the new details. Ticket numbers and admission codes stay valid. Each affected order sends order.updated, with the former event details in data.previous_attributes.ticketed_event.
Flint emails each order's ticket holder by default, even when send_ticket_emails is off. To handle notices yourself for one update, include "notify_ticket_holders": false in that PATCH. Omitting it on a later update restores notifications. Repeating unchanged event details sends no notice. Voided tickets receive no change notice.
{
"event_config": {
"event_at": "2027-05-14T23:00:00Z",
"timezone": "America/New_York",
"venue": "Lantern New Hall"
},
"notify_ticket_holders": true
}
To cancel a show, deactivate its link to stop new sales and refund its orders. A ticketed order's refund email names the event and its date. Deactivating a link alone does not refund tickets or send a cancellation notice.
Read individual tickets#
Flint creates one ticket for each ticket the buyer purchased, at the same moment it issues the numbers. A ticket has its own ticket_id with the tkt_ prefix, and you can read it without knowing its order. Use the tickets API with a key that has commerce.tickets.read, or commerce.tickets.write to change tickets; neither scope includes access to orders or refunds.
| Field | Meaning |
|---|---|
ticket_id, version | The ticket's ID and a counter that increases on every change. |
order_id, payment_link_id, order_line_item_id | The order, the event link, and the ticket tier that was purchased. |
tier_name | The name of the ticket tier the buyer purchased, when available. |
ticket_number | The number printed for the buyer, such as GAL001. Numbers are never reused, and a number alone doesn't admit anyone. |
status | issued, checked_in, or voided. voided is final. |
supported_actions | The actions the ticket accepts now: check_in and void while issued, undo_check_in and void while checked_in, and none once voided. |
attendee_name | The attendee's name, or null. Set or clear it with PATCH /v1/tickets/{ticket_id}. |
checked_in_at, check_in_method | When and how the ticket was admitted. null unless status is checked_in. |
voided_at | When the ticket was voided. null unless status is voided. |
admission_code_last4 | The last four characters of the ticket's admission code. |
An admission code is a secret that identifies one ticket. Merchant reads, lists, and webhooks never include it. Only the ticket's buyer gets the full code, and only where they proved themselves. The paid checkout session's own paying credential reads it on its order's tickets; a checkout link you read from the checkout session, or request after payment, doesn't. GET /v1/me/tickets returns it to a buyer whose email Flint verified, by signing in to Flint's hosted account or through the paid checkout, on orders whose buyer_email is that email. Ticket and receipt emails sent to the order's buyer_email, with no one copied, show each valid ticket's code with a QR code that holds it. Access links, customer sessions and checkout links you create never carry codes, and a receipt you send to another address lists the ticket numbers without them. To deliver tickets from your own pages, issue a code with rotate-code. Flint doesn't log it, and it stays out of URLs and filters, so look a ticket up by sending the code in a request body.
GET /v1/tickets/{ticket_id}returns one ticket.GET /v1/ticketslists tickets, newest first. Filter bypayment_link_id,order_id,status(one or several values), andchecked_in_afterorchecked_in_before.querymatches part of the ticket number, the attendee name, the buyer's name, or the buyer's email, ignoring case. Setsort_bytocreated_at(the default) orattendee_name, andsort_directiontoascordesc.expand=orderadds an order summary and also requirescommerce.orders.read. See Pagination.POST /v1/tickets/lookupreturns the ticket for theadmission_codein the request body, whatever its status. Flint accepts the code in lowercase, with spaces or hyphens, and readsOas0andIorLas1. A code that isn't 16 valid characters returns400 INVALID_REQUESTwith detail codeINVALID_VALUE, and a code that matches no ticket in the key's environment returns404 RESOURCE_NOT_FOUND, both withparamset toadmission_code. A code from another merchant, or from the other environment, is not found.
curl "https://api.withflintpay.com/v1/tickets?payment_link_id=pl_01K4GALA&status=issued&sort_by=attendee_name&sort_direction=asc" \
-H "Authorization: Bearer YOUR_API_KEY"
Check in and void tickets#
A key with commerce.tickets.write runs the door. To scan from the Dashboard or give staff check-in-only access, see Run the door.
POST /v1/tickets/{ticket_id}/check-inadmits anissuedticket once. Send the scannedadmission_codeto confirm it belongs to the ticket, or no code to check the ticket in by hand. A repeated or concurrent check-in returns409 ACTION_NOT_ALLOWEDwith reasonalready_appliedandcurrent_status: checked_in, and a wrong code returns400 INVALID_REQUESTwith detail codeINVALID_VALUEwithout changing the ticket.POST /v1/tickets/{ticket_id}/undo-check-inreturns a checked-in ticket toissued.POST /v1/tickets/{ticket_id}/voidpermanently voids a ticket and frees its seat:total_quantity_solddrops by one, as it does for a refund, and the link'sversiondoesn't change. Voiding refunds nothing and doesn't change the order'sticketed_event.POST /v1/tickets/{ticket_id}/rotate-codereplaces the ticket's admission code and returns the new one inadmission_code. If you send your own tickets withsend_ticket_emailsoff, use it to get each ticket's code.
A voided ticket refuses every other change with reason unsupported_state; voiding it again returns already_applied. See Tickets for the codes, versions, and retries.
Flint sends ticket.created when it issues a ticket, ticket.checked_in when one is checked in, ticket.voided when you or a full refund void one, and ticket.updated for other changes, such as an attendee name edit, an undone check-in, or a replaced code. Every event carries the ticket as a read returns it, without the code.
Sell event tickets on your own page#
Event links are the only way to issue tickets, so a venue that renders its own ticket page still starts from the link. Resolving the link returns a hosted session, and that session's cklt_ launch token is a credential only for Flint's hosted page. Used as a buyer credential on your own page, it returns 403 FORBIDDEN with reason checkout_launch_token_restricted, and creating a headless session for the resolved order returns 409 ALREADY_EXISTS, because the hosted session is open. Replace the hosted session with a headless one from your backend instead:
The sale counts the same as a hosted one. The link's completed_count, total_quantity_sold, and sales summary include it, and its order keeps origin: "payment_link" and payment_link_id. The headless session itself has type: "order" and no payment_link_id, so list a link's sales with GET /v1/tickets?payment_link_id=... or through its orders, not through its checkout sessions.
Subscription signup links#
Send subscription_plan_id instead of line_items, and the link becomes a signup page for a subscription plan. Each completed checkout starts a subscription for that buyer:
curl -X POST https://api.withflintpay.com/v1/payment-links \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: payment-link-coffee-club-001" \
-d '{
"name": "Coffee club signup",
"subscription_plan_id": "plan_01K4COFFEE",
"metadata": {"channel": "pricing_page"}
}'
Create one link per plan and use it everywhere that plan is sold, such as pricing pages and upgrade prompts. The plan must be active: an inactive or archived plan returns 409 ACTION_NOT_ALLOWED with reason archived or unsupported_state. While the link is active, the plan can't be set to inactive or archived. The link reports payment_link_type: "standard" with its subscription_plan_id, and you can't add line_items to it later.
The buyer's email decides which customer owns the subscription only when no customer has that email: Flint then creates one. When the email belongs to an existing customer, the buyer confirms it with a six-digit code Flint emails them before checkout takes payment or saves the card, and hosted checkout shows that step. The buyer enters the code, then presses Pay again; their payment details are kept. A typed or prefilled email never attaches a subscription to an existing customer without that verification. To sign up a known customer without a code, create a checkout session for them with customer_id instead of sharing the link. When nothing is due at signup, such as a free trial without a setup fee, checkout saves the card without charging it. Tips are off on signup links unless you turn them on. Subscription billing covers plans, trials, and renewals.
Ask buyers questions#
Custom fields add your own questions to the link's page: a shirt size, a meal choice, an accessibility note. Each field has a custom_field_type of text, textarea, dropdown, or checkbox, and works on every link type.
A checkbox answer in custom_field_values must be "true" or "false". A required checkbox must be checked, with an answer of "true". Flint's hosted checkout sends "false" for an optional box the buyer leaves unchecked.
curl -X POST https://api.withflintpay.com/v1/payment-links \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: payment-link-workshop-001" \
-d '{
"name": "Letterpress Workshop",
"line_items": [{
"type": "custom_fixed",
"key": "seat",
"name": "Workshop seat",
"unit_price_money": {"amount": 12000, "currency": "USD"}
}],
"custom_fields": [
{
"key": "experience_level",
"label": "Experience level",
"custom_field_type": "dropdown",
"required": true,
"options": ["Beginner", "Intermediate", "Advanced"]
},
{
"key": "accessibility_needs",
"label": "Accessibility needs",
"custom_field_type": "textarea",
"placeholder": "Optional",
"max_length": 500
}
],
"metadata": {"campaign": "fall_workshops"}
}'
Flint records the answers on the order, and on its checkout sessions, in custom_field_answers. Each answer keeps the field's payment_link_custom_field_id, key, label, and custom_field_type from when checkout started, so editing or removing a field later doesn't change answers already recorded. value is a string for text, textarea, and dropdown answers, and true or false for checkbox answers:
{
"metadata": {"campaign": "fall_workshops"},
"custom_field_answers": [
{
"payment_link_custom_field_id": "plcf_01K4W8TSHRTS2ZEQ7XN5V3D2JA",
"key": "experience_level",
"label": "Experience level",
"custom_field_type": "dropdown",
"value": "Beginner"
}
]
}
Answers come in the order the link shows its fields. Optional fields the buyer left blank are left out. Answers are read-only and returned only to merchant credentials, including webhook delivery; buyers never see them in API responses. Deleting the customer removes them. Orders created before Flint recorded answers in custom_field_answers return an empty list and keep their answers in metadata as custom_field_<key>; Flint doesn't rebuild them from the link, because its questions may have changed since.
The buyer can't continue to payment without answering a required field. Answers don't use the order's metadata space, so each field has its own limits:
| Limit | Value |
|---|---|
| Custom fields on a link | 20 |
Field key | 243 characters, no leading or trailing spaces |
text answer | 255 characters by default; set max_length from 1 to 4,096 |
textarea answer | 1,000 characters by default; set max_length from 1 to 4,096 |
dropdown option | 4,096 characters |
| Link metadata pairs | 44, because Flint uses 6 of an order's 50 metadata pairs |
| Link metadata and Flint's metadata | 32,768 bytes |
Custom fields don't count toward the two metadata limits. If a link goes over a limit, Flint rejects it with 400 INVALID_REQUEST and detail code INVALID_VALUE. Remove fields, shorten them, or trim metadata.
On update, these limits apply to the link after Flint merges your changes. The metadata object you send in a PATCH is also limited before merging: at most 50 keys, counting null deletions, each key up to 256 characters, and 32,768 bytes of keys plus values.
Configure delivery and inventory before sharing#
Creating a link, activating it, or editing its line_items, delivery_method_ids, or inventory_routing_source checks that the current configuration allows checkout. Missing or incompatible delivery configuration, or a routing source with no location that permits inventory allocation, returns 409 ACTION_NOT_ALLOWED with reason configuration_required and retry none.
Set delivery_method_ids on the link or settings.checkout.default_delivery_method_ids to cover each item's delivery profile. Pickup-only profiles need a pickup method; digital or service fulfillment resolved without a checkout choice needs no delivery method. A bundle must cover every component that requires a delivery choice. A variant_ids line remains usable when at least one offered variant has compatible configuration.
A method you add to delivery_method_ids must be usable now. If its revision, the rate callback revision or signing key it prices with, or a Location address it uses is revoked, the write returns 409 ACTION_NOT_ALLOWED with reason dependency_revoked before the configuration checks, and details[0].blocking_resources names the method and what holds the revoked part. Methods the link already lists stay on it; buyers see them as unavailable until you publish a corrected revision.
Every required line must have a usable option. Event buyers can skip adjustable tiers, so an unusable optional tier does not block these writes when another tier can be checked out. A link whose every permitted selection is unusable is refused.
Tracked goods also need an inventory_routing_source with at least one active location whose inventory_allocation_enabled is true. Untracked and ad hoc items need no allocation check. Temporary stock shortages do not prevent creating or editing the link; stock is checked again when a buyer starts checkout.
Read details[0].resource_type and resource_id to find the blocking configuration, and follow remediation.next_actions when a separate write is required. Clearing delivery_method_ids uses the checkout defaults and fails if those defaults cannot cover delivery. You can still rename, edit metadata, or deactivate a link that needs configuration.
For a pinned inventory policy revision, enable allocation at an active location in that revision or change the link's inventory_routing_source, for example to the current policy revision. Publishing a new policy revision does not change the link's pin.
Customize the checkout page#
Every setting can be sent on create and changed later. The API reference describes each field.
| Area | Fields | What it controls |
|---|---|---|
| Branding | theme.title, theme.primary_color, theme.accent_color, image | The page title, colors, and a product or campaign image. A color you leave out comes from your checkout branding settings. |
| Copy | description, custom_text.order_summary_message | Text beside the offer and in the order summary. |
| Payment methods | payments.enabled_payment_options, payments.payment_note | Which of card, apple_pay, google_pay, affirm, and ach_debit the page offers, from those your settings allow, and a note near the pay button. |
| Buyer details | buyer_fields.require_email, buyer_fields.require_phone, buyer_fields.require_billing_address, buyer_fields.address_autocomplete_enabled | Whether checkout requires the buyer's email, phone number, or billing address, and whether address entry suggests addresses. A field you leave out follows your checkout settings. |
| Tips | tip.enabled, tip.tip_percent_options, tip.smart_tips_enabled | The tip prompt. Percent options are exactly three values from 1 to 100, and a preselected percent must be one of them. Fixed amounts share one currency; a checkout shows only those in its own currency. |
| Tax | tax.enabled, tax.calculation | Whether checkout calculates tax, and how: {"mode": "automatic"}, or {"mode": "external", "components_source": "callback"} to ask your tax calculation callback for each checkout's order. External tax needs components_source: callback. Without calculation, checkouts follow tax.default_calculation in settings, where a provided default means automatic. On update, "calculation": null clears it. A subscription plan link's subscriptions copy the tax the link sets; without it they follow settings. |
| Promotions | promotion_config.automatic_enabled, promotion_config.codes_enabled | Automatic promotions, and whether the page shows promotion code entry. |
| Delivery | delivery_method_ids | The delivery methods offered for physical catalog items. Without a list, the link uses your checkout default. |
| Legal | legal.terms_of_service_url, legal.require_terms_of_service, legal.refund_policy_url, legal.shipping_policy_url | Policy links, and whether the buyer must agree to your terms. |
| Redirects | redirects.success_url, redirects.cancel_url, redirects.expired_url | Where the buyer goes after paying, after leaving, and after their checkout expires. Flint adds checkout_session_id and order_id query parameters to the success URL. |
| Checkout lifetime | checkout_session_expires_in_seconds | How long each checkout the link starts stays open. |
| Your references | metadata, external_reference_id, client_reference on resolve | Tags copied to every order, your own ID for the link, and the buyer or cart reference for one checkout. GET /v1/payment-links?external_reference_id=... finds the link. |
Buyer details are deliberately limited, because anyone with the URL can open the link. A shipping address is asked for when the buyer picks a delivery option that ships, so there is no separate setting for it. Use prefill_email on the hosted URL or prefill.email on resolve to fill in an editable email. To bind a known customer with customer_id, create a checkout session for that buyer instead.
When a link's checkouts take tax from your callback and no callback is selected in tax.calculation_callback_id, opening the link returns 409 ACTION_NOT_ALLOWED with reason configuration_required and resource_type tax_calculation_callback, so the buyer can't reach a checkout whose tax can't be calculated.
promotion_config.codes_enabled follows your checkout settings when you leave it out. When both leave code entry unset, resolved sessions retain null and offer entry only while an active code promotion exists in the same environment. Read can_apply_promotion_code on the session; a promotion activated after checkout opened appears on its next read. A valid code still applies with null, whatever the hint last reported. Send true or false to override them for this link, or null in a PATCH to follow your settings again. If your settings turn promotion codes off, sending true returns 409 ACTION_NOT_ALLOWED with reason configuration_required. If you turn codes or automatic promotions off later, links saved with true keep opening without them, and edits to other fields still succeed. Open checkout sessions stop accepting codes too.
Control availability#
A link keeps taking payments until you stop it or its sales end. There is no delete; use one of these instead.
Schedule sales. Set sales_start_at to an RFC 3339 timestamp with a time zone offset. Before that instant, the public link returns is_before_sales_start: true, hosted Checkout shows the opening time, and resolve returns 409 ACTION_NOT_ALLOWED with details[0].reason set to sales_not_started. The opening time is in payment_link.sales_start_at. Read the link again at or after that time to get a fresh resolution context. The start must be earlier than the sales end, including an event's start when no explicit end is set. To clear it, send "sales_start_at": null in a PATCH.
Set a sales end. sales_end_at is an RFC 3339 timestamp after which the link stops starting checkouts. It works on every link type. Event links without it stop selling at event_at. Send null in a PATCH to remove it, or a later time to sell again. Buyers who open the link afterward see "Sales have ended", or your inactive_message when the link has one. A buyer who opened checkout before the end has 15 minutes after it to start paying.
curl -X PATCH https://api.withflintpay.com/v1/payment-links/pl_01K4SPRINGTEE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"sales_end_at": "2027-04-30T23:59:59Z"}'
Deactivate it. Set status to inactive, and set inactive_message (up to 500 characters) to tell buyers why:
curl -X PATCH https://api.withflintpay.com/v1/payment-links/pl_01K4SPRINGTEE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"status": "inactive",
"inactive_message": "The spring drop has ended. Follow us for the next one."
}'
Buyers who open the URL see "This link isn't taking payments" and your message. Set status back to active to reopen the link at the same URL.
Cap completions. max_completions stops new checkouts once that many buyers have paid. Use it for "first 100 customers" offers and capped registrations. When payment starts, Flint also counts payments in progress, so buyers paying at the same moment can't go over the cap. A link that reaches its cap stays active, and new buyers see "This link has reached its limit". Raise max_completions, or send null to remove it, to reopen the link. You can't set it below the link's completed_count.
Limit each checkout. checkout_session_expires_in_seconds is the lifetime of each checkout session the link starts, not of the link. From 60 to 86,400, it limits how long each buyer's checkout stays open after it starts. It defaults to your checkout settings, or 24 hours. redirects.expired_url is where a buyer lands if their checkout expires. The link keeps taking new checkouts after one expires; to stop the link selling at a set time, use sales_end_at.
When a buyer's checkout expires unpaid, Flint sends checkout_session.expired. For standard, donation, and event links, it also closes the order with closed_reason: "checkout_expired", releases its discounts and inventory reservations, and sends order.closed. The buyer can open the link again for a new checkout.
Update a link#
A PATCH changes only the fields you send. metadata merges by key: set a key to null to remove it, or send "metadata": null to clear it. Send null to clear description, external_reference_id, image, inactive_message, max_completions, donation_min_amount_money, or donation_max_amount_money. Any other field sent as null returns 400 INVALID_REQUEST (detail INVALID_VALUE). When you replace tip.tip_percent_options or tip.smart_tip_money_options without sending a new preselection, the link's preselection is dropped if it isn't one of the new options.
curl -X PATCH https://api.withflintpay.com/v1/payment-links/pl_01K4SPRINGTEE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"description": "Final week",
"max_completions": 250
}'
line_items, custom_fields, and delivery_method_ids are replaced as a whole. Send the complete list you want, with the link's current version as expected_version:
- Include an item's
payment_link_line_item_id, or a field'spayment_link_custom_field_id, to keep it. - Leave the ID out to add a new one.
- Leave an existing one out to remove it.
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": [{
"type": "custom_fixed",
"payment_link_line_item_id": "plli_01K4TEE",
"name": "Limited Tee",
"unit_price_money": {"amount": 3000, "currency": "USD"},
"allow_quantity_adjustment": true,
"min_quantity": 1,
"max_quantity": 5
}]
}'
Every saved change increases version by one and sends a payment_link.updated webhook carrying the link, with its new version and status; creating a link sends payment_link.created. If the link changed after you read it, Flint returns 409 VERSION_CONFLICT with the link's details[0].current_version, including when another write lands while the request runs; read the link again and retry with its new version. If the write loses a race and your version still matches, Flint returns 409 CONCURRENT_MODIFICATION without param; send the same request again with the same Idempotency-Key. While a link is active, you can change an item's name, price, and quantities, but not add or remove items or change their keys or catalog sources. Those changes return 409 ACTION_NOT_ALLOWED with reason field_locked. On a variant_ids line, the product is the catalog source, so you can change variant_ids and default_variant_id on an active link as long as every listed variant belongs to the line's product. Switching a line between variant_id, variant_ids, and bundle_id, or to another product, still returns the error. Checkouts already started keep the variant line they were created with. To add or remove items, or change their keys or catalog sources, send "status": "inactive" in the same PATCH as the new line_items, then reactivate the link.
You can't change a link's payment_link_type or subscription_plan_id. Create a new link instead.
Warning: Deactivation closes unpaid checkouts
Edits to items, prices, and settings apply to checkouts that start after the update saves. Deactivating a link closes its open, unpaid hosted and headless checkouts. It also stops new payments for orders from the link, including payments made by your server. A payment already in progress can finish. Reactivating the link allows new checkouts; it does not reopen closed ones.
Fulfill and reconcile#
The buyer's success page is for the buyer. A buyer can close the tab before it loads, and anyone can open your success URL, so fulfill from webhooks or a read from your backend. Subscribe your webhook endpoint to these events:
The order.paid event carries the order, with its amounts and line items. Read the order again when you need its current state:
curl https://api.withflintpay.com/v1/orders/ord_01K4WORKSHOP \
-H "Authorization: Bearer YOUR_API_KEY"
Abridged:
{
"data": {
"order_id": "ord_01K4WORKSHOP",
"origin": "payment_link",
"payment_link_id": "pl_01K4WORKSHOP",
"client_reference": "cart_1842",
"payment_status": "paid",
"checkout_session_ids": ["cs_01K4WORKSHOP"],
"metadata": {"campaign": "fall_workshops"},
"custom_field_answers": [{
"payment_link_custom_field_id": "plcf_01K4W8TSHRTS2ZEQ7XN5V3D2JA",
"key": "experience_level",
"label": "Experience level",
"custom_field_type": "dropdown",
"value": "Beginner"
}],
"line_items": [{
"name": "Workshop seat",
"quantity": 2,
"payment_link_line_item_key": "seat"
}]
}
}
origin: "payment_link"marks orders that came from any link, andpayment_link_idnames the link. Theorder.created,order.paid, andorder.closedpayloads carrypayment_link_idtoo.client_referenceonorder.paidis the buyer or cart reference sent on the hosted URL or resolve request. It isnullwhen none was sent. It is immutable and readable only by merchant credentials, including webhook delivery. It is separate fromexternal_reference_idandmetadata. Payment intents lead to it throughorder_id; they carry no copy.metadataholds the link's metadata. The buyer's answers are incustom_field_answers, which is read-only and returned only to merchant credentials. Orders created before Flint recorded answers there keep them inmetadataascustom_field_<key>and return an emptycustom_field_answers.- Each line item's
payment_link_line_item_keyis thekeyof the link line item it came from, so match lines to the link's line items with it instead of by name. It isnullon lines that didn't come from a link line item, including lines added to the order later and lines on orders from subscription signup links.
To reconcile in bulk:
GET /v1/checkout-sessions?payment_link_id=pl_...lists every checkout one link started, with itsorder_idandstatus.GET /v1/orders?payment_link_id=pl_...lists the orders one link created. Addpayment_status=paidfor its sales.GET /v1/orders?origin=payment_linklists every order from any link. Split them by the metadata you set, such ascampaign.- The link's
completed_countis the number of paid checkouts, andtotal_quantity_soldcounts an event's tickets. Neither counts fully refunded orders.
When an order is fully refunded, Flint returns its capacity to the link: completed_count drops by one, and the order's ticketed_event.ticket_status becomes voided. Each of the order's tickets that is still valid becomes voided, and an event's total_quantity_sold drops only by the number of tickets voided this way. A ticket you voided earlier already freed its seat, so the refund doesn't free it again. Released ticket numbers aren't reissued, so the next buyer gets a new number. An order refunded before its tickets were issued is voided with no ticket_numbers. A partial refund returns no capacity, because Flint can't tell which tickets it covered.
Start checkout from your own page#
Opening url starts checkout on Flint's page. To show the offer on your own page first, such as a storefront that lets the buyer choose a quantity or an amount, read the link's public view and start the checkout yourself. Neither call takes an API key, and both allow calls directly from a browser on any origin. Their per-IP rate limit applies per buyer when each buyer calls from their own browser.
Resolve also accepts optional client_reference and prefill: {"email": "ada@example.com"}. Only email is accepted inside prefill; it must be a valid address of 1 to 320 characters. Invalid references or emails return 400 INVALID_REQUEST with INVALID_VALUE at client_reference or prefill.email. Other prefill fields return UNKNOWN_FIELD. Both are part of the request, so a different reference or email needs a new key.
Every override map is keyed by line item key:
| Field | Sets |
|---|---|
quantity_overrides | A quantity within the item's min_quantity and max_quantity. Event tiers can be 0. |
unit_price_overrides | The price of an item with allow_unit_price_adjustment. A donation link requires one. donation is the key Flint gives the donation link's one line item, so it appears as line_items[0].key. |
custom_field_values | Answers keyed by custom field key. Required fields must be answered here. Flint records them on the order and checkout session in custom_field_answers. |
modifiers | Modifier choices keyed by line item key. Each value is { "modifiers": [...] }. Each selection uses { "type": "catalog", "modifier_id": "mod_...", "quantity": 1 } or { "type": "text", "text": { "modifier_group_id": "mg_...", "value": "Extra hot" } }, matching order line item inputs. quantity is optional for catalog choices and rejected for text choices. |
variant_selections | The variant_id the buyer picked, for an item with variant_ids. |
For an item with variant_ids, send the buyer's pick in variant_selections. quantity_overrides and modifiers for that key then apply to the picked variant:
{
"resolution_context": "plrc_v1.example_resolution_context",
"variant_selections": {"tee": "var_01K4TEELARGE"},
"quantity_overrides": {"tee": 2}
}
- The picked variant must be one of the item's
variant_ids, priced in the line's currency. Itsmodifiersare checked against that variant's modifier groups. - An item with
default_variant_idcan be left out of the map and uses the default. Without a default, leaving it out returns400 INVALID_REQUESTwith detailREQUIREDandparamvariant_selections.tee. - A key that isn't an item on the link, isn't a
variant_idsitem, or names a variant outside the offered set returns400 INVALID_REQUESTwith detailINVALID_VALUEandparamvariant_selections.tee. Read the public link again, show the buyer the current choices, and start over. - The order line is created from the picked variant exactly as for a
variant_idline: the same price andselected_optionssnapshot, tax, delivery requirement, andpayment_link_line_item_key. A variant turned off since the read is refused with the same error avariant_idline gets. - Starting checkout holds no stock. It refuses a link whose top-level
is_sold_outistruewith409 INVENTORY_INSUFFICIENTand detail codeINVENTORY_INSUFFICIENT, and doesn't check the picked variant's stock otherwise. Flint checks and holds stock for the picked variant when the buyer starts payment, so a variant that sold out in between fails payment withINVENTORY_INSUFFICIENT. variant_selectionsis part of the request body for idempotency, so a different pick needs a new key.
Each call creates a real order and checkout session, so call it when the buyer chooses to check out, not to show prices.
If a call fails with no response, retry with the same context, body, and Idempotency-Key. Flint returns the same hosted checkout with an Idempotency-Replayed: true header. New hosted responses and their stored receipts include url and omit checkout_auth_token.
If Flint returns 409 VERSION_CONFLICT, the link changed after the buyer's read, and no checkout was created. Read the public link again, show the buyer the current offer, and start over with the new context. Follow the key instruction in next_steps.
Flint allows 1,000 public reads and 1,000 checkout starts per link per IP per rolling minute, plus 20 resolves per resolution_context per minute. Above either limit, it returns 429 RATE_LIMIT_EXCEEDED with Retry-After from 1 to 60 seconds. Read the link once per page view, not on a timer.
Test a link#
Create a link with a test key (flint_test_...), open its url, and pay with a test card:
If your sandbox can't take card payments yet, checkout shows "no payment methods available" instead of a card form. Check readiness.payments on GET /v1/merchant; once it reports ready, reload the page.
Then check what your backend will rely on in production: your webhook endpoint received order.paid, GET /v1/orders?origin=payment_link lists the paid order with your link's metadata, and the link's completed_count went up by one. Testing covers declines, 3D Secure, and other outcomes.
Errors#
Errors lists every code with its remediation.
Endpoints#
Next steps#
- Payment links API reference: every field on every endpoint.
- Subscription billing: plans, trials, and renewals behind signup links.
- Webhooks: receive and verify the events that drive fulfillment.
- Why Flint is orders-first: how orders anchor payments, refunds, and reporting.
A Stripe Payment Link limit counts checkouts, not tickets. Stripe event ticket tiers compares a shared seat counter of your own with event links.
Negotiated prices#
Payment links use variant quantity breaks. Customer verification during checkout preserves the prices already selected for the order; it does not apply a customer’s negotiated list.
Card-testing protection#
Flint limits unsuccessful card attempts by checkout session, card fingerprint, and billing email. The card fingerprint and email budgets apply across sessions. Hosted checkout and server payments also use the buyer IP limit. See card testing for the defaults, the 429 response, and when to deactivate a link.