Conexiones
Crear una conexión
Crea una conexión en estado ACTIVE a partir de las credenciales y la configuración que completas según el catálogo del proveedor.
POST
/
connections
Crear una conexión
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"
}Crea una conexión en estado
ACTIVE a partir de las credenciales y la configuración que completas según el catálogo del proveedor. La respuesta incluye el connection_id que usarás para referenciar esta conexión desde las reglas de enrutamiento.
Encabezados
Código de la cuenta bajo la cual se crea la conexión. La cuenta proviene de este encabezado, no del cuerpo de la solicitud.
UUID, con alcance de 24 horas. Reenviar la misma clave y el mismo cuerpo devuelve la respuesta en caché; la misma clave con un cuerpo distinto devuelve un
409.Cuerpo
Tu etiqueta para esta conexión. Debe ser única dentro de la cuenta. Formato libre (por ejemplo,
"adyen-us-prod-001", "stripe-eu-test").Identificador del proveedor en Yuno (por ejemplo,
"STRIPE", "ADYEN"). Debe existir en el catálogo.Opcional. Subconjunto de los
payment_method_type[] del proveedor (del catálogo).Omite este campo para habilitar todos los métodos de pago que admite el proveedor. Los métodos de pago que el proveedor agregue más adelante también se agregan a la conexión.Si lo envías, incluye al menos un método de pago. Un arreglo vacío ([]) se rechaza con 400 VALIDATION_ERROR: omite el campo o envíalo con valores.Un par
{param_id, value} por cada parámetro que proporcionas. Arreglo plano: incluso los parámetros anidados del catálogo se envían en el nivel superior; Yuno resuelve la jerarquía a partir del árbol del catálogo.Los parámetros obligatorios (donde el catálogo tiene optional: false) deben estar presentes y no vacíos. Activar un padre boolean ("value": true) hace obligatorios a sus hijos con optional: false.Mostrar elemento
Mostrar elemento
Opcional. Configuración de costos por conexión. Omítela para una conexión sin costos.
currency debe ser una admitida por el proveedor.Respuesta
Identificador único de la conexión. Guarda este valor para referenciarla desde las reglas de enrutamiento.
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 valida los valores de
param_id, los parámetros obligatorios y costs[].currency contra el catálogo del proveedor. No llama al proveedor para verificar las credenciales, por lo que una clave incorrecta se acepta con 201.Manejo de secretos: cualquier parámetro marcado como
secret: true en el catálogo se devuelve como "value": "***". Tu secreto enviado se almacena cifrado y nunca se devuelve.Errores
| HTTP | code |
|---|---|
400 | PROVIDER_NOT_FOUNDprovider_id desconocido. |
400 | MISSING_REQUIRED_PARAMFalta un parámetro obligatorio. details.param_id indica cuál. |
400 | UNSUPPORTED_PAYMENT_METHODpayment_methods contiene un método que el proveedor no admite. |
400 | NO_SUPPORTED_PAYMENT_METHODSSe omitió payment_methods y el proveedor no tiene ningún método de pago disponible para el tipo de integración de la conexión. |
400 | VALIDATION_ERROREl cuerpo no pasó la validación, por ejemplo payment_methods enviado como un arreglo vacío. details indica el campo. |
400 | UNSUPPORTED_CURRENCYUn costs[].currency no está en la lista de monedas admitidas por el proveedor. |
401 | NOT_AUTHENTICATEDClave de API ausente o no válida. |
409 | CONNECTION_MERCHANT_ID_CONFLICTmerchant_connection_id ya existe en esta cuenta. |
Autorizaciones
Encabezados
Cuerpo
application/json
Opcional. Subconjunto de payment_method_type[] del proveedor. Omítelo para habilitar todos los métodos de pago que admite el proveedor, incluidos los que se agreguen más adelante. Si lo envías, debe contener al menos un valor: un arreglo vacío se rechaza con 400 VALIDATION_ERROR.
Minimum array length:
1Ejemplo:
["CARD"]
Respuesta
Creado
¿Esta página le ayudó?
⌘I
Crear una conexión
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"
}