Use Payment Links
Publish a reusable offer and understand its complete hosted-checkout runtime flow.
A Payment Link is a reusable, Dashboard-visible checkout template. Use it when an operator can manage a published offer and your website, CRM, campaign, message, or QR code only needs a stable URL.
Creating, editing, previewing, or resolving a Payment Link does not itself create a commercial obligation. When the hosted checkout initializes, Pharos creates or resumes a concrete Checkout Session that snapshots the offer. From that point onward it uses the same checkout and payment pipeline as an API-created session.
Prerequisites
- Products and Prices exist for every item in the offer.
- The Payment Link is
ACTIVEand has not passedexpiresAt. - At least one valid payment route supports the intended country and currency.
- Branding, custom fields, promotion codes, installments, and checkout settings are configured as needed.
- A webhook endpoint is ready to receive the authoritative payment result.
Configure and publish
- Create or select the Products and Prices you want to sell.
- Create the Payment Link in Dashboard or through the Payment Links API.
- Configure the offer, custom fields, promotion codes, allowed installments, branding, and expiration.
- Activate the link and copy its hosted
/checkout/:slugURL. - Publish that URL on your site, in a campaign or message, or as a QR code.
- Complete a sandbox purchase and verify your webhook handler before going live.
<a href="https://checkout.example.com/checkout/summer-offer">
Buy now
</a>The URL is the capability that opens the offer. Keep campaign parameters on the published URL when you need attribution. A custom domain changes the public host, not the Payment Link identity or its downstream lifecycle.
Runtime flow
- Buyer → merchant channel: The buyer clicks the reusable URL on your site, campaign, message, or QR code.
- Browser → Pharos Checkout: Pharos resolves the active Payment Link and renders its hosted route without creating an invoice or payment.
- Checkout → Collections: The checkout initializes the interactive flow. Collections creates a new Checkout Session snapshot, or resumes the matching open session stored for that browser tab.
- Collections → Checkout: The snapshot supplies stable items, prices, recurrence, fields, promotion settings, installments, and expiration for this attempt. Later Payment Link edits cannot rewrite it.
- Buyer → Checkout: The buyer provides contact and billing information, selects an available country, currency, and payment method, and submits the purchase.
- Checkout → shared commerce pipeline: Pharos validates the server-owned snapshot, prepares the final quote, and creates the applicable customer, invoice, subscription, payment, and payment-attempt records.
- Pharos ↔ payment provider: The provider may return an immediate result, request another action or redirect, or leave the payment processing asynchronously.
- Pharos → buyer: Checkout shows success, processing instructions, a retryable failure, or the next required action.
- Pharos → your webhook endpoint: Lifecycle events describe the checkout attempt. Your system fulfills only after verifying the signed
purchase_succeededevent.
Reusable template and session snapshot
The Payment Link and its Checkout Sessions have independent lifecycles:
- Editing products, prices, fields, promotion settings, or installments affects only sessions created later.
- Setting the link to
INACTIVE, expiring it, or deleting it prevents new sessions. - An already-open session keeps the snapshot created for that buyer attempt until the session completes or expires.
- Refreshing the same flow can resume its matching open session; the public URL remains
/checkout/:slug. - Dashboard preview remains presentation-only and creates no Checkout Session, invoice, subscription, or payment.
Understand the outcome
Checkout Session status and paymentStatus answer different questions:
| Signal | Meaning | Fulfill? |
|---|---|---|
status=complete | The hosted buyer flow reached a completed state | Not by itself |
paymentStatus=processing | Money movement still needs an asynchronous result | No |
paymentStatus=paid | The session reflects a successful payment | Reconcile with the signed event |
paymentStatus=failed | The attempt failed and may be retryable | No |
paymentStatus=no_payment_required | A free or trial flow completed without a charge | Follow your product policy and event contract |
purchase_succeeded | Pharos emitted the authoritative successful-purchase event | Yes, after signature verification and deduplication |
A browser success page or checkout_session_completed webhook is not proof that funds were collected. Asynchronous payment methods may finish after the buyer has left checkout.
Troubleshooting
- The link is not found: Confirm the slug, active status, deletion state, and expiration.
- The offer has no valid price: Confirm every linked product has a Price and that the cart has a valid composition.
- A country, currency, or method is missing: Confirm the full cart supports it and that an enabled payment connection and route are available.
- Recent edits are not visible: Start a new attempt. An existing session intentionally keeps its original snapshot.
- A buyer appears stuck: Retrieve the related session and compare its
status,paymentStatus, and expiration before asking the buyer to retry. - Your system did not fulfill: Check signature verification, duplicate handling, delivery attempts, and whether
purchase_succeededwas received.