# Template sales (one link, many payments) Building with an AI agent? Start at https://docs.payme.io/agents.md A template sale is one payment link that many buyers can pay, for example a link you share on a social network. Create it with [`generate-sale`](/payments/hosted-payment-page/post-generate-sale) and `sale_type: template`. The `sale_url` you get back has the form `…/sale/template/`. | Field | Value | |---|---| | `sale_type` | `template` | How it works: - 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`. - The link stays open until you cancel it with [`cancel-template`](/payments/post-sale-actions/post-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`. Limits: - You can't send `buyer_key` with a template (error `606`). - `echeck` isn't supported on templates (error `4`). Every other `generate-sale` field is on [Create a sale](/payments/hosted-payment-page/post-generate-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](/payments/hosted-payment-page/post-generate-sale-2).