Template sales (one link, many payments)
Last updated: 2026-11-23
Prerequisites
- The seller's seller_payme_id (MPL)
Related
- Create a sale (hosted payment page)
- Cancel a template sale
- Create a multi-method checkout sale
- Sale Types
A template sale is one payment link that many buyers can pay, for example a link you share on a social network.
1. Create the link
Create it with generate-sale and sale_type: template. The sale_url you get back has the form …/sale/template/<id>.
| Field | Value |
|---|---|
sale_type |
template |
Every other generate-sale field is on Create a sale. A template is not the multi-method checkout (sale_payment_method: multi), which lets one buyer choose how to pay: see Create a multi-method checkout sale.
2. What each payment creates
Each payment creates a new sale (sale_type 4, SaleFromTemplate) with its own payme_sale_id and its own callbacks. The template sale itself stays initial.
3. Close the link
The link stays open until you cancel it with cancel-template (send the template's ID as sale_payme_id), or until sale_expiry_seconds passes, if you sent it. Cancelling works only while the template is initial and sets it to canceled; payments on it then fail with error 305.
Errors
- You can't send
buyer_keywith a template (error606). echeckisn't supported on templates (error4).