Payment Links
Cancel Payment Link
Cancels an active payment link, preventing further payments through it.
POST
/
v1
/
payment-links
/
{payment_link_id}
/
cancel
Cancel payment link
curl --request POST \
--url https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "pl_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"url": "https://pay.y.uno/pl_a1b2c3d4",
"amount": {
"currency": "BRL",
"value": 250
},
"country": "BR",
"status": "ACTIVE",
"description": "Invoice #INV-2026-001",
"merchant_order_id": "order-link-001",
"expires_at": "2026-03-08T23:59:59.000Z",
"created_at": "2026-03-01T14:00:00.000Z"
}{
"code": "VALIDATION_ERROR",
"messages": [
"amount must be greater than 0",
"country must not be blank"
]
}{
"code": "VALIDATION_ERROR",
"messages": [
"amount must be greater than 0",
"country must not be blank"
]
}Authorizations
Your public API key from the Yuno Dashboard
Your private secret key (server-side only)
Path Parameters
The unique identifier of the payment link
Response
Payment link cancelled successfully
Example:
"pl_a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Shareable payment link URL
Example:
"https://pay.y.uno/pl_a1b2c3d4"
Show child attributes
Show child attributes
Example:
{ "currency": "BRL", "value": 100 }
Example:
"BR"
Available options:
ACTIVE, COMPLETED, CANCELLED, EXPIRED Example:
"ACTIVE"
Example:
"Invoice #INV-2026-001"
Example:
"order-link-001"
Example:
"2026-03-08T23:59:59.000Z"
Example:
"2026-03-01T14:00:00.000Z"
⌘I
Cancel payment link
curl --request POST \
--url https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/payment-links/{payment_link_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "pl_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"url": "https://pay.y.uno/pl_a1b2c3d4",
"amount": {
"currency": "BRL",
"value": 250
},
"country": "BR",
"status": "ACTIVE",
"description": "Invoice #INV-2026-001",
"merchant_order_id": "order-link-001",
"expires_at": "2026-03-08T23:59:59.000Z",
"created_at": "2026-03-01T14:00:00.000Z"
}{
"code": "VALIDATION_ERROR",
"messages": [
"amount must be greater than 0",
"country must not be blank"
]
}{
"code": "VALIDATION_ERROR",
"messages": [
"amount must be greater than 0",
"country must not be blank"
]
}