> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplepay.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a payment link



## OpenAPI

````yaml /openapi.json post /v1/payment-links
openapi: 3.1.0
info:
  title: SimplePay API
  version: '2026-06-13'
  description: >-
    Contrato público para integrar SimplePay desde un backend. Incluye
    únicamente operaciones para comercios y administración protegida de
    credenciales.
servers:
  - description: Live
    url: https://api.simplepay.mx
  - description: Sandbox
    url: https://api.test.simplepay.mx
security:
  - SimplePayApiKey: []
tags:
  - name: API keys
  - name: Hosted Checkout
  - name: Payment Links
  - name: Payments
  - name: Refunds
  - name: Webhooks
  - name: Digital Catalog
  - name: Payment Policy
  - name: Reporting
  - name: Workspace
  - name: Customer Hub
  - name: Bookable Payments
  - name: Table Pay
  - name: Physical Checkout
  - name: In-person Payments
  - name: Terminal
  - name: Tap to Pay
  - name: Ticketing
  - name: Admission Control
  - name: Intelligence
externalDocs:
  description: SimplePay developer documentation
  url: https://docs.simplepay.mx
paths:
  /v1/payment-links:
    post:
      tags:
        - Payment Links
      summary: Create a payment link
      operationId: createPaymentLink
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentLinkCreate'
      responses:
        '201':
          description: >-
            The created SimplePay Payment Link, including its canonical public
            URL.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentLink'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
        minLength: 8
        maxLength: 255
  schemas:
    PaymentLinkCreate:
      type: object
      additionalProperties: false
      description: >-
        Create a SimplePay Payment Link. Charges exactly one manual amount or
        catalog line item. A merchant offering installments must explicitly
        choose whether it absorbs financing cost or passes it to the buyer. The
        buyer only selects a term at quote/pay. No Stripe params are accepted.
      dependentRequired:
        installment_options:
          - installment_pricing
        installment_pricing:
          - installment_options
      oneOf:
        - required:
            - manual_amount
          not:
            required:
              - catalog_line_item
        - required:
            - catalog_line_item
          not:
            required:
              - manual_amount
      properties:
        manual_amount:
          type: integer
          minimum: 1
          description: >-
            Charge a manual amount in minor units. Mutually exclusive with
            catalog_line_item.
        catalog_line_item:
          type: object
          additionalProperties: true
          description: >-
            Charge a Digital Catalog line item by snapshot. Mutually exclusive
            with manual_amount.
        currency:
          type: string
          pattern: ^[a-zA-Z]{3}$
          default: mxn
        metadata:
          type: object
          additionalProperties: true
        recipient_email:
          type: string
          format: email
          minLength: 3
          maxLength: 254
          description: >-
            Optional buyer email. SimplePay delivers the link and makes it
            visible in that verified buyer's pending-link inbox; plaintext email
            is not persisted in the inbox projection.
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Optional future RFC 3339 expiry with an explicit timezone. The
            origin normalizes it to UTC.
        payment_method_types:
          $ref: '#/components/schemas/PaymentMethodTypes'
        installment_options:
          $ref: '#/components/schemas/InstallmentOptions'
        installment_pricing:
          $ref: '#/components/schemas/InstallmentPricing'
    PaymentLink:
      type: object
      additionalProperties: false
      required:
        - id
        - object
        - public_id
        - url
        - status
        - amount_source
        - manual_amount
        - currency
        - catalog_line_item_snapshot
        - payment_method_types
        - installment_options
        - installment_plan
        - checkout_session_ref
        - expires_at
        - revoked_at
        - metadata
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        object:
          const: payment_link
        public_id:
          type: string
          pattern: ^splink_[a-z0-9]{32}$
        url:
          type: string
          format: uri
          pattern: ^https://link\.simplepay\.mx/splink_[a-z0-9]{32}$
        status:
          enum:
            - active
            - inactive
            - archived
            - paid
        amount_source:
          enum:
            - manual_amount
            - catalog_line_item
        manual_amount:
          type:
            - integer
            - 'null'
        currency:
          type: string
          pattern: ^[a-z]{3}$
        catalog_line_item_snapshot:
          type:
            - object
            - 'null'
          additionalProperties: true
        payment_method_types:
          $ref: '#/components/schemas/PaymentMethodTypes'
        installment_options:
          $ref: '#/components/schemas/InstallmentOptionsRead'
        installment_plan:
          oneOf:
            - $ref: '#/components/schemas/InstallmentPlan'
            - type: 'null'
        installment_pricing:
          $ref: '#/components/schemas/InstallmentPricing'
        checkout_session_ref:
          type:
            - string
            - 'null'
          pattern: ^spcs_[a-z0-9]{32}$
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            UTC expiry timestamp, or null when the link does not expire
            automatically.
        revoked_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            UTC merchant-revocation timestamp, or null while the link has not
            been revoked.
        metadata:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PaymentMethodTypes:
      type: array
      minItems: 1
      items:
        enum:
          - card
          - oxxo
          - spei
      default:
        - card
    InstallmentOptions:
      type: array
      description: >-
        Canonical merchant-selected card installment terms to offer. Requires
        card in payment_method_types and one installment_pricing choice.
      minItems: 1
      maxItems: 6
      uniqueItems: true
      items:
        $ref: '#/components/schemas/InstallmentPlan'
    InstallmentPricing:
      type: object
      additionalProperties: false
      description: >-
        Merchant-owned financing choice applied consistently to every offered
        term. absorb forbids buyer markup; pass_to_buyer may include a governed
        markup in basis points.
      required:
        - fee_allocation
      properties:
        fee_allocation:
          type: string
          enum:
            - absorb
            - pass_to_buyer
        merchant_markup_bps:
          type: integer
          minimum: 0
          maximum: 10000
      oneOf:
        - properties:
            fee_allocation:
              const: absorb
          not:
            required:
              - merchant_markup_bps
        - properties:
            fee_allocation:
              const: pass_to_buyer
    InstallmentOptionsRead:
      type: array
      description: >-
        Canonical installment terms offered by the resource; empty when
        installments are not offered.
      minItems: 0
      maxItems: 6
      uniqueItems: true
      items:
        $ref: '#/components/schemas/InstallmentPlan'
    InstallmentPlan:
      type: object
      additionalProperties: false
      description: >-
        One SimplePay card-installment term. The merchant offers terms at
        resource creation; the buyer may only select one offered term at
        quote/pay.
      required:
        - months
      properties:
        months:
          enum:
            - 3
            - 6
            - 9
            - 12
            - 18
            - 24
  securitySchemes:
    SimplePayApiKey:
      type: http
      scheme: bearer

````