Update Checkout Session
Updates an existing checkout session. You can modify the amount, metadata, or other mutable fields before the session expires or a payment is completed.
curl --request PATCH \
--url https://api-sandbox.y.uno/v1/checkout/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
--header 'Content-Type: application/json' \
--header 'public-api-key: YOUR_PUBLIC_API_KEY' \
--header 'private-secret-key: YOUR_PRIVATE_SECRET_KEY' \
--data '{
"country": "BR",
"amount": {
"currency": "ARS"
},
"merchant_order_id": "order-updated-456",
"payment_description": "Updated payment description",
"account_id": "YOUR_ACCOUNT_CODE",
"metadata": {
"order_id": "ORD-789"
}
}'import requests
url = "https://api-sandbox.y.uno/v1/checkout/sessions/{checkout_session_id}"
payload = {
"amount": {
"currency": "BRL",
"value": 200
},
"metadata": { "order_id": "ORD-789" }
}
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'public-api-key': '<api-key>',
'private-secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: {currency: 'BRL', value: 200}, metadata: {order_id: 'ORD-789'}})
};
fetch('https://api-sandbox.y.uno/v1/checkout/sessions/{checkout_session_id}', 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/checkout/sessions/{checkout_session_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'amount' => [
'currency' => 'BRL',
'value' => 200
],
'metadata' => [
'order_id' => 'ORD-789'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/checkout/sessions/{checkout_session_id}"
payload := strings.NewReader("{\n \"amount\": {\n \"currency\": \"BRL\",\n \"value\": 200\n },\n \"metadata\": {\n \"order_id\": \"ORD-789\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-sandbox.y.uno/v1/checkout/sessions/{checkout_session_id}")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": {\n \"currency\": \"BRL\",\n \"value\": 200\n },\n \"metadata\": {\n \"order_id\": \"ORD-789\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/checkout/sessions/{checkout_session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": {\n \"currency\": \"BRL\",\n \"value\": 200\n },\n \"metadata\": {\n \"order_id\": \"ORD-789\"\n }\n}"
response = http.request(request)
puts response.read_body{
"checkout_session": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"amount": {
"currency": "BRL",
"value": 150
},
"country": "BR",
"merchant_order_id": "order-20260301-001",
"status": "ACTIVE",
"created_at": "2026-03-01T14:30:00.000Z",
"payment_methods": [
{
"type": "CARD"
},
{
"type": "PIX"
},
{
"type": "BOLETO"
}
]
}{
"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"
]
}{
"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 checkout session to update
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Body
Response
Checkout session updated successfully
The checkout session identifier
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Show child attributes
Show child attributes
{ "currency": "BRL", "value": 100 }
ISO 3166-1 alpha-2 country code
"BR"
Your unique order identifier
"order-20260301-001"
Session status
"ACTIVE"
Session creation timestamp
"2026-03-01T14:30:00.000Z"
Available payment methods for this session
Show child attributes
Show child attributes
URL to receive server-side payment notifications
"https://merchant.com/webhooks/yuno"
URL to redirect the customer after payment completion (required for 3DS, PIX, and redirect-based methods)
"https://merchant.com/checkout/complete"
curl --request PATCH \
--url https://api-sandbox.y.uno/v1/checkout/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
--header 'Content-Type: application/json' \
--header 'public-api-key: YOUR_PUBLIC_API_KEY' \
--header 'private-secret-key: YOUR_PRIVATE_SECRET_KEY' \
--data '{
"country": "BR",
"amount": {
"currency": "ARS"
},
"merchant_order_id": "order-updated-456",
"payment_description": "Updated payment description",
"account_id": "YOUR_ACCOUNT_CODE",
"metadata": {
"order_id": "ORD-789"
}
}'import requests
url = "https://api-sandbox.y.uno/v1/checkout/sessions/{checkout_session_id}"
payload = {
"amount": {
"currency": "BRL",
"value": 200
},
"metadata": { "order_id": "ORD-789" }
}
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'public-api-key': '<api-key>',
'private-secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: {currency: 'BRL', value: 200}, metadata: {order_id: 'ORD-789'}})
};
fetch('https://api-sandbox.y.uno/v1/checkout/sessions/{checkout_session_id}', 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/checkout/sessions/{checkout_session_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'amount' => [
'currency' => 'BRL',
'value' => 200
],
'metadata' => [
'order_id' => 'ORD-789'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/checkout/sessions/{checkout_session_id}"
payload := strings.NewReader("{\n \"amount\": {\n \"currency\": \"BRL\",\n \"value\": 200\n },\n \"metadata\": {\n \"order_id\": \"ORD-789\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-sandbox.y.uno/v1/checkout/sessions/{checkout_session_id}")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": {\n \"currency\": \"BRL\",\n \"value\": 200\n },\n \"metadata\": {\n \"order_id\": \"ORD-789\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/checkout/sessions/{checkout_session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": {\n \"currency\": \"BRL\",\n \"value\": 200\n },\n \"metadata\": {\n \"order_id\": \"ORD-789\"\n }\n}"
response = http.request(request)
puts response.read_body{
"checkout_session": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"amount": {
"currency": "BRL",
"value": 150
},
"country": "BR",
"merchant_order_id": "order-20260301-001",
"status": "ACTIVE",
"created_at": "2026-03-01T14:30:00.000Z",
"payment_methods": [
{
"type": "CARD"
},
{
"type": "PIX"
},
{
"type": "BOLETO"
}
]
}{
"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"
]
}{
"code": "VALIDATION_ERROR",
"messages": [
"amount must be greater than 0",
"country must not be blank"
]
}