Payment Link

Create Unique Payment Link

Changed on
post/checkouts

Request

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.

Idempotency-Keystring

Unique key to make the request idempotent. Retrying a request with the same key returns the original response instead of performing the operation again.

Request body

allowed_payment_methodsstring[]

Those are the payment methods that will be available for the link. This field is mutually exclusive with excluded_payment_methods.

excluded_payment_methodsstring[]

Payment methods to be excluded from the checkout. This field is mutually exclusive with allowed_payment_methods.

exclude_card_networksstring[]

List of card networks to exclude from the checkout. This field is only applicable for card payments. Accepted values: 'visa_master_card' (a single token excluding both Visa and Mastercard) and 'amex'.

expires_atinteger required

It is the time when the link will expire. It is expressed in seconds since the Unix epoch. The valid range is from 5 minutes to 365 days from the creation date.

monthly_installments_enabledboolean

This flag allows you to specify if months without interest will be active.

monthly_installments_optionsinteger[]

This field allows you to specify the number of months without interest.

three_ds_mode'strict' | 'not_strict' | 'smart'

Indicates the 3DS2 mode: 'strict', 'not_strict' or 'smart'. To defer to the company-level 3DS configuration, omit the field (an explicit null is rejected on creation).

namestring required

Reason for charge

needs_shipping_contactboolean

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

on_demand_enabledboolean nullable

This flag allows you to specify if the link will be on demand.

plan_idsstring[]

It is a list of plan IDs that will be associated with the order.

payments_limit_countinteger

It is the number of payments that can be made through the link.

redirection_timeinteger

It is the time in seconds that the checkout will wait before redirecting to the success_url. It must be greater than 0.

success_urlstring

The URL to redirect to after a successful payment.

recurrentboolean required

false: single use. true: multiple payments

typestring required

It is the type of link that will be created. It must be a valid type.

Example request

{
  "allowed_payment_methods": [
    "cash",
    "card",
    "bank_transfer",
    "bnpl",
    "pay_by_bank"
  ],
  "excluded_payment_methods": [
    "cash",
    "bank_transfer"
  ],
  "exclude_card_networks": [
    "visa_master_card"
  ],
  "expires_at": 1680397724,
  "monthly_installments_enabled": true,
  "monthly_installments_options": [
    3,
    6,
    12
  ],
  "name": "Payment Link Name 1594138857",
  "on_demand_enabled": true,
  "plan_ids": [
    "plan_123",
    "plan_456"
  ],
  "order_template": {
    "currency": "MXN",
    "customer_info": {
      "name": "DevTest",
      "email": "test@conekta.com",
      "phone": "5522997233",
      "object": "customer_info"
    },
    "line_items": [
      {
        "antifraud_info": {
          "key": "value"
        },
        "brand": "Cohiba",
        "description": "Imported From Mex.",
        "metadata": {
          "key": "value"
        },
        "name": "Box of Cohiba S1s",
        "quantity": 1,
        "sku": "XYZ12345",
        "tags": [
          "food",
          "mexican food"
        ],
        "unit_price": 20000
      }
    ],
    "metadata": {
      "key": "value"
    },
    "tax_lines": [
      {
        "amount": 100,
        "description": "testing",
        "metadata": {
          "key": "value"
        }
      }
    ],
    "discount_lines": [
      {
        "amount": 500,
        "code": "123",
        "type": "loyalty"
      }
    ]
  },
  "payments_limit_count": 5,
  "redirection_time": 30,
  "success_url": "https://www.conekta.com/success",
  "type": "PaymentLink"
}

Response

successful operation

allowed_payment_methodsstring[]

Are the payment methods available for this link

excluded_payment_methodsstring[]

Payment methods excluded from the checkout. This field is only returned when excluded_payment_methods is provided in the request.

plan_idsstring[]

List of plan IDs that are available for subscription

can_not_expireboolean
emails_sentinteger
exclude_card_networksstring[]
expires_atinteger
failure_urlstring
force_3ds_flowboolean
idstring required
livemodeboolean required
metadataobject
monthly_installments_enabledboolean
monthly_installments_optionsinteger[]
namestring required

Reason for charge

needs_shipping_contactboolean
objectstring required
paid_payments_countinteger
payments_limit_countinteger nullable
recurrentboolean
redirection_timeinteger nullable

It is the time in seconds that the checkout will wait before redirecting to the success_url.

slugstring
starts_atinteger
statusstring
success_urlstring

The URL to redirect to after a successful payment.

typestring
urlstring uri

Example response

{
  "allowed_payment_methods": [
    "cash",
    "card",
    "bank_transfer",
    "bnpl",
    "pay_by_bank"
  ],
  "excluded_payment_methods": [
    "cash",
    "bank_transfer"
  ],
  "plan_ids": [
    "plan_123",
    "plan_456"
  ],
  "exclude_card_networks": [
    "visa",
    "amex"
  ],
  "expires_at": 1680397724,
  "failure_url": "https://pay.conekta.com/failure",
  "id": "b0bf16c4-18b9-445e-ba24-01604f329dbf",
  "livemode": true,
  "metadata": {
    "key": "value"
  },
  "monthly_installments_options": [
    3,
    6,
    12
  ],
  "name": "Payment Link Name 1594138857",
  "object": "checkout",
  "payments_limit_count": 5,
  "redirection_time": 30,
  "slug": "b0bf16c418b9445eba2401604f329dbf",
  "starts_at": 1677650400,
  "status": "Issued",
  "success_url": "https://pay.conekta.com/success",
  "type": "PaymentLink",
  "url": "https://pay.conekta.com/link/b0bf16c418b9445eba2401604f329dbf"
}

Changes

    • breaking

      request property was restricted to a list of enum values

    • breaking

      the request property became not nullable

    • breaking

      removed the enum value mastercard of the request property /

    • breaking

      removed the enum value visa of the request property /

    • breaking

      the /// request property's maxLength was decreased to 249

    • breaking

      the /// request property's minItems was increased to 1

    • breaking

      the /// request property's minLength was increased from 0 to 2

    • breaking

      the /// request property's minLength was increased from 0 to 3

    • breaking

      the /// request property's minLength was increased from 0 to 3

    • breaking

      the /// request property's minLength was increased from 0 to 1

    • breaking

      the //// request property's minLength was increased from 0 to 2

    • breaking

      the /// request property's minLength was increased from 2 to 3

    • warning

      the /// request property's maxLength was set to 249

    • warning

      the /// request property's maxLength was set to 249

    • warning

      the /// request property's maxLength was set to 249

    • warning

      the //// request property's maxLength was set to 249

    • warning

      removed the optional property from the response with the status

    • info

      added the new optional header request parameter Idempotency-Key

    • info

      added the new optional request property

    • info

      added the new not_strict enum value to the request property

    • info

      added the new smart enum value to the request property

    • info

      added the new strict enum value to the request property

    • info

      added the new visa_master_card enum value to the request property /

    • info

      added the optional property to the response with the status