curl --request POST \
--url https://api-sandbox.y.uno/v1/payment-links \
--header 'Content-Type: application/json' \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>' \
--data '
{
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"description": "Test",
"country": "AR",
"merchant_order_id": "AA01",
"amount": {
"value": 5000,
"currency": "ARS"
},
"payment_method_types": [
"CARD"
],
"availability": {
"start_at": "2023-01-15T14:00:12Z",
"finish_at": "2023-12-29T14:00:12Z"
}
}
'import requests
url = "https://api-sandbox.y.uno/v1/payment-links"
payload = {
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"description": "Test",
"country": "AR",
"merchant_order_id": "AA01",
"amount": {
"value": 5000,
"currency": "ARS"
},
"payment_method_types": ["CARD"],
"availability": {
"start_at": "2023-01-15T14:00:12Z",
"finish_at": "2023-12-29T14:00:12Z"
}
}
headers = {
"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: {
'public-api-key': '<api-key>',
'private-secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_id: '493e9374-510a-4201-9e09-de669d75f256',
description: 'Test',
country: 'AR',
merchant_order_id: 'AA01',
amount: {value: 5000, currency: 'ARS'},
payment_method_types: ['CARD'],
availability: {start_at: '2023-01-15T14:00:12Z', finish_at: '2023-12-29T14:00:12Z'}
})
};
fetch('https://api-sandbox.y.uno/v1/payment-links', 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",
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([
'account_id' => '493e9374-510a-4201-9e09-de669d75f256',
'description' => 'Test',
'country' => 'AR',
'merchant_order_id' => 'AA01',
'amount' => [
'value' => 5000,
'currency' => 'ARS'
],
'payment_method_types' => [
'CARD'
],
'availability' => [
'start_at' => '2023-01-15T14:00:12Z',
'finish_at' => '2023-12-29T14:00:12Z'
]
]),
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/payment-links"
payload := strings.NewReader("{\n \"account_id\": \"493e9374-510a-4201-9e09-de669d75f256\",\n \"description\": \"Test\",\n \"country\": \"AR\",\n \"merchant_order_id\": \"AA01\",\n \"amount\": {\n \"value\": 5000,\n \"currency\": \"ARS\"\n },\n \"payment_method_types\": [\n \"CARD\"\n ],\n \"availability\": {\n \"start_at\": \"2023-01-15T14:00:12Z\",\n \"finish_at\": \"2023-12-29T14:00:12Z\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.y.uno/v1/payment-links")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"493e9374-510a-4201-9e09-de669d75f256\",\n \"description\": \"Test\",\n \"country\": \"AR\",\n \"merchant_order_id\": \"AA01\",\n \"amount\": {\n \"value\": 5000,\n \"currency\": \"ARS\"\n },\n \"payment_method_types\": [\n \"CARD\"\n ],\n \"availability\": {\n \"start_at\": \"2023-01-15T14:00:12Z\",\n \"finish_at\": \"2023-12-29T14:00:12Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/payment-links")
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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"493e9374-510a-4201-9e09-de669d75f256\",\n \"description\": \"Test\",\n \"country\": \"AR\",\n \"merchant_order_id\": \"AA01\",\n \"amount\": {\n \"value\": 5000,\n \"currency\": \"ARS\"\n },\n \"payment_method_types\": [\n \"CARD\"\n ],\n \"availability\": {\n \"start_at\": \"2023-01-15T14:00:12Z\",\n \"finish_at\": \"2023-12-29T14:00:12Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": "e1512b4d-9057-4c73-8e49-921c51eb5ba2",
"country": "US",
"availability": {
"start_at": "2023-01-15T14:00:12Z",
"finish_at": "2023-12-29T14:00:12Z"
},
"status": "CREATED",
"merchant_order_id": "AA01",
"description": "Test",
"amount": {
"currency": "USD",
"value": 5000
},
"capture": true,
"metadata": null,
"split_payment_methods": false,
"payment_method_types": [
"CARD"
],
"one_time_use": false,
"payments": null,
"callback_url": "https://checkout.sandbox.y.uno/payment/status",
"installments_plan": null,
"customer_payer": null,
"taxes": null,
"additional_data": {
"airline": null,
"order": null,
"seller_details": null
},
"account_code": "493e9374-510a-4201-9e09-de669d75f256",
"checkout_url": "https://checkout.sandbox.y.uno/payment?session=2f6d9754-43d0-4dca-b023-6aba4b107179",
"payments_number": 0,
"merchant_image": ""
}{
"code": "INVALID_REQUEST",
"messages": [
"Invalid request"
]
}Create Payment Link
curl --request POST \
--url https://api-sandbox.y.uno/v1/payment-links \
--header 'Content-Type: application/json' \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>' \
--data '
{
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"description": "Test",
"country": "AR",
"merchant_order_id": "AA01",
"amount": {
"value": 5000,
"currency": "ARS"
},
"payment_method_types": [
"CARD"
],
"availability": {
"start_at": "2023-01-15T14:00:12Z",
"finish_at": "2023-12-29T14:00:12Z"
}
}
'import requests
url = "https://api-sandbox.y.uno/v1/payment-links"
payload = {
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"description": "Test",
"country": "AR",
"merchant_order_id": "AA01",
"amount": {
"value": 5000,
"currency": "ARS"
},
"payment_method_types": ["CARD"],
"availability": {
"start_at": "2023-01-15T14:00:12Z",
"finish_at": "2023-12-29T14:00:12Z"
}
}
headers = {
"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: {
'public-api-key': '<api-key>',
'private-secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_id: '493e9374-510a-4201-9e09-de669d75f256',
description: 'Test',
country: 'AR',
merchant_order_id: 'AA01',
amount: {value: 5000, currency: 'ARS'},
payment_method_types: ['CARD'],
availability: {start_at: '2023-01-15T14:00:12Z', finish_at: '2023-12-29T14:00:12Z'}
})
};
fetch('https://api-sandbox.y.uno/v1/payment-links', 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",
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([
'account_id' => '493e9374-510a-4201-9e09-de669d75f256',
'description' => 'Test',
'country' => 'AR',
'merchant_order_id' => 'AA01',
'amount' => [
'value' => 5000,
'currency' => 'ARS'
],
'payment_method_types' => [
'CARD'
],
'availability' => [
'start_at' => '2023-01-15T14:00:12Z',
'finish_at' => '2023-12-29T14:00:12Z'
]
]),
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/payment-links"
payload := strings.NewReader("{\n \"account_id\": \"493e9374-510a-4201-9e09-de669d75f256\",\n \"description\": \"Test\",\n \"country\": \"AR\",\n \"merchant_order_id\": \"AA01\",\n \"amount\": {\n \"value\": 5000,\n \"currency\": \"ARS\"\n },\n \"payment_method_types\": [\n \"CARD\"\n ],\n \"availability\": {\n \"start_at\": \"2023-01-15T14:00:12Z\",\n \"finish_at\": \"2023-12-29T14:00:12Z\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.y.uno/v1/payment-links")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"493e9374-510a-4201-9e09-de669d75f256\",\n \"description\": \"Test\",\n \"country\": \"AR\",\n \"merchant_order_id\": \"AA01\",\n \"amount\": {\n \"value\": 5000,\n \"currency\": \"ARS\"\n },\n \"payment_method_types\": [\n \"CARD\"\n ],\n \"availability\": {\n \"start_at\": \"2023-01-15T14:00:12Z\",\n \"finish_at\": \"2023-12-29T14:00:12Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/payment-links")
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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"493e9374-510a-4201-9e09-de669d75f256\",\n \"description\": \"Test\",\n \"country\": \"AR\",\n \"merchant_order_id\": \"AA01\",\n \"amount\": {\n \"value\": 5000,\n \"currency\": \"ARS\"\n },\n \"payment_method_types\": [\n \"CARD\"\n ],\n \"availability\": {\n \"start_at\": \"2023-01-15T14:00:12Z\",\n \"finish_at\": \"2023-12-29T14:00:12Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": "e1512b4d-9057-4c73-8e49-921c51eb5ba2",
"country": "US",
"availability": {
"start_at": "2023-01-15T14:00:12Z",
"finish_at": "2023-12-29T14:00:12Z"
},
"status": "CREATED",
"merchant_order_id": "AA01",
"description": "Test",
"amount": {
"currency": "USD",
"value": 5000
},
"capture": true,
"metadata": null,
"split_payment_methods": false,
"payment_method_types": [
"CARD"
],
"one_time_use": false,
"payments": null,
"callback_url": "https://checkout.sandbox.y.uno/payment/status",
"installments_plan": null,
"customer_payer": null,
"taxes": null,
"additional_data": {
"airline": null,
"order": null,
"seller_details": null
},
"account_code": "493e9374-510a-4201-9e09-de669d75f256",
"checkout_url": "https://checkout.sandbox.y.uno/payment?session=2f6d9754-43d0-4dca-b023-6aba4b107179",
"payments_number": 0,
"merchant_image": ""
}{
"code": "INVALID_REQUEST",
"messages": [
"Invalid request"
]
}Authorizations
Body
The unique identifier of the account. You find this information on the Yuno Dashboard (MAX 64; MIN 36).
The customer's country code (MAX 2; MIN 2; ISO 3166-1) [Required].
AR, BO, BR, CL, CO, CR, EC, SV, GT, HN, MX, NI, PA, PY, PE, US, UY Specifies the payment amount object, with the value and currency.
Show child attributes
Show child attributes
The list of types of payment methods that customers can use. Check the available payment methods on Payment type. If no value is passed, Yuno will display the payment methods defined in the dashboard.
The description of the payment link (MAX 255; MIN 3).
Identification of the payment link transaction defined by the merchant (MAX 255; MIN 3).
Decides whether to authorize the payment or capture it. Authorizing a card payment allows you to reserve funds in a customer's bank account. If not set, true by default.
The type of the payment link.
The status of the payment link.
Payment method object (optional).
Installments plan configuration (optional).
Timezone for availability (e.g., UTC +03:00).
Number of payments associated with this link.
Allow split payment methods.
Specifies the payment taxes list. Only available for COL.
Show child attributes
Show child attributes
Specifies customer object for payments.
Show child attributes
Show child attributes
Specifies the additional_data object. This object is not mandatory. However, if you send this information, the payment experience will be enhanced for your user.
Show child attributes
Show child attributes
URL to redirect the customer after the payment (MAX 256).
true allows only one use, false multiple payments
The availability object. Refers to the Payment Link expiration date.
Show child attributes
Show child attributes
Specifies a list of metadata objects. You can add up to 50 metadata objects.
Show child attributes
Show child attributes
Flag to enroll the card after a successful payment
Response
200
"e1512b4d-9057-4c73-8e49-921c51eb5ba2"
"US"
Show child attributes
Show child attributes
"CREATED"
"AA01"
"Test"
Show child attributes
Show child attributes
true
false
false
"https://checkout.sandbox.y.uno/payment/status"
Show child attributes
Show child attributes
"493e9374-510a-4201-9e09-de669d75f256"
"https://checkout.sandbox.y.uno/payment?session=2f6d9754-43d0-4dca-b023-6aba4b107179"
0
""
Was this page helpful?