Payment Links
Payment Links are permanent, shareable payment URLs, with no expiration date by default. Unlike Checkout Sessions, which are single-use and expire, a Payment Link can be used multiple times, by multiple different customers.
Typical use cases: a payment link in a marketing email, a buy button on a website, a QR code at the point of sale, a link shared on WhatsApp.
Payment Link → permanent, reusable link, shareable at large scale. Ideal for standard products. Checkout Session → single-use session, tied to a specific Customer, expires after a delay. Ideal for personalized e-commerce carts.
Link types
| Type | Usage | Required fields |
|---|---|---|
product | Sale of one or more defined Products. | products (IDs) |
custom | Free-form amount set by the merchant. | amount |
donation | Open donation — the customer enters the amount. | No amount required |
Endpoints
| Méthode | Endpoint | Description |
|---|---|---|
| POST | /payment-links/ | Create a payment link |
| GET | /payment-links/ | List links |
| GET | /payment-links/{id}/ | Retrieve a link |
| PATCH | /payment-links/{id}/ | Update a link |
| DELETE | /payment-links/{id}/ | Permanently delete |
| POST | /payment-links/{id}/archive/ | Archive (disable without deleting) |
| POST | /payment-links/{id}/restore/ | Restore an archived link |
Object schema
Create a Payment Link
currencyRequisISO 4217 currency code for the payment link.
payment_link_typeOptionnelLink type: product, custom, or
donation. Determines the required fields and the behavior of the
payment page.
productsOptionnelList of Product IDs to sell
via this link. Required if payment_link_type: product.
En savoir plus
You can attach up to 20 products per link. If only one product is attached, the payment page displays its details directly. With multiple products, the buyer sees a selection list.
amountOptionnelFixed amount in cents. Required if payment_link_type: custom.
Ignored for the product and donation types.
nameOptionnelName displayed as the title on the payment page. If not provided and
type: product, the name of the first product is used.
validity_typeOptionnelValidity policy for the link.
En savoir plus
Values: unlimited (never expires, never limited),
limited (limited by max_usage and/or
expires_at), one_time (usable
only once — equivalent to max_usage: 1).
max_usageOptionnelMaximum number of times the link can be used. Once reached, the payment page displays an unavailability message.
En savoir plus
Active only if validity_type: limited. Counts a
usage as soon as a payment is initiated (processing status),
even if the payment later fails. Useful for limited-quantity sales.
expires_atOptionnelDate and time the link expires. After this date, the payment page is disabled.
En savoir plus
Active only if validity_type: limited. The link can
expire before max_usage if both are set.
redirect_urlOptionnelRedirect URLs after payment. Object with the keys success
(URL after a successful payment) and cancel (URL if the buyer abandons).
En savoir plus
If not provided, Sangho displays a generic confirmation page. Add
?session_id={CHECKOUT_SESSION_ID} to your success URL
to retrieve the details server-side.
payment_method_typesOptionnelPayment methods allowed on this link. If omitted, all of the App’s active methods are offered.
collect_customer_infoOptionnelIf true, the payment page collects the buyer’s
information (name, email) and automatically creates a Customer.
En savoir plus
Disabling this option (false) produces anonymous payments
— less data but a faster experience. Not recommended if you want to
send automatic receipts.
allow_quantityOptionnelIf true, displays a quantity selector on the
payment page. The buyer can choose how many units to purchase.
metadataOptionnelFree-form data. Returned in the
payment_intent.succeeded webhooks tied to this link.