Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spairehq.com/llms.txt

Use this file to discover all available pages before exploring further.

A checkout link is the fastest way to start accepting payments. Create one from your dashboard, share the URL anywhere — your site, an email, a button, a QR code — and Spaire handles the rest. Checkout links are persistent. The URL never expires. Each time a customer opens it, Spaire creates a short-lived checkout session for that visit. Copy the link once and use it forever. Go to Checkout → Links and click New link. Label — an internal name only you see. Helps you stay organized across multiple links. Products — select one or more products. When you attach multiple products, the customer can switch between them at checkout before paying. This is the recommended way to offer monthly and yearly pricing side by side. Discount — optionally attach a discount that gets applied automatically when the customer lands on the page. You can also disable discount code entry entirely if you don’t want customers to apply codes manually. Metadata — an optional key-value object stored on the checkout session and copied to the resulting order and subscription. Useful for tracking attribution or segmenting sales by channel. Click Create. Copy the URL and put it anywhere.

Share and use

The link URL looks like:
https://buy.spairehq.com/{org}/{link-id}
Drop it into:
  • A button on your pricing page
  • An email campaign
  • Your docs or README
  • A QR code
Always share the checkout link URL — not the URL of an open checkout session. Sessions are temporary and expire after one hour. If you copy the URL from an active checkout page, that link will break.

Pre-fill fields with query parameters

Append query parameters to your checkout link URL to pre-populate fields for the customer.

Customer info

customer_email
string
Pre-fill the customer’s email address.
customer_name
string
Pre-fill the customer’s name.

Pricing

amount
integer
Pre-fill the amount for pay-what-you-want (custom) pricing.
discount_code
string
Pre-apply a discount code.

Custom fields

custom_field_data.{slug}
string
Pre-fill a custom field value, where {slug} is the field’s slug from your organization settings.

Attribution

These parameters are stored automatically in the checkout session’s metadata field for analytics and attribution tracking.
reference_id
string
Your own reference ID for this session.
utm_source
string
UTM source.
utm_medium
string
UTM medium.
utm_campaign
string
UTM campaign.
utm_content
string
UTM content.
utm_term
string
UTM term.

Example

https://buy.spairehq.com/acme/pro-monthly?customer_email=jane@example.com&utm_source=email&utm_campaign=launch

What happens after payment

Once a customer completes checkout:
  • An order is created and appears under Sales → Orders
  • A customer is created automatically (or matched to an existing one by email)
  • Any benefits attached to the product are granted immediately
  • Your webhooks receive an order.paid or subscription.active event

What’s next

Embedded Checkout

Render checkout as a modal or inline widget — no redirect needed.

Checkout Sessions

Generate checkout sessions from your backend for fully custom flows.