Connections
Create a Connection
Creates a connection in ACTIVE status from credentials and configuration you fill in based on the provider’s catalog.
POST
/
connections
Create a Connection
curl --request POST \
--url https://api-sandbox.y.uno/v1/connections \
--header 'Content-Type: application/json' \
--header 'PRIVATE-SECRET-KEY: <api-key>' \
--header 'PUBLIC-API-KEY: <api-key>' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--header 'X-account-code: <x-account-code>' \
--data '
{
"merchant_connection_id": "stripe-us-prod-001",
"provider_id": "STRIPE",
"flow_type": "PAYIN",
"payment_methods": [
"CARD"
],
"params": [
{
"param_id": "INTEGRATION_TYPE",
"value": "STRIPE_CHARGES"
},
{
"param_id": "SECRET_KEY",
"value": "sk_live_..."
},
{
"param_id": "RADAR_FRAUD_ANALYSIS",
"value": false
},
{
"param_id": "SEND_RECEIPT_EMAIL_PARAMETER",
"value": false
},
{
"param_id": "SETUP_FUTURE_USAGE",
"value": false
},
{
"param_id": "ORDER_ID",
"value": "DEFAULT"
}
],
"costs": [
{
"sort_number": 1,
"cost_name": "Transaction Fee",
"currency": "USD",
"cost_values": {
"successful": {
"fixed_fee": 0.3,
"percentage": 2.9
},
"unsuccessful": {
"fixed_fee": 0,
"percentage": 0
}
}
}
]
}
'import requests
url = "https://api-sandbox.y.uno/v1/connections"
payload = {
"merchant_connection_id": "stripe-us-prod-001",
"provider_id": "STRIPE",
"flow_type": "PAYIN",
"payment_methods": ["CARD"],
"params": [
{
"param_id": "INTEGRATION_TYPE",
"value": "STRIPE_CHARGES"
},
{
"param_id": "SECRET_KEY",
"value": "sk_live_..."
},
{
"param_id": "RADAR_FRAUD_ANALYSIS",
"value": False
},
{
"param_id": "SEND_RECEIPT_EMAIL_PARAMETER",
"value": False
},
{
"param_id": "SETUP_FUTURE_USAGE",
"value": False
},
{
"param_id": "ORDER_ID",
"value": "DEFAULT"
}
],
"costs": [
{
"sort_number": 1,
"cost_name": "Transaction Fee",
"currency": "USD",
"cost_values": {
"successful": {
"fixed_fee": 0.3,
"percentage": 2.9
},
"unsuccessful": {
"fixed_fee": 0,
"percentage": 0
}
}
}
]
}
headers = {
"X-account-code": "<x-account-code>",
"X-Idempotency-Key": "<x-idempotency-key>",
"PUBLIC-API-KEY": "<api-key>",
"PRIVATE-SECRET-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-account-code': '<x-account-code>',
'X-Idempotency-Key': '<x-idempotency-key>',
'PUBLIC-API-KEY': '<api-key>',
'PRIVATE-SECRET-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
merchant_connection_id: 'stripe-us-prod-001',
provider_id: 'STRIPE',
flow_type: 'PAYIN',
payment_methods: ['CARD'],
params: [
{param_id: 'INTEGRATION_TYPE', value: 'STRIPE_CHARGES'},
{param_id: 'SECRET_KEY', value: 'sk_live_...'},
{param_id: 'RADAR_FRAUD_ANALYSIS', value: false},
{param_id: 'SEND_RECEIPT_EMAIL_PARAMETER', value: false},
{param_id: 'SETUP_FUTURE_USAGE', value: false},
{param_id: 'ORDER_ID', value: 'DEFAULT'}
],
costs: [
{
sort_number: 1,
cost_name: 'Transaction Fee',
currency: 'USD',
cost_values: {
successful: {fixed_fee: 0.3, percentage: 2.9},
unsuccessful: {fixed_fee: 0, percentage: 0}
}
}
]
})
};
fetch('https://api-sandbox.y.uno/v1/connections', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchant_connection_id' => 'stripe-us-prod-001',
'provider_id' => 'STRIPE',
'flow_type' => 'PAYIN',
'payment_methods' => [
'CARD'
],
'params' => [
[
'param_id' => 'INTEGRATION_TYPE',
'value' => 'STRIPE_CHARGES'
],
[
'param_id' => 'SECRET_KEY',
'value' => 'sk_live_...'
],
[
'param_id' => 'RADAR_FRAUD_ANALYSIS',
'value' => false
],
[
'param_id' => 'SEND_RECEIPT_EMAIL_PARAMETER',
'value' => false
],
[
'param_id' => 'SETUP_FUTURE_USAGE',
'value' => false
],
[
'param_id' => 'ORDER_ID',
'value' => 'DEFAULT'
]
],
'costs' => [
[
'sort_number' => 1,
'cost_name' => 'Transaction Fee',
'currency' => 'USD',
'cost_values' => [
'successful' => [
'fixed_fee' => 0.3,
'percentage' => 2.9
],
'unsuccessful' => [
'fixed_fee' => 0,
'percentage' => 0
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"PRIVATE-SECRET-KEY: <api-key>",
"PUBLIC-API-KEY: <api-key>",
"X-Idempotency-Key: <x-idempotency-key>",
"X-account-code: <x-account-code>"
],
]);
$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"
payload := strings.NewReader("{\n \"merchant_connection_id\": \"stripe-us-prod-001\",\n \"provider_id\": \"STRIPE\",\n \"flow_type\": \"PAYIN\",\n \"payment_methods\": [\n \"CARD\"\n ],\n \"params\": [\n {\n \"param_id\": \"INTEGRATION_TYPE\",\n \"value\": \"STRIPE_CHARGES\"\n },\n {\n \"param_id\": \"SECRET_KEY\",\n \"value\": \"sk_live_...\"\n },\n {\n \"param_id\": \"RADAR_FRAUD_ANALYSIS\",\n \"value\": false\n },\n {\n \"param_id\": \"SEND_RECEIPT_EMAIL_PARAMETER\",\n \"value\": false\n },\n {\n \"param_id\": \"SETUP_FUTURE_USAGE\",\n \"value\": false\n },\n {\n \"param_id\": \"ORDER_ID\",\n \"value\": \"DEFAULT\"\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.3,\n \"percentage\": 2.9\n },\n \"unsuccessful\": {\n \"fixed_fee\": 0,\n \"percentage\": 0\n }\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-account-code", "<x-account-code>")
req.Header.Add("X-Idempotency-Key", "<x-idempotency-key>")
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.post("https://api-sandbox.y.uno/v1/connections")
.header("X-account-code", "<x-account-code>")
.header("X-Idempotency-Key", "<x-idempotency-key>")
.header("PUBLIC-API-KEY", "<api-key>")
.header("PRIVATE-SECRET-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_connection_id\": \"stripe-us-prod-001\",\n \"provider_id\": \"STRIPE\",\n \"flow_type\": \"PAYIN\",\n \"payment_methods\": [\n \"CARD\"\n ],\n \"params\": [\n {\n \"param_id\": \"INTEGRATION_TYPE\",\n \"value\": \"STRIPE_CHARGES\"\n },\n {\n \"param_id\": \"SECRET_KEY\",\n \"value\": \"sk_live_...\"\n },\n {\n \"param_id\": \"RADAR_FRAUD_ANALYSIS\",\n \"value\": false\n },\n {\n \"param_id\": \"SEND_RECEIPT_EMAIL_PARAMETER\",\n \"value\": false\n },\n {\n \"param_id\": \"SETUP_FUTURE_USAGE\",\n \"value\": false\n },\n {\n \"param_id\": \"ORDER_ID\",\n \"value\": \"DEFAULT\"\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.3,\n \"percentage\": 2.9\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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-account-code"] = '<x-account-code>'
request["X-Idempotency-Key"] = '<x-idempotency-key>'
request["PUBLIC-API-KEY"] = '<api-key>'
request["PRIVATE-SECRET-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_connection_id\": \"stripe-us-prod-001\",\n \"provider_id\": \"STRIPE\",\n \"flow_type\": \"PAYIN\",\n \"payment_methods\": [\n \"CARD\"\n ],\n \"params\": [\n {\n \"param_id\": \"INTEGRATION_TYPE\",\n \"value\": \"STRIPE_CHARGES\"\n },\n {\n \"param_id\": \"SECRET_KEY\",\n \"value\": \"sk_live_...\"\n },\n {\n \"param_id\": \"RADAR_FRAUD_ANALYSIS\",\n \"value\": false\n },\n {\n \"param_id\": \"SEND_RECEIPT_EMAIL_PARAMETER\",\n \"value\": false\n },\n {\n \"param_id\": \"SETUP_FUTURE_USAGE\",\n \"value\": false\n },\n {\n \"param_id\": \"ORDER_ID\",\n \"value\": \"DEFAULT\"\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.3,\n \"percentage\": 2.9\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-001",
"provider_id": "STRIPE",
"status": "ACTIVE",
"flow_type": "PAYIN",
"payment_methods": [
"CARD"
],
"params": [
{}
],
"costs": [
{}
],
"created_at": "2026-05-12T10:24:00Z",
"updated_at": "2026-05-12T10:24:00Z"
}{
"type": "validation_error",
"code": "MISSING_REQUIRED_PARAM",
"message": "Required param 'SECRET_KEY' is missing",
"details": {}
}{
"type": "auth_error",
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}{
"type": "conflict",
"code": "CONNECTION_MERCHANT_ID_CONFLICT",
"message": "A connection with this merchant_connection_id already exists"
}Creates a connection in
ACTIVE status from credentials and configuration you fill in based on the provider’s catalog. The response includes the connection_id you’ll use to reference this connection from routing rules.
Headers
string
required
Code of the account under which the connection is created. The account comes from this header, not from the request body.
string
required
UUID, 24-hour scope. Re-sending the same key + body returns the cached response; same key with a different body returns a
409.Body
string
required
Your label for this connection. Must be unique within the account. Free-form (e.g.,
"adyen-us-prod-001", "stripe-eu-test").string
required
Yuno provider identifier (e.g.,
"STRIPE", "ADYEN"). Must exist in the catalog.enum
Optional. Defaults to
"PAYIN", the only supported value.string[]
Optional. Subset of the provider’s
payment_method_type[] (from the catalog).Omit this field to enable every payment method the provider supports. Payment methods the provider adds later are added to the connection too.If you send it, include at least one payment method. An empty array ([]) is rejected with 400 VALIDATION_ERROR: either omit the field or send it with values.object[]
required
One
{param_id, value} pair per parameter you’re supplying. Flat array — even nested catalog params are submitted at the top level; Yuno resolves the hierarchy from the catalog tree.Required params (where the catalog has optional: false) must be present and non-empty. Activating a boolean parent ("value": true) makes its optional: false children required.object[]
Optional. Per-connection cost configuration. Omit it for a connection without costs.
currency must be one supported by the provider.Response
string
Unique identifier for the connection. Save this value to reference it from routing rules.
string
Your internal label for this connection.
string
The provider this connection belongs to (e.g.,
ADYEN).string
Current status (always
ACTIVE on create).string
Always
PAYIN.string[]
List of supported payment methods.
object[]
Echoed parameters. Sensitive values are masked as
***.object[]
Cost configuration for the connection.
string
ISO 8601 timestamp.
string
ISO 8601 timestamp.
curl -X POST 'https://api.y.uno/v1/connections' \
-H 'public-api-key: <YOUR_PUBLIC_KEY>' \
-H 'private-secret-key: <YOUR_SECRET_KEY>' \
-H 'X-account-code: <ACCOUNT_CODE>' \
-H 'Content-Type: application/json' \
-H 'X-Idempotency-Key: <UUID>' \
-d '{
"merchant_connection_id": "stripe-us-prod-001",
"provider_id": "STRIPE",
"flow_type": "PAYIN",
"payment_methods": ["CARD"],
"params": [
{ "param_id": "INTEGRATION_TYPE", "value": "STRIPE_CHARGES" },
{ "param_id": "SECRET_KEY", "value": "sk_live_..." },
{ "param_id": "RADAR_FRAUD_ANALYSIS", "value": false },
{ "param_id": "SEND_RECEIPT_EMAIL_PARAMETER", "value": false },
{ "param_id": "SETUP_FUTURE_USAGE", "value": false },
{ "param_id": "ORDER_ID", "value": "DEFAULT" }
],
"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 }
}
}
]
}'
{
"connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
"merchant_connection_id": "stripe-us-prod-001",
"provider_id": "STRIPE",
"status": "ACTIVE",
"flow_type": "PAYIN",
"payment_methods": ["CARD"],
"params": [
{ "param_id": "INTEGRATION_TYPE", "value": "STRIPE_CHARGES" },
{ "param_id": "SECRET_KEY", "value": "***" },
{ "param_id": "RADAR_FRAUD_ANALYSIS", "value": false },
{ "param_id": "SEND_RECEIPT_EMAIL_PARAMETER", "value": false },
{ "param_id": "SETUP_FUTURE_USAGE", "value": false },
{ "param_id": "ORDER_ID", "value": "DEFAULT" }
],
"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-12T10:24:00Z"
}
{
"connection_id": "b2c4d5e6-1a2b-3c4d-5e6f-7a8b9c0d1e2f",
"merchant_connection_id": "adyen-eu-prod-001",
"provider_id": "ADYEN",
"status": "ACTIVE",
"flow_type": "PAYIN",
"payment_methods": ["CARD", "GOOGLE_PAY"],
"params": [
{ "param_id": "merchantAccount", "value": "ACME_LIVE" },
{ "param_id": "x-api-key", "value": "***" },
{ "param_id": "transaction-identifier", "value": "MERCHANT_REFERENCE" }
],
"created_at": "2026-05-12T10:31:42Z",
"updated_at": "2026-05-12T10:31:42Z"
}
{
"type": "validation_error",
"code": "MISSING_REQUIRED_PARAM",
"message": "Required param 'SECRET_KEY' is missing for provider 'STRIPE'",
"details": { "provider_id": "STRIPE", "param_id": "SECRET_KEY" }
}
{
"type": "conflict",
"code": "CONNECTION_MERCHANT_ID_CONFLICT",
"message": "A connection with merchant_connection_id 'stripe-us-prod-001' already exists in this account",
"details": { "merchant_connection_id": "stripe-us-prod-001" }
}
Yuno validates
param_id values, required params and costs[].currency against the provider’s catalog. It does not call the provider to check the credentials, so a wrong key is accepted with 201.Secret handling: any param marked
secret: true in the catalog is returned as "value": "***". Your submitted secret is stored encrypted and never echoed back.Errors
| HTTP | code |
|---|---|
400 | PROVIDER_NOT_FOUNDUnknown provider_id. |
400 | MISSING_REQUIRED_PARAMA required param is missing. details.param_id names which one. |
400 | UNSUPPORTED_PAYMENT_METHODpayment_methods contains a method the provider doesn’t support. |
400 | NO_SUPPORTED_PAYMENT_METHODSpayment_methods was omitted and the provider has no payment method available for the connection’s integration type. |
400 | VALIDATION_ERRORThe body failed validation, for example payment_methods sent as an empty array. details names the field. |
400 | UNSUPPORTED_CURRENCYA costs[].currency isn’t in the provider’s supported list. |
401 | NOT_AUTHENTICATEDMissing or invalid API key. |
409 | CONNECTION_MERCHANT_ID_CONFLICTmerchant_connection_id already exists in this account. |
Authorizations
Headers
The account that owns the connection.
Body
application/json
Example:
"stripe-us-prod-001"
Example:
"STRIPE"
Show child attributes
Show child attributes
Optional. Defaults to PAYIN.
Example:
"PAYIN"
Optional. Subset of the provider's payment_method_type[]. Omit it to enable every payment method the provider supports, including ones added later. If sent, it must contain at least one value: an empty array is rejected with 400 VALIDATION_ERROR.
Minimum array length:
1Example:
["CARD"]
Optional. Per-connection cost configuration.
Show child attributes
Show child attributes
Response
Created
Example:
"f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e"
Example:
"stripe-us-prod-001"
Example:
"STRIPE"
Example:
"ACTIVE"
Example:
"PAYIN"
Example:
["CARD"]
Example:
"2026-05-12T10:24:00Z"
Example:
"2026-05-12T10:24:00Z"
Was this page helpful?
⌘I
Create a Connection
curl --request POST \
--url https://api-sandbox.y.uno/v1/connections \
--header 'Content-Type: application/json' \
--header 'PRIVATE-SECRET-KEY: <api-key>' \
--header 'PUBLIC-API-KEY: <api-key>' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--header 'X-account-code: <x-account-code>' \
--data '
{
"merchant_connection_id": "stripe-us-prod-001",
"provider_id": "STRIPE",
"flow_type": "PAYIN",
"payment_methods": [
"CARD"
],
"params": [
{
"param_id": "INTEGRATION_TYPE",
"value": "STRIPE_CHARGES"
},
{
"param_id": "SECRET_KEY",
"value": "sk_live_..."
},
{
"param_id": "RADAR_FRAUD_ANALYSIS",
"value": false
},
{
"param_id": "SEND_RECEIPT_EMAIL_PARAMETER",
"value": false
},
{
"param_id": "SETUP_FUTURE_USAGE",
"value": false
},
{
"param_id": "ORDER_ID",
"value": "DEFAULT"
}
],
"costs": [
{
"sort_number": 1,
"cost_name": "Transaction Fee",
"currency": "USD",
"cost_values": {
"successful": {
"fixed_fee": 0.3,
"percentage": 2.9
},
"unsuccessful": {
"fixed_fee": 0,
"percentage": 0
}
}
}
]
}
'import requests
url = "https://api-sandbox.y.uno/v1/connections"
payload = {
"merchant_connection_id": "stripe-us-prod-001",
"provider_id": "STRIPE",
"flow_type": "PAYIN",
"payment_methods": ["CARD"],
"params": [
{
"param_id": "INTEGRATION_TYPE",
"value": "STRIPE_CHARGES"
},
{
"param_id": "SECRET_KEY",
"value": "sk_live_..."
},
{
"param_id": "RADAR_FRAUD_ANALYSIS",
"value": False
},
{
"param_id": "SEND_RECEIPT_EMAIL_PARAMETER",
"value": False
},
{
"param_id": "SETUP_FUTURE_USAGE",
"value": False
},
{
"param_id": "ORDER_ID",
"value": "DEFAULT"
}
],
"costs": [
{
"sort_number": 1,
"cost_name": "Transaction Fee",
"currency": "USD",
"cost_values": {
"successful": {
"fixed_fee": 0.3,
"percentage": 2.9
},
"unsuccessful": {
"fixed_fee": 0,
"percentage": 0
}
}
}
]
}
headers = {
"X-account-code": "<x-account-code>",
"X-Idempotency-Key": "<x-idempotency-key>",
"PUBLIC-API-KEY": "<api-key>",
"PRIVATE-SECRET-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-account-code': '<x-account-code>',
'X-Idempotency-Key': '<x-idempotency-key>',
'PUBLIC-API-KEY': '<api-key>',
'PRIVATE-SECRET-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
merchant_connection_id: 'stripe-us-prod-001',
provider_id: 'STRIPE',
flow_type: 'PAYIN',
payment_methods: ['CARD'],
params: [
{param_id: 'INTEGRATION_TYPE', value: 'STRIPE_CHARGES'},
{param_id: 'SECRET_KEY', value: 'sk_live_...'},
{param_id: 'RADAR_FRAUD_ANALYSIS', value: false},
{param_id: 'SEND_RECEIPT_EMAIL_PARAMETER', value: false},
{param_id: 'SETUP_FUTURE_USAGE', value: false},
{param_id: 'ORDER_ID', value: 'DEFAULT'}
],
costs: [
{
sort_number: 1,
cost_name: 'Transaction Fee',
currency: 'USD',
cost_values: {
successful: {fixed_fee: 0.3, percentage: 2.9},
unsuccessful: {fixed_fee: 0, percentage: 0}
}
}
]
})
};
fetch('https://api-sandbox.y.uno/v1/connections', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchant_connection_id' => 'stripe-us-prod-001',
'provider_id' => 'STRIPE',
'flow_type' => 'PAYIN',
'payment_methods' => [
'CARD'
],
'params' => [
[
'param_id' => 'INTEGRATION_TYPE',
'value' => 'STRIPE_CHARGES'
],
[
'param_id' => 'SECRET_KEY',
'value' => 'sk_live_...'
],
[
'param_id' => 'RADAR_FRAUD_ANALYSIS',
'value' => false
],
[
'param_id' => 'SEND_RECEIPT_EMAIL_PARAMETER',
'value' => false
],
[
'param_id' => 'SETUP_FUTURE_USAGE',
'value' => false
],
[
'param_id' => 'ORDER_ID',
'value' => 'DEFAULT'
]
],
'costs' => [
[
'sort_number' => 1,
'cost_name' => 'Transaction Fee',
'currency' => 'USD',
'cost_values' => [
'successful' => [
'fixed_fee' => 0.3,
'percentage' => 2.9
],
'unsuccessful' => [
'fixed_fee' => 0,
'percentage' => 0
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"PRIVATE-SECRET-KEY: <api-key>",
"PUBLIC-API-KEY: <api-key>",
"X-Idempotency-Key: <x-idempotency-key>",
"X-account-code: <x-account-code>"
],
]);
$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"
payload := strings.NewReader("{\n \"merchant_connection_id\": \"stripe-us-prod-001\",\n \"provider_id\": \"STRIPE\",\n \"flow_type\": \"PAYIN\",\n \"payment_methods\": [\n \"CARD\"\n ],\n \"params\": [\n {\n \"param_id\": \"INTEGRATION_TYPE\",\n \"value\": \"STRIPE_CHARGES\"\n },\n {\n \"param_id\": \"SECRET_KEY\",\n \"value\": \"sk_live_...\"\n },\n {\n \"param_id\": \"RADAR_FRAUD_ANALYSIS\",\n \"value\": false\n },\n {\n \"param_id\": \"SEND_RECEIPT_EMAIL_PARAMETER\",\n \"value\": false\n },\n {\n \"param_id\": \"SETUP_FUTURE_USAGE\",\n \"value\": false\n },\n {\n \"param_id\": \"ORDER_ID\",\n \"value\": \"DEFAULT\"\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.3,\n \"percentage\": 2.9\n },\n \"unsuccessful\": {\n \"fixed_fee\": 0,\n \"percentage\": 0\n }\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-account-code", "<x-account-code>")
req.Header.Add("X-Idempotency-Key", "<x-idempotency-key>")
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.post("https://api-sandbox.y.uno/v1/connections")
.header("X-account-code", "<x-account-code>")
.header("X-Idempotency-Key", "<x-idempotency-key>")
.header("PUBLIC-API-KEY", "<api-key>")
.header("PRIVATE-SECRET-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_connection_id\": \"stripe-us-prod-001\",\n \"provider_id\": \"STRIPE\",\n \"flow_type\": \"PAYIN\",\n \"payment_methods\": [\n \"CARD\"\n ],\n \"params\": [\n {\n \"param_id\": \"INTEGRATION_TYPE\",\n \"value\": \"STRIPE_CHARGES\"\n },\n {\n \"param_id\": \"SECRET_KEY\",\n \"value\": \"sk_live_...\"\n },\n {\n \"param_id\": \"RADAR_FRAUD_ANALYSIS\",\n \"value\": false\n },\n {\n \"param_id\": \"SEND_RECEIPT_EMAIL_PARAMETER\",\n \"value\": false\n },\n {\n \"param_id\": \"SETUP_FUTURE_USAGE\",\n \"value\": false\n },\n {\n \"param_id\": \"ORDER_ID\",\n \"value\": \"DEFAULT\"\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.3,\n \"percentage\": 2.9\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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-account-code"] = '<x-account-code>'
request["X-Idempotency-Key"] = '<x-idempotency-key>'
request["PUBLIC-API-KEY"] = '<api-key>'
request["PRIVATE-SECRET-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_connection_id\": \"stripe-us-prod-001\",\n \"provider_id\": \"STRIPE\",\n \"flow_type\": \"PAYIN\",\n \"payment_methods\": [\n \"CARD\"\n ],\n \"params\": [\n {\n \"param_id\": \"INTEGRATION_TYPE\",\n \"value\": \"STRIPE_CHARGES\"\n },\n {\n \"param_id\": \"SECRET_KEY\",\n \"value\": \"sk_live_...\"\n },\n {\n \"param_id\": \"RADAR_FRAUD_ANALYSIS\",\n \"value\": false\n },\n {\n \"param_id\": \"SEND_RECEIPT_EMAIL_PARAMETER\",\n \"value\": false\n },\n {\n \"param_id\": \"SETUP_FUTURE_USAGE\",\n \"value\": false\n },\n {\n \"param_id\": \"ORDER_ID\",\n \"value\": \"DEFAULT\"\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.3,\n \"percentage\": 2.9\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-001",
"provider_id": "STRIPE",
"status": "ACTIVE",
"flow_type": "PAYIN",
"payment_methods": [
"CARD"
],
"params": [
{}
],
"costs": [
{}
],
"created_at": "2026-05-12T10:24:00Z",
"updated_at": "2026-05-12T10:24:00Z"
}{
"type": "validation_error",
"code": "MISSING_REQUIRED_PARAM",
"message": "Required param 'SECRET_KEY' is missing",
"details": {}
}{
"type": "auth_error",
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}{
"type": "conflict",
"code": "CONNECTION_MERCHANT_ID_CONFLICT",
"message": "A connection with this merchant_connection_id already exists"
}