v1

latestOpenAPI 3.0.3MIT-LICENSE2026-07-2469127278.1 KB
Payment Link

Create Payment Link

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).

post/checkouts

Headers

Accept-Language'es' | 'en'

Use for knowing which language to use

X-Child-Company-Idstring

In the case of a holding company, the company id of the child company to which will process the request.

Request body

namestring required

Payment link name.

typestring required

Checkout type.

recurrentboolean required

false: single use. true: multiple payments

payments_limit_countinteger

Required when recurrent is true. Maximum number of payments allowed through the link.

allowed_payment_methodsstring[] required

Payment methods available in the payment link.

needs_shipping_contactboolean required

This flag allows you to fill in the shipping information at checkout.

starts_atinteger

Start time for the link. Unix timestamp in seconds.

expires_atinteger 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_expireboolean

If true, the link does not expire.

Example request

{
  "name": "Payment Link Name",
  "type": "PaymentLink",
  "allowed_payment_methods": [
    "cash"
  ],
  "starts_at": 1680224924,
  "expires_at": 1680397724,
  "order_template": {
    "currency": "MXN",
    "customer_info": {
      "customer_id": "cus_23874283647",
      "name": "DevTest",
      "email": "test@femsa.com",
      "phone": "5522997233"
    },
    "line_items": [
      {
        "name": "Box of Cohiba",
        "unit_price": 20000,
        "quantity": 1,
        "sku": "XYZ12345",
        "brand": "Cohiba",
        "description": "Imported From Mex.",
        "metadata": {
          "key": "value"
        }
      }
    ],
    "metadata": {
      "key": "value"
    }
  }
}

Response

successful operation