Checkout

Crear un nuevo link de pago

Changed on

Genera un link de pago para redirigir a tus clientes al servicio de Checkout de Clip en donde pueden completar su pago de manera segura y rápida.

post/checkout

Request

  • Base URL
    https://api.payclip.com/v2
  • URL
    https://api.payclip.com/v2/checkout
  • Auth
    API key in header Authorization

Request body

amountnumber float required

Número con decimales que representa el monto a cobrar. El número mínimo entero es 1. Utiliza dos decimales como máximo.

currencystring required

Código de tres caracteres que representa la moneda. <br/>Formato ISO 4217 (3 caracteres en mayúsculas).

purchase_descriptionstring utf-8 required

Texto que describe la compra. Visible para el cliente en la UI o el recibo. <br/>Formato UTF-8 <br/> Se aceptan los siguientes caracteres especiales `~!@#$%^&*()\=+\\|\[{\]};:"<>/?

expires_atstring YYYY-MM-DDTHH-MM-SSZ

Indica la fecha y hora (en UTC) de expiración de la solicitud de pago, la cual debe debe ser mayor a 00:01:00 minuto de la hora de creación de la solicitud y menor a las 23:59:59 (hora de CDMX) del mismo día de creación. Ejemplo 2023-06-18T22:52:26Z <br/> Si no se especifica, el valor default de este parámetro es tres días a partir de la hora de creación.

webhook_urlstring

URL del endpoint que recibirá notificaciones webhook del link de pago.<br/>Puedes consultar la estructura de la notificación webhook en el siguiente link.

Example request

{
  "override_settings": {
    "merchant_info": {
      "show_contact_info": true
    }
  },
  "metadata": {
    "external_reference": "OID123456789",
    "customer_info": {
      "name": "Juan Lopez",
      "email": "ejemplo@mail.com",
      "phone": 5512345678
    },
    "shipping_address": {
      "zip_code": "03800A",
      "street": "Av Uno",
      "outdoor_number": "104A",
      "interior_number": "203B",
      "locality": "San Pedro",
      "city": "Benito Juárez",
      "state": "Ciudad de México",
      "country": "México",
      "reference": "Edificio gris",
      "between_streets": "Entre calle 13 y calle 9",
      "floor": "2B"
    },
    "billing_address": {
      "zip_code": "03800A",
      "street": "Av Uno",
      "outdoor_number": "104A",
      "interior_number": "203B",
      "locality": "San Pedro",
      "city": "Benito Juárez",
      "state": "Ciudad de México",
      "country": "México",
      "reference": "Edificio gris",
      "between_streets": "Entre calle 13 y calle 9",
      "floor": "2B"
    }
  },
  "custom_payment_options": {
    "international_enabled": true
  },
  "webhook_url": "https://hook.us1.make.com/k5f98kqxuuxgn4td6hgejrnu6lsi362p"
}

Response

OK

payment_request_idstring uuid

Identificador del link de pago. <br/>Se genera un nuevo <code>payment_request_id</code> en cada solicitud para Crear un nuevo link de pago.

object_typestring

Valor estático del link de pago “payment_link”

statusstring

Estado actual del link de pago. Los estados posibles son <br/>CHECKOUT_CREATED El link de pago fue creado exitosamente.<br/>CHECKOUT_PENDING El link de pago está activo y pendiente de ser completado.<br/> CHECKOUT_CANCELLED El link de pago fue cancelado por exceso de intentos (máximo 5).<br/> CHECKOUT_EXPIRED El link de pago expiró. El link de pago expira después de 1 hora. <br/> CHECKOUT_COMPLETED El link de pago se liquidó.

last_status_messagestring

Mensaje del último estado del link de pago dependiendo del elemento status.

created_atstring YYYY-MM-DDTHH-MM-SSZ

Indica la fecha y hora de creación del enlace de pago.

payment_request_urlstring

Link de pago a donde se redirigirá al cliente.

modified_atstring date-time

Indica la fecha y hora de modificación del enlace de pago.

expirea_atstring date-time

Indica la fecha y hora de expiración del enlace de pago.

qr_image_urlstring

Código QR del link de pago que podrá ser escaneado por tu cliente.

api_versionstring

Indica la versión de la API

Example response

{
  "payment_request_id": "2cbf5775-1cdd-4601-9712-c4a6ab7fa6f5",
  "object_type": "payment_link",
  "status": "CHECKOUT_CREATED",
  "last_status_message": "Payment request is active",
  "created_at": "2020-04-30T00:00:00.000Z",
  "payment_request_url": "https://completa-tu-pago.payclip.com/2cbf5775-1cdd-4601-9712-c4a6ab7fa6f5",
  "modified_at": "2020-04-30T00:00:00.000Z",
  "expired_at": "2020-04-30T00:00:00.000Z",
  "qr_image_url": "https://qr.payclip.com/2cbf5775-1cdd-4601-9712-c4a6ab7fa6f5",
  "api_version": "2"
}

Changes

    • breaking

      removed the enum value https://my-website.com/redirection/error?me_reference_id=OID123456789 of the request property /

    • breaking

      removed the enum value https://my-website.com/redirection/success?me_reference_id=OID123456789 of the request property /

    • breaking

      media type application/vnd.com.payclip.v2+json was changed to a more general media type application/json for the response status

    • breaking

      media type application/vnd.com.payclip.v2+json was changed to a more general media type application/json for the response status

    • breaking

      media type application/vnd.com.payclip.v2+json was changed to a more general media type application/json for the response status

    • breaking

      media type application/vnd.com.payclip.v2+json was changed to a more general media type application/json for the response status

    • breaking

      media type application/vnd.com.payclip.v2+json was changed to a more general media type application/json for the response status

    • breaking

      media type application/vnd.com.payclip.v2+json was changed to a more general media type application/json for the response status

    • warning

      removed the request property //

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the new optional request property

    • info

      added the new optional request property //

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the new https://my-website.com/redirection/error?external_reference=OID123456789 enum value to the request property /

    • info

      added the new https://my-website.com/redirection/success?external_reference=OID123456789 enum value to the request property /

    • info

      removed the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status