# Update Link Updates a payment link identified by its unique ID. Endpoint: PATCH /link/{id} Version: 2.0 Security: accountId, apiKey ## Path parameters: - `id` (string, required) ## Request fields (application/json): - `expiration_time` (string, required) RFC3339 formatted time for the link expiration date ## Response 200 fields (application/json): - `id` (string) 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) String with the date on which this Pay By Link was created. Example: "2025-06-16T13:32:32Z" - `modified_at` (string) String with the date on which this Pay By Link was modified. Example: "2025-06-16T13:32:32Z" - `expiration_time` (string) The last possible time to make the payment. Example: "2026-06-10T09:27:55Z" - `type` (string) Specifies the type of payment being performed. Possible values are "Single" (One-time transactions that will let your customers pay an amount of money to you), "Frequent" (Are repeatable transactions of varying sums without the client having to enter their payment details again), and "Subscription" (periodic payments of the same amount of money, configured through Checkout or our Payments API). Enum: "SINGLE", "FREQUENT", "SUBSCRIPTION" - `communication_channels` (array) The communication channels specifies where the final customer link should be forwarded. Enum: "SMS", "EMAIL" - `customer` (object) The Customer object contains detailed information about the customer required to create a pay-by-link. - `customer.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. Example: "Jonh Doe" - `customer.email` (string, 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. Example: "example@easypay.pt" - `customer.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 MBWAY, the phone_number is required and is used to send the MBWAY push notification. Example: "+351911234567" - `payment` (object) - `payment.methods` (array) All the payment methods available to create a pay-by-link payment. Enum: "MB", "MBW", "DD", "CC", "VI", "AP", "GP" - `payment.capture` (object) - `payment.capture.descriptive` (string) A customizable text field for users to input some descriptive associated with this capture operation. - `payment.capture.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. - `payment.single` (object) Single object with all the fields necessary after creating a Pay-by-Link request. - `payment.single.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. Example: "10.45" - `payment.frequent` (object) Frequent object with all the fields necessary after creating a Pay-by-Link request. - `payment.frequent.minimum_amount` (string, required) Minimum value available to create a Pay-by-link request. Example: "5" - `payment.frequent.maximum_amount` (string, required) Maximum value available to create a Pay-by-link request. Example: "10" - `payment.frequent.unlimited_payments` (boolean, required) Determines whether payments can be unlimited. - `payment.subscription` (object) Subscription object with all the fields necessary after creating a Pay-by-Link request. - `payment.subscription.frequency` (any, required) Determines how often the subscription payment is made. Enum: "1D", "1W", "2W", "1M", "2M", "3M", "4M", "6M", "1Y", "2Y", "3Y" - `payment.subscription.maximum_captures` (integer) Determines the maximum number of captures for this subscription. It's only required when no expiration_time is set. Example: 100 - `payment.subscription.start_time` (string, required) Determines the start date of billing cycles for this subscription. This date must be always in the future. Example: "2025-01-15 00:00" - `payment.subscription.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. - `payment.subscription.retries` (integer) Number of retries in each payment cycle. The chosen frequency will define the max number of possible retries. - `payment.subscription.failover` (boolean) After all retries failed, the payment cycle can have another try with another single method. - `payment.subscription.expiration_time` (string) RFC3339 formatted time for the subscription expiration date. - `url` (string) Link that redirects to the Easypay checkout payment page. Example: "https://easypay.pt/s/XStDvnMKZaN" - `image` (string) Link that redirects to a QR code to access the payment checkout page. Example: "https://cdn.easypay.pt/images/qr/XStDvnMKZaN" - `status` (string) All the payment status after creating a pay-by-link payment. Enum: "ACTIVE", "EXPIRED", "DISABLED", "FINALIZED" ## Response 400 fields (application/json): - `type` (string) Link that redirects to the API documentation. Example: "https://docs.easypay.pt/api/overview#invalid-params" - `title` (string) Brief title about the error. Example: "Invalid payload provided" - `detail` (string) Brief description about the error. Example: "Your request parameters didn't validate" - `status` (number) API error code. - `invalid_params` (object) - `invalid_params.name` (string) Name of the payload field that contains an error. Example: "expiration_time" - `invalid_params.reason` (string) Reason why this payload field contains an error. Example: "expiration_time should be formated as RFC 3339 and in the future" ## Response 403 fields (application/json): - `type` (string) Link that redirects to the API documentation. Example: "https://api.prod.easypay.pt/docs#section/NotFound" - `title` (string) Brief title about the error. Example: "Not Found" - `detail` (string) Brief description about the error. Example: "no link found with the provided id" - `status` (number) API error code. ## Response 404 fields (application/json): - `type` (string) Link that redirects to the API documentation. Example: "https://docs.easypay.pt/api/overview#invalid-params" - `title` (string) Brief title about the error. Example: "Invalid payload provided" - `detail` (string) Brief description about the error. Example: "Your request parameters didn't validate" - `status` (number) API error code. ## Response 409 fields (application/json): - `type` (string) Link that redirects to the API documentation. Example: "https://api.prod.easypay.pt/docs#section/conflict" - `title` (string) Brief title about the error. Example: "Conflict with the current state of the target resource" - `detail` (string) Brief description about the error. Example: "conflict with the resource's current state" - `status` (number) API error code. ## Response 500 fields (application/json): - `status` (string) Indicates the response status of the API request. Example: "error" - `message` (string) An array of human-readable messages included in the response. These messages provide detailed information about the success of the operation or explain the reasons for any failure. This field is always present in the response to ensure clarity and transparency regarding the outcome of the API request. Example: "Internal server error" ## Response 501 fields