Checkout & payment links
Ready-made, hosted pages that collect a payment without you building a payment form.
Checkout, Payment Links and an invoice's hosted page are pages you send a buyer to so they can pay — no payment form to build, no card data to handle yourself.
How it works
- Checkout: you create a session from
an Invoice, or from prices you sell with
line_items(as Stripe Checkout does); the customer opens the hosted URL, picks an allowed payment method, and pays. The actual provider is only decided at the moment they pay. - Payment Links: create a link from prices you sell. It is reusable: anyone can open it, any number of times, and each visit is a checkout session of its own, as at Stripe. Share one link in a chat, a social post or a QR code and every buyer pays separately.
- Hosted invoice page: every finalized invoice
has a
hosted_invoice_url, as at Stripe. Anyone with the link can open it and pay; no login required, because the link itself is the credential. Send the invoice to email it, or share the URL yourself. - All three webhook back to you once payment completes. You can retrieve a Checkout session or expire it early.
There's also Lodash Link — saved cards a customer can reuse across different merchants on the platform via a one-time OTP, useful for one-time SDK checkout sessions without a full account.
Payment Links
A link sells the line_items you create it with, up to 20 in one currency:
either all one-time prices, or all recurring prices on the same interval. Opening
its url creates nothing until the buyer presses pay; only then is a payment
intent, invoice or subscription made for the sale, so visitors who only look
leave no records behind.
- Limit sales with
restrictions.completed_sessions.limit: the link turns itself off once that many payments complete, and sendspayment_link.updated. A buyer who opens it afterwards sees yourinactive_message. - Turn a link off or on with
active. A link that reached its limit is turned on again only by raising or removing the limit in the same request. - After paying, the buyer sees Paycose's confirmation page with your
after_completion.hosted_confirmation.custom_message, or is sent toafter_completion.redirect.url;{CHECKOUT_SESSION_ID}in that URL is replaced by the paid session's ID. - Promotion codes: set
allow_promotion_codesand buyers can enter a code on the page. - Customers: by default (
customer_creation: "if_required") a one-time buyer pays as a guest: no customer is created, and their name, email and address are kept on the payment. Withcustomer_creation: "always", and on recurring or invoiced links, every buyer enters their name and email and becomes a new customer before paying. - Let the buyer pick the quantity with a line's
adjustable_quantity(enabled,minimum0 by default,maximum99 by default, at most 999,999). The page shows − and + buttons and reprices the order. A promotion code that no longer fits the new total is removed, and the buyer is told so. - Issue an invoice for each sale with
invoice_creation.enabled(one-time prices only). When the buyer pays, Paycose creates and finalizes the invoice for them; it is paid by that payment and its receipt is available as for any invoice. Setinvoice_creation.invoice_data.descriptionandmetadataas on the invoice. Without an invoice, the sale is a payment intent only. - Add VAT to that invoice with
invoice_creation.invoice_data.default_tax_rates, a list of your tax rate IDs. The page shows the tax and the total with tax before the buyer pays. This field is a Paycose addition: Stripe computes tax on payment links only through Stripe Tax. - Sell a subscription by creating the link from recurring prices. Each buyer
saves a card on the page and gets a subscription of their own, charged the
first period at once or after
subscription_data.trial_period_days. Usesubscription_data.descriptionandmetadatafor the subscription. - See the sales: list the checkout
sessions of a link with
GET /checkouts?payment_link=. Each names what it made intarget_typeandtarget_id: apayment_intent, aninvoiceor asubscription.
Fix the payment method
When you already know how the customer will pay, name the method when you
create the payment intent
and leave confirm out:
{ "amount": 49900, "currency": "THB", "payment_method": { "type": "promptpay" } }The intent's payment_method_types becomes ["promptpay"]. A Checkout session
for it offers only that method, and the customer taps it to pay.
Subscriptions through Checkout
A session with mode: "subscription" starts a
subscription from line_items and
subscription_data. How it collects depends on who bills the subscription:
- Billed by Paycose (for example Omise): the subscription is created with the session, and the payer pays its first invoice on the hosted page, or saves their card when it starts with a trial.
- Billed by the provider (Stripe): as Stripe Checkout does, the payer saves
their card first, and the subscription is created with that card as its
default payment method when the session completes. Without a trial, Stripe
charges the first invoice to the card at once. If the card needs 3D Secure,
the payer is sent to authenticate it, the session completes with
payment_status: "unpaid", and the subscription staysincompleteuntil the invoice is paid.
A completed session names the subscription in subscription_id, with
payment_status paid (the first invoice is paid) or no_payment_required
(a trial). Without subscription_data.customer_id, the payer becomes a
customer from the name and email they enter on the hosted page before their
card is saved.
Common use cases
- Emailing a customer a link to pay an outstanding invoice.
- A simple "Buy now" button that doesn't need a custom checkout page.
- Sharing one Payment Link in a chat, a social post or a QR code that many buyers use to pay for the same product.