# Payment link cancellation. **POST /{merchantId}/payment/cancel** ## Servers - Production environment: https://api.imoje.pl/v1/merchant (Production environment) - Test environment: https://sandbox.api.imoje.pl/v1/merchant (Test environment) ## Authentication methods - Authorization token ## Parameters ### Path parameters - **merchantId** (string) Merchant identifier ### Body: application/json (object) - **serviceId** (string(uuid)) Shop identifier as `UUID v4` - **paymentId** (string(uuid)) Payment link identifier as `UUID v4` ## Responses ### 200 Request executed correctly #### Body: application/json (object) - **id** (string(uuid)) Payment link identifier as `UUID v4` - **url** (string) Adres przekierowania do płatności - **serviceId** (string(uuid)) Shop identifier as `UUID v4` - **orderId** (string) Order ID - **title** (string) Transaction title - **simp** (string) Numer rachunku SIMP przy włączonej usłudze płatności masowych - **amount** (integer) The transaction amount in the smallest currency unit, e.g. **pennies**. - **currency** (string) Status - **status** (string) Status - **isActive** (boolean) Informacja czy link płatności jest aktywny - **validTo** (integer | null) Transaction expiry date as a **timestamp in seconds**. Failure to complete the payment by this time will result in its cancellation. If not specified, the transaction is valid until the time set in the *Payment activity* parameter in the imoje Administration Panel (shop settings) or after 15 months. Passing the parameter `validTo`= `NULL` causes the transaction not to expire, ignoring the settings in the *Payment activity* parameter in the imoje Administration Panel (shop settings). The **minimum** link validity time is **60 seconds.** - **created** (integer | null) Creation date as timestamp - **modified** (integer | null) Modification date as timestamp - **isGenerated** (boolean) Informacja czy link płatności został wygenerowany z poziomu panelu imoje. - **isUsed** (boolean) Informacja czy link płatności został użyty. - **usedAt** (integer) Data użycia linku płatności jako timestamp - **isConfirmVisited** (boolean) Information on whether the payer visited the payment confirmation page in the imoje gateway. - **confirmVisitedAt** (integer | null) The date of transition to the payment confirmation page in the imoje gateway as a timestamp. - **returnUrl** (string(uri)) Return address from the external payment processing site in the event of an undetermined transaction status. The address must comply with the `RFC 3986`` URL standard. - **failureReturnUrl** (string(uri)) Return address from the external payment processing site in the event of a payment error. The address must comply with the `RFC 3986`` URL standard. - **successReturnUrl** (string(uri)) Return address from the external payment processing site in case of successful payment. The address must comply with the `RFC 3986`` URL standard. - **notificationUrl** (string(uri)) Dynamic notification address, possibility to set a specific address for a single transaction. Addresses containing `localhost` and ports will be rejected. - **customer** (object) Payer data - **transactions** (array[object]) List of transactions assigned to the payment link. ### 400 The link cannot be canceled. #### Body: application/json (object) - **apiErrorResponse** (object) [Powered by Bump.sh](https://bump.sh)