Connections
Update a Connection
Partially updates a connection. Only the fields you send are applied; secrets stay masked.
PATCH
/
connections
/
{connection_id}
Update a Connection
curl --request PATCH \
--url https://api-sandbox.y.uno/v1/connections/{connection_id} \
--header 'Content-Type: application/json' \
--header 'PRIVATE-SECRET-KEY: <api-key>' \
--header 'PUBLIC-API-KEY: <api-key>' \
--data '
{
"account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"merchant_connection_id": "stripe-us-prod-002",
"params": [
{
"param_id": "API_KEY",
"value": "sk_live_..."
}
],
"costs": [
{
"sort_number": 1,
"cost_name": "Transaction Fee",
"currency": "USD",
"cost_values": {
"successful": {
"fixed_fee": 0.25,
"percentage": 2.7
},
"unsuccessful": {
"fixed_fee": 0,
"percentage": 0
}
}
}
]
}
'import requests
url = "https://api-sandbox.y.uno/v1/connections/{connection_id}"
payload = {
"account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"merchant_connection_id": "stripe-us-prod-002",
"params": [
{
"param_id": "API_KEY",
"value": "sk_live_..."
}
],
"costs": [
{
"sort_number": 1,
"cost_name": "Transaction Fee",
"currency": "USD",
"cost_values": {
"successful": {
"fixed_fee": 0.25,
"percentage": 2.7
},
"unsuccessful": {
"fixed_fee": 0,
"percentage": 0
}
}
}
]
}
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({
account_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
merchant_connection_id: 'stripe-us-prod-002',
params: [{param_id: 'API_KEY', value: 'sk_live_...'}],
costs: [
{
sort_number: 1,
cost_name: 'Transaction Fee',
currency: 'USD',
cost_values: {
successful: {fixed_fee: 0.25, percentage: 2.7},
unsuccessful: {fixed_fee: 0, percentage: 0}
}
}
]
})
};
fetch('https://api-sandbox.y.uno/v1/connections/{connection_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/connections/{connection_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([
'account_id' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'merchant_connection_id' => 'stripe-us-prod-002',
'params' => [
[
'param_id' => 'API_KEY',
'value' => 'sk_live_...'
]
],
'costs' => [
[
'sort_number' => 1,
'cost_name' => 'Transaction Fee',
'currency' => 'USD',
'cost_values' => [
'successful' => [
'fixed_fee' => 0.25,
'percentage' => 2.7
],
'unsuccessful' => [
'fixed_fee' => 0,
'percentage' => 0
]
]
]
]
]),
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/connections/{connection_id}"
payload := strings.NewReader("{\n \"account_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"merchant_connection_id\": \"stripe-us-prod-002\",\n \"params\": [\n {\n \"param_id\": \"API_KEY\",\n \"value\": \"sk_live_...\"\n }\n ],\n \"costs\": [\n {\n \"sort_number\": 1,\n \"cost_name\": \"Transaction Fee\",\n \"currency\": \"USD\",\n \"cost_values\": {\n \"successful\": {\n \"fixed_fee\": 0.25,\n \"percentage\": 2.7\n },\n \"unsuccessful\": {\n \"fixed_fee\": 0,\n \"percentage\": 0\n }\n }\n }\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/connections/{connection_id}")
.header("PUBLIC-API-KEY", "<api-key>")
.header("PRIVATE-SECRET-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"merchant_connection_id\": \"stripe-us-prod-002\",\n \"params\": [\n {\n \"param_id\": \"API_KEY\",\n \"value\": \"sk_live_...\"\n }\n ],\n \"costs\": [\n {\n \"sort_number\": 1,\n \"cost_name\": \"Transaction Fee\",\n \"currency\": \"USD\",\n \"cost_values\": {\n \"successful\": {\n \"fixed_fee\": 0.25,\n \"percentage\": 2.7\n },\n \"unsuccessful\": {\n \"fixed_fee\": 0,\n \"percentage\": 0\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/connections/{connection_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 \"account_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"merchant_connection_id\": \"stripe-us-prod-002\",\n \"params\": [\n {\n \"param_id\": \"API_KEY\",\n \"value\": \"sk_live_...\"\n }\n ],\n \"costs\": [\n {\n \"sort_number\": 1,\n \"cost_name\": \"Transaction Fee\",\n \"currency\": \"USD\",\n \"cost_values\": {\n \"successful\": {\n \"fixed_fee\": 0.25,\n \"percentage\": 2.7\n },\n \"unsuccessful\": {\n \"fixed_fee\": 0,\n \"percentage\": 0\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
"merchant_connection_id": "stripe-us-prod-002",
"provider_id": "STRIPE",
"status": "ACTIVE",
"flow_type": "PAYIN",
"payment_methods": [
"CARD",
"GOOGLE_PAY",
"APPLE_PAY"
],
"params": [
{
"param_id": "API_KEY",
"value": "***"
}
],
"costs": [
{
"sort_number": 1,
"cost_name": "Transaction Fee",
"currency": "USD"
}
],
"created_at": "2026-05-12T10:24:00Z",
"updated_at": "2026-05-12T11:02:17Z"
}{
"type": "validation_error",
"code": "UNKNOWN_PARAM",
"message": "Param 'FOO' is not part of the catalog for provider 'STRIPE'"
}{
"type": "auth_error",
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}{
"type": "not_found",
"code": "CONNECTION_NOT_FOUND",
"message": "Connection '...' was not found"
}{
"type": "conflict",
"code": "CONNECTION_MERCHANT_ID_CONFLICT",
"message": "A connection with merchant_connection_id 'stripe-us-prod-002' already exists in this account"
}Partially updates a connection you previously created. Only the fields present in the body are applied — anything you omit keeps its current value.
What you can’t change here:
provider_id, flow_type, payment_methods and the INTEGRATION_TYPE param are immutable. To change any of them, create a new connection and repoint your routing rules at it.Path Parameters
string
required
The id returned by Create a Connection. Must belong to the account your API key is scoped to.
Body
string
required
UUID of the account the connection belongs to.
string
New label for this connection. Max 255 characters, and must still be unique within the account. Omit it to keep the current label.
object[]
Params to change, as a flat array of
{param_id, value} pairs — the same shape as Create a Connection.Params are merged by param_id over the connection’s current params: a param_id you don’t send keeps its current value. You only need to send what you’re actually changing. Every param_id you do send is validated against the provider catalog.object[]
Cost configuration. Unlike
params, costs is not merged — when present it replaces the connection’s entire cost table. Omit it to leave the existing costs untouched.Response
Returns the refreshed connection, in the same shape as Retrieve a Connection.string
Unique identifier for the connection. Unchanged by an update.
string
Your internal label for this connection.
string
The provider this connection belongs to.
string
Current status.
string
Always
PAYIN.string[]
List of supported payment methods.
object[]
The connection’s full param set after the merge — not just the ones you sent. Sensitive values are masked as
***.object[]
Cost configuration for the connection.
string
ISO 8601 timestamp.
string
ISO 8601 timestamp. Bumped by a successful update.
curl -X PATCH 'https://api.y.uno/v1/connections/f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e' \
-H 'public-api-key: <YOUR_PUBLIC_KEY>' \
-H 'private-secret-key: <YOUR_SECRET_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"params": [
{ "param_id": "API_KEY", "value": "sk_live_new..." }
]
}'
curl -X PATCH 'https://api.y.uno/v1/connections/f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e' \
-H 'public-api-key: <YOUR_PUBLIC_KEY>' \
-H 'private-secret-key: <YOUR_SECRET_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"merchant_connection_id": "stripe-us-prod-002"
}'
{
"connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
"merchant_connection_id": "stripe-us-prod-002",
"provider_id": "STRIPE",
"status": "ACTIVE",
"flow_type": "PAYIN",
"payment_methods": ["CARD", "GOOGLE_PAY", "APPLE_PAY"],
"params": [
{ "param_id": "API_KEY", "value": "***" },
{ "param_id": "PUBLISHABLE_KEY", "value": "pk_live_..." },
{ "param_id": "INTEGRATION_TYPE", "value": "PAYMENT_INTENTS" },
{ "param_id": "3DS_ENABLED", "value": true },
{ "param_id": "ORIGIN_URL", "value": "https://checkout.acme.com" }
],
"costs": [
{
"sort_number": 1,
"cost_name": "Transaction Fee",
"currency": "USD",
"cost_values": {
"successful": { "fixed_fee": 0.30, "percentage": 2.9 },
"unsuccessful": { "fixed_fee": 0.0, "percentage": 0.0 }
}
}
],
"created_at": "2026-05-12T10:24:00Z",
"updated_at": "2026-05-12T11:02:17Z"
}
{
"type": "validation_error",
"code": "UNKNOWN_PARAM",
"message": "Param 'FOO' is not part of the catalog for provider 'STRIPE'",
"details": { "provider_id": "STRIPE", "param_id": "FOO" }
}
{
"type": "conflict",
"code": "CONNECTION_MERCHANT_ID_CONFLICT",
"message": "A connection with merchant_connection_id 'stripe-us-prod-002' already exists in this account",
"details": { "merchant_connection_id": "stripe-us-prod-002" }
}
Secret handling: params marked
secret: true in the catalog are always returned as "value": "***". Sending "***" back is not how you keep a secret — just omit the param_id entirely and its stored value is preserved.Errors
| HTTP | code |
|---|---|
400 | UNKNOWN_PARAMA param_id isn’t part of the provider’s catalog. |
400 | INVALID_PARAM_VALUEA value doesn’t match the catalog’s field_type or allowed options. |
400 | UNSUPPORTED_CURRENCYA costs[].currency isn’t in the provider’s supported list. |
400 | VALIDATION_ERRORconnection_id isn’t a valid UUID, or merchant_connection_id exceeds 255 characters. |
400 | MALFORMED_BODYThe body isn’t valid JSON. |
401 | NOT_AUTHENTICATEDMissing or invalid API key. |
404 | CONNECTION_NOT_FOUNDUnknown connection_id, or the id belongs to a different account. |
409 | CONNECTION_MERCHANT_ID_CONFLICTmerchant_connection_id already exists in this account. |
Authorizations
Path Parameters
Body
application/json
Response
OK
Example:
"f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e"
Example:
"stripe-us-prod-002"
Example:
"STRIPE"
Example:
"ACTIVE"
Example:
"PAYIN"
Example:
["CARD", "GOOGLE_PAY", "APPLE_PAY"]
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
"2026-05-12T10:24:00Z"
Example:
"2026-05-12T11:02:17Z"
Was this page helpful?
⌘I
Update a Connection
curl --request PATCH \
--url https://api-sandbox.y.uno/v1/connections/{connection_id} \
--header 'Content-Type: application/json' \
--header 'PRIVATE-SECRET-KEY: <api-key>' \
--header 'PUBLIC-API-KEY: <api-key>' \
--data '
{
"account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"merchant_connection_id": "stripe-us-prod-002",
"params": [
{
"param_id": "API_KEY",
"value": "sk_live_..."
}
],
"costs": [
{
"sort_number": 1,
"cost_name": "Transaction Fee",
"currency": "USD",
"cost_values": {
"successful": {
"fixed_fee": 0.25,
"percentage": 2.7
},
"unsuccessful": {
"fixed_fee": 0,
"percentage": 0
}
}
}
]
}
'import requests
url = "https://api-sandbox.y.uno/v1/connections/{connection_id}"
payload = {
"account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"merchant_connection_id": "stripe-us-prod-002",
"params": [
{
"param_id": "API_KEY",
"value": "sk_live_..."
}
],
"costs": [
{
"sort_number": 1,
"cost_name": "Transaction Fee",
"currency": "USD",
"cost_values": {
"successful": {
"fixed_fee": 0.25,
"percentage": 2.7
},
"unsuccessful": {
"fixed_fee": 0,
"percentage": 0
}
}
}
]
}
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({
account_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
merchant_connection_id: 'stripe-us-prod-002',
params: [{param_id: 'API_KEY', value: 'sk_live_...'}],
costs: [
{
sort_number: 1,
cost_name: 'Transaction Fee',
currency: 'USD',
cost_values: {
successful: {fixed_fee: 0.25, percentage: 2.7},
unsuccessful: {fixed_fee: 0, percentage: 0}
}
}
]
})
};
fetch('https://api-sandbox.y.uno/v1/connections/{connection_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/connections/{connection_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([
'account_id' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'merchant_connection_id' => 'stripe-us-prod-002',
'params' => [
[
'param_id' => 'API_KEY',
'value' => 'sk_live_...'
]
],
'costs' => [
[
'sort_number' => 1,
'cost_name' => 'Transaction Fee',
'currency' => 'USD',
'cost_values' => [
'successful' => [
'fixed_fee' => 0.25,
'percentage' => 2.7
],
'unsuccessful' => [
'fixed_fee' => 0,
'percentage' => 0
]
]
]
]
]),
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/connections/{connection_id}"
payload := strings.NewReader("{\n \"account_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"merchant_connection_id\": \"stripe-us-prod-002\",\n \"params\": [\n {\n \"param_id\": \"API_KEY\",\n \"value\": \"sk_live_...\"\n }\n ],\n \"costs\": [\n {\n \"sort_number\": 1,\n \"cost_name\": \"Transaction Fee\",\n \"currency\": \"USD\",\n \"cost_values\": {\n \"successful\": {\n \"fixed_fee\": 0.25,\n \"percentage\": 2.7\n },\n \"unsuccessful\": {\n \"fixed_fee\": 0,\n \"percentage\": 0\n }\n }\n }\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/connections/{connection_id}")
.header("PUBLIC-API-KEY", "<api-key>")
.header("PRIVATE-SECRET-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"merchant_connection_id\": \"stripe-us-prod-002\",\n \"params\": [\n {\n \"param_id\": \"API_KEY\",\n \"value\": \"sk_live_...\"\n }\n ],\n \"costs\": [\n {\n \"sort_number\": 1,\n \"cost_name\": \"Transaction Fee\",\n \"currency\": \"USD\",\n \"cost_values\": {\n \"successful\": {\n \"fixed_fee\": 0.25,\n \"percentage\": 2.7\n },\n \"unsuccessful\": {\n \"fixed_fee\": 0,\n \"percentage\": 0\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/connections/{connection_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 \"account_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"merchant_connection_id\": \"stripe-us-prod-002\",\n \"params\": [\n {\n \"param_id\": \"API_KEY\",\n \"value\": \"sk_live_...\"\n }\n ],\n \"costs\": [\n {\n \"sort_number\": 1,\n \"cost_name\": \"Transaction Fee\",\n \"currency\": \"USD\",\n \"cost_values\": {\n \"successful\": {\n \"fixed_fee\": 0.25,\n \"percentage\": 2.7\n },\n \"unsuccessful\": {\n \"fixed_fee\": 0,\n \"percentage\": 0\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
"merchant_connection_id": "stripe-us-prod-002",
"provider_id": "STRIPE",
"status": "ACTIVE",
"flow_type": "PAYIN",
"payment_methods": [
"CARD",
"GOOGLE_PAY",
"APPLE_PAY"
],
"params": [
{
"param_id": "API_KEY",
"value": "***"
}
],
"costs": [
{
"sort_number": 1,
"cost_name": "Transaction Fee",
"currency": "USD"
}
],
"created_at": "2026-05-12T10:24:00Z",
"updated_at": "2026-05-12T11:02:17Z"
}{
"type": "validation_error",
"code": "UNKNOWN_PARAM",
"message": "Param 'FOO' is not part of the catalog for provider 'STRIPE'"
}{
"type": "auth_error",
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}{
"type": "not_found",
"code": "CONNECTION_NOT_FOUND",
"message": "Connection '...' was not found"
}{
"type": "conflict",
"code": "CONNECTION_MERCHANT_ID_CONFLICT",
"message": "A connection with merchant_connection_id 'stripe-us-prod-002' already exists in this account"
}