---
title: "Create a payment link"
method: POST
path: "/link"
tags: ["Pay By Link"]
---

# Create a payment link

`POST /link`

Generates a link that takes customers straight to a secure and ready-to-pay checkout.

**Required scope:** <code style="background:#e8f0fe;color:#1a73e8;padding:2px 8px;border-radius:12px;font-size:0.85em">link:create</code>

## Request body

- object
  - `expiration_time` string, date-time — RFC3339 formatted time for the link expiration date.
  - `type` 'SINGLE' | 'FREQUENT' | 'SUBSCRIPTION', required
  - `customer` CustomerRequest, required — The Customer object contains detailed information about the customer required to create a pay-by-link.
    - `id` string, uuid — A unique identifier for the resource. While typically formatted as a UUID (Universally Unique Identifier), it can also be in other formats as defined by the user. This field ensures the resource can be distinctly recognized and referenced.
    - `name` string, required — The full name of the customer. This field is used to identify the customer and personalize interactions. It typically includes the customer's first name and last name.
    - `email` string, email, required — The email address of the customer. This field is used for communication purposes, including sending transaction confirmations, receipts, and other notifications related to the customer's activities. Also, this email will be used to send the payment link if the EMAIL channel was requested in the communication channels.
    - `phone` string, required — The contact phone number of the customer has the E.164 pattern and is always required. This number will be used to make the payment if the method is MB WAY and to send the payment link if the SMS channel was requested in the communication channels.
    - `language` string, required — The language preference of the customer, specified in the ISO 639-1 Alpha-2 format (e.g., "EN" for English, "PT" for Portuguese). This field is used to indicate the customer's preferred language for communication and documentation.
  - `communication_channels` string[], required — The communication channels specifies where the final customer link should be forwarded.
  - `payment` object, required — Payment object with the payment method, capture object and payment type object (Single, Frequent, Subscription).
    - `methods` string[], required — All the payment methods available to create a pay-by-link payment.
    - `capture` CaptureRequest — Capture object with all the fields necessary to create a Pay-by-Link request
      - `descriptive` string — A customizable text field for users to input some descriptive associated with this capture operation.
      - `key` string — A customizable text field for users to input their own identifier for the resource. This can be any string that helps the user uniquely identify or reference the resource in their own system.
    - `single` SingleRequest — Single object with all the fields necessary to create a Pay-by-Link request.
      - `requested_amount` string, required — String representing the monetary amount requested for the transaction. This field is formatted as a double, and will be rounded to two decimal places.
    - `frequent` FrequentRequest — This frequent object is not implemented yet. For now, we can only use Pay By Link with Single payments.
      - `minimum_amount` string, required — Minimum value available to create a Pay-by-link request.
      - `maximum_amount` string, required — Maximum value available to create a Pay-by-link request.
      - `unlimited_payments` boolean, required — Determines whether payments can be unlimited.
    - `subscription` SubscriptionRequest — This subscription object is not implemented yet. For now, we can only use Pay By Link with Single payments.
      - `frequency` '1D' | '1W' | '2W' | '1M' | '2M' | '3M' | '4M' | '6M' | '1Y' | '2Y' | '3Y', required — Determines how often the subscription payment is made.
      - `maximum_captures` integer — Determines the maximum number of captures for this subscription. **It's only required when no expiration_time is set.**
      - `start_time` string, required — Determines the start date of billing cycles for this subscription. This date must be always in the future.
      - `capture_now` boolean — Determines whether an immediate capture is performed. If this value is true, an immediate capture will be performed and the second capture will be on the date entered in the start_time field.
      - `retries` integer — Number of retries in each payment cycle. The chosen frequency will define the max number of possible retries.
      - `failover` boolean — After all retries failed, the payment cycle can have another try with another single method.
      - `expiration_time` string, date-time — RFC3339 formatted time for the subscription expiration date. **Required if maximum_captures is not defined.**
  - `notification` NotificationRequest — Opt-in notification preferences for the link. When enabled, the customer receives an email with the payment instructions after choosing the method on the Pay by Link page.
    - `customer_method_instructions_email` boolean — When true, sends the payment-instructions email to the customer. Requires the customer name, email and language to be present.

## Response `201`

Created

- LinkResponseObject
  - `id` string, uuid — A unique identifier for the resource. While typically formatted as a UUID (Universally Unique Identifier), it can also be in other formats as defined by the user. This field ensures the resource can be distinctly recognized and referenced.
  - `created_at` string, date-time — String with the date on which this Pay By Link was created.
  - `modified_at` string, date-time — String with the date on which this Pay By Link was modified.
  - `expiration_time` string, date-time — The last possible time to make the payment.
  - `type` 'SINGLE' | 'FREQUENT' | 'SUBSCRIPTION'
  - `customer` CustomerResponse — The Customer object contains detailed information about the customer required to create a pay-by-link.
    - `name` string, required — The full name of the customer. This field is used to identify the customer and personalize interactions. It typically includes the customer's first name and last name.
    - `email` string, email, required — The email address of the customer. This field is used for communication purposes, including sending transaction confirmations, receipts, and other notifications related to the customer's activities.
    - `phone` string, required — The contact phone number of the customer, excluding the country code indicator (e.g., "+351"). This field is used for communication purposes. If the payment method is MB WAY, the phone_number is required and is used to send the MB WAY push notification.
  - `communication_channels` string[] — The communication channels specifies where the final customer link should be forwarded.
  - `payment` object
    - `methods` string[] — All the payment methods available to create a pay-by-link payment.
    - `capture` CaptureResponse
      - `descriptive` string — A customizable text field for users to input some descriptive associated with this capture operation.
      - `key` string — A customizable text field for users to input their own identifier for the resource. This can be any string that helps the user uniquely identify or reference the resource in their own system.
    - `single` SingleResponse — Single object with all the fields necessary after creating a Pay-by-Link request.
      - `requested_amount` string, required — String representing the monetary amount requested for the transaction. This field is formatted as a double, and will be rounded to two decimal places.
    - `frequent` FrequentResponse — Frequent object with all the fields necessary after creating a Pay-by-Link request.
      - `minimum_amount` string, required — Minimum value available to create a Pay-by-link request.
      - `maximum_amount` string, required — Maximum value available to create a Pay-by-link request.
      - `unlimited_payments` boolean, required — Determines whether payments can be unlimited.
    - `subscription` SubscriptionResponse — Subscription object with all the fields necessary after creating a Pay-by-Link request.
      - `frequency` '1D' | '1W' | '2W' | '1M' | '2M' | '3M' | '4M' | '6M' | '1Y' | '2Y' | '3Y', required — Determines how often the subscription payment is made.
      - `maximum_captures` integer — Determines the maximum number of captures for this subscription. **It's only required when no expiration_time is set.**
      - `start_time` string, required — Determines the start date of billing cycles for this subscription. This date must be always in the future.
      - `capture_now` boolean — Determines whether an immediate capture is performed. If this value is true, an immediate capture will be performed and the second capture will be on the date entered in the start_time field.
      - `retries` integer — Number of retries in each payment cycle. The chosen frequency will define the max number of possible retries.
      - `failover` boolean — After all retries failed, the payment cycle can have another try with another single method.
      - `expiration_time` string, date-time — RFC3339 formatted time for the subscription expiration date.
  - `url` string, url — Link that redirects to the Easypay checkout payment page.
  - `image` string, url — Link that redirects to a QR code to access the payment checkout page.
  - `status` 'ACTIVE' | 'EXPIRED' | 'DISABLED' | 'FINALIZED'

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `500` — Internal Server Error
- `501` — Not Implemented

---

[API](https://skmtc.net/easypay/apis/easypay-payments-api.md) · [All operations](https://skmtc.net/easypay/apis/easypay-payments-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/easypay/easypay-payments-api/versions/cdf25a9ad7b2/schema)
