---
title: "Create Payment Link"
method: POST
path: "/checkouts"
tags: ["Payment Link"]
---

# Create Payment Link

`POST /checkouts`

Creates a Payment Link: a shareable URL that lets your customer pay without you building a custom checkout. Configure the link type, allowed payment methods, and expiration. The request also includes an order_template (currency and line items) used to generate an Order when the customer completes a payment. Use recurrent=false for a single-use link, or recurrent=true to allow multiple payments (limited by payments_limit_count).

## Headers

- `Accept-Language` 'es' | 'en'
- `X-Child-Company-Id` string

## Request body

- Checkout — Creates a Payment Link. This is a sub-resource related to an Order template: each time a customer pays using the link, the API will create an Order using `order_template`.
  - `name` string, required — Payment link name.
  - `type` string, required — Checkout type.
  - `recurrent` boolean, required — false: single use. true: multiple payments
  - `payments_limit_count` integer — Required when `recurrent` is true. Maximum number of payments allowed through the link.
  - `allowed_payment_methods` string[], required — Payment methods available in the payment link.
  - `needs_shipping_contact` boolean, required — This flag allows you to fill in the shipping information at checkout.
  - `starts_at` integer — Start time for the link. Unix timestamp in seconds.
  - `expires_at` integer, required — Expiration time for the link (Unix timestamp in seconds). Valid range is between 2 and 365 days (calculated from the next day of creation at 00:01).
  - `can_not_expire` boolean — If true, the link does not expire.
  - `order_template` CheckoutOrderTemplate, required — Attributes used to create the order when a new payment is received.
    - `currency` string, required — ISO 4217 currency code for the order.
    - `customer_info` union — Customer information used when creating the order.
      - CustomerInfo
        - `customer_id` string
        - `name` string, required
        - `email` string, email, required
        - `phone` string
        - `corporate` boolean
      - CustomerInfoJustCustomerId
        - `customer_id` string, required
    - `line_items` Product[], required — Products to buy. Each contains unit price and quantity used to calculate the order total.
      - `name` string, required — The name of the item. It will be displayed in the order.
      - `unit_price` integer, required — The price of the item in cents.
      - `quantity` integer, required — The quantity of the item in the order.
      - `sku` string — The stock keeping unit for the item. It is used to identify the item in the order.
      - `brand` string — The brand of the item.
      - `description` string — Short description of the item
      - `tags` string[] — List of tags for the item. It is used to identify the item in the order.
      - `metadata` object — Arbitrary key-value data for your internal use. Keys should be strings; values can be any JSON value.
    - `metadata` object — Arbitrary key-value data attached to the order for internal use.

## Response `200`

successful operation

## Other responses

- `401` — authentication error
- `402` — payment required error
- `422` — parameter validation error
- `500` — internal server error

---

[API](https://skmtc.dev/digitalfemsa/apis/femsa-api.md) · [All operations](https://skmtc.dev/digitalfemsa/apis/femsa-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/digitalfemsa/femsa-api/revisions/2e43caddf36b/schema)
