What Are Payment Links?
Payment Links are URLs you can share with customers. When they click the link, a checkout session is automatically created for them. Perfect for:- Email invoices
- Social media bio links
- SMS campaigns
- QR codes
- Donation pages
Create a Payment Link
Headers
Request Body
*Not required when using
items or checkoutMode: "donation".
Example Request
Response
Branding and appearance
Payment links store the same request fields as session creation. Include an appearance object (and merchantName) on create payment link to brand every session spawned from that link. Options match Customize Appearance and the Appearance Reference.
Share the Link
Send theurl from the response to your customer:
- A new checkout session is created automatically
- They see the checkout page with the amount you specified
- After payment, they’re redirected to your success URL
Correlate Payments to Your Orders
Because a reusable link shares onepaymentLinkId across every customer, that ID alone can’t tell you which of your orders a given payment belongs to. Ozura gives you two correlation references, and they work together:
merchantReference— a per-payer value you set via a?ref=query parameter, unique to each checkout. Use it to tie a payment to a specific order or customer.merchantPayLinkReference— a static, link-level value you set once when creating the link. It comes back on every transaction from that link, so you can identify which link or campaign produced a payment.
ref query parameter when you render the link for that customer:
ref on the checkout session and returns it to you after a successful payment as merchantReference — alongside the paymentLinkId and the processor transactionId — so you can match the transaction to your order without guesswork.
This is the recommended setup for links embedded on your website (a “Pay” button, a stored link, etc.). Render the link per customer with that customer’s order ID in
ref. You choose the value.How it comes back
After payment,ref is returned inside the metadata object appended to your successUrl, as merchantReference:
Requirements for ref
Link-level reference (merchantPayLinkReference)
When you need the same value returned on every payment from a link — for example to attribute payments to a campaign, an invoice batch, or the link itself — set merchantPayLinkReference when you create the link (see the request body above):
merchantPayLinkReference in the same metadata object as merchantReference and paymentLinkId. It follows the same character/length rules as ref (max 128 chars; letters, numbers, . _ : -).
merchantPayLinkReference and ?ref= compose — a single payment can return both: the link/campaign it came from, and the specific order that payer was checking out.
Which reference should I use?
For recurring payment links there is a third reference,
merchantRecurringReference, which is tied to the subscription plan — set it in recurringConfig. It’s returned in the success metadata alongside the other two, and is also persisted on the plan so you can look the plan up by it. See Recurring Payments.Coming soon — server-to-server delivery. Today
merchantReference and merchantPayLinkReference are returned on the success redirect (above). We’re rolling out delivery of these references on your transaction webhook, plus the ability to look them up directly — so you’ll be able to reconcile orders entirely server-side, even if a customer never returns to your successUrl. No integration changes will be needed: start setting them now and they will flow through automatically the moment this lands.