Create payment
curl --request POST \
--url https://api.prod.payana.cloud/public/api/v1/payments \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"beneficiary_reference": "8b1895e2-5b13-4fa1-9633-382639b6d0e3",
"amount": 10000,
"amount_currency": "USD",
"exchange_rate": 19,
"exchange_currency": "USD",
"file_path": "https://example.com/image.pdf",
"payable_payload": {
"expiration_date": "2025-01-01",
"issue_date": "2025-01-01",
"concept": "Payment of invoice 1234567890"
}
}
'import requests
url = "https://api.prod.payana.cloud/public/api/v1/payments"
payload = {
"beneficiary_reference": "8b1895e2-5b13-4fa1-9633-382639b6d0e3",
"amount": 10000,
"amount_currency": "USD",
"exchange_rate": 19,
"exchange_currency": "USD",
"file_path": "https://example.com/image.pdf",
"payable_payload": {
"expiration_date": "2025-01-01",
"issue_date": "2025-01-01",
"concept": "Payment of invoice 1234567890"
}
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
beneficiary_reference: '8b1895e2-5b13-4fa1-9633-382639b6d0e3',
amount: 10000,
amount_currency: 'USD',
exchange_rate: 19,
exchange_currency: 'USD',
file_path: 'https://example.com/image.pdf',
payable_payload: {
expiration_date: '2025-01-01',
issue_date: '2025-01-01',
concept: 'Payment of invoice 1234567890'
}
})
};
fetch('https://api.prod.payana.cloud/public/api/v1/payments', 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.prod.payana.cloud/public/api/v1/payments",
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([
'beneficiary_reference' => '8b1895e2-5b13-4fa1-9633-382639b6d0e3',
'amount' => 10000,
'amount_currency' => 'USD',
'exchange_rate' => 19,
'exchange_currency' => 'USD',
'file_path' => 'https://example.com/image.pdf',
'payable_payload' => [
'expiration_date' => '2025-01-01',
'issue_date' => '2025-01-01',
'concept' => 'Payment of invoice 1234567890'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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.prod.payana.cloud/public/api/v1/payments"
payload := strings.NewReader("{\n \"beneficiary_reference\": \"8b1895e2-5b13-4fa1-9633-382639b6d0e3\",\n \"amount\": 10000,\n \"amount_currency\": \"USD\",\n \"exchange_rate\": 19,\n \"exchange_currency\": \"USD\",\n \"file_path\": \"https://example.com/image.pdf\",\n \"payable_payload\": {\n \"expiration_date\": \"2025-01-01\",\n \"issue_date\": \"2025-01-01\",\n \"concept\": \"Payment of invoice 1234567890\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-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.prod.payana.cloud/public/api/v1/payments")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"beneficiary_reference\": \"8b1895e2-5b13-4fa1-9633-382639b6d0e3\",\n \"amount\": 10000,\n \"amount_currency\": \"USD\",\n \"exchange_rate\": 19,\n \"exchange_currency\": \"USD\",\n \"file_path\": \"https://example.com/image.pdf\",\n \"payable_payload\": {\n \"expiration_date\": \"2025-01-01\",\n \"issue_date\": \"2025-01-01\",\n \"concept\": \"Payment of invoice 1234567890\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.payana.cloud/public/api/v1/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"beneficiary_reference\": \"8b1895e2-5b13-4fa1-9633-382639b6d0e3\",\n \"amount\": 10000,\n \"amount_currency\": \"USD\",\n \"exchange_rate\": 19,\n \"exchange_currency\": \"USD\",\n \"file_path\": \"https://example.com/image.pdf\",\n \"payable_payload\": {\n \"expiration_date\": \"2025-01-01\",\n \"issue_date\": \"2025-01-01\",\n \"concept\": \"Payment of invoice 1234567890\"\n }\n}"
response = http.request(request)
puts response.read_body{
"reference": "8b1895e2-5b13-4fa1-9633-382639b6d0e3",
"beneficiary": {
"reference": "8b1895e2-5b13-4fa1-9633-382639b6d0e3",
"name": "John Doe",
"identifier_type": "NIT",
"identifier_number": "1234567890",
"is_deleted": true,
"deleted_at": "2019-08-24T14:15:22Z"
},
"document": null,
"amount": 10000,
"amount_currency": "USD",
"exchange_rate": 19,
"exchange_currency": "USD",
"status": "pending",
"file_path": "https://example.com/image.jpg",
"receipt_file_path": "https://example.com/image.jpg",
"is_archived": false,
"payable": {
"reference": "8b1895e2-5b13-4fa1-9633-382639b6d0e3",
"type": "advance",
"status": "paid",
"amount": 10000.65,
"amount_currency": "USD",
"file_path": "https://example.com/image.pdf",
"balance": 10000.65,
"issue_date": "2025-01-01",
"expiration_date": "2025-01-01",
"concept": "string",
"origin": "document",
"projects": []
},
"batch": null,
"tags": [],
"source_of_fund": null,
"accounting_receipt": null,
"paid_at": "2019-08-24T14:15:22Z",
"payment_method": "cash",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": {
"amount": [
"Amount must be greater than 0"
],
"beneficiary_id": [
"Beneficiary does not exist"
]
}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": {
"amount": [
"Amount must be greater than 0"
],
"beneficiary_id": [
"Beneficiary does not exist"
]
}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": {
"amount": [
"Amount must be greater than 0"
],
"beneficiary_id": [
"Beneficiary does not exist"
]
}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": {
"amount": [
"Amount must be greater than 0"
],
"beneficiary_id": [
"Beneficiary does not exist"
]
}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": {
"amount": [
"Amount must be greater than 0"
],
"beneficiary_id": [
"Beneficiary does not exist"
]
}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": {
"amount": [
"Amount must be greater than 0"
],
"beneficiary_id": [
"Beneficiary does not exist"
]
}
}
}Payments
Create Payment
Crea un nuevo pago (payment).
POST
/
payments
Create payment
curl --request POST \
--url https://api.prod.payana.cloud/public/api/v1/payments \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"beneficiary_reference": "8b1895e2-5b13-4fa1-9633-382639b6d0e3",
"amount": 10000,
"amount_currency": "USD",
"exchange_rate": 19,
"exchange_currency": "USD",
"file_path": "https://example.com/image.pdf",
"payable_payload": {
"expiration_date": "2025-01-01",
"issue_date": "2025-01-01",
"concept": "Payment of invoice 1234567890"
}
}
'import requests
url = "https://api.prod.payana.cloud/public/api/v1/payments"
payload = {
"beneficiary_reference": "8b1895e2-5b13-4fa1-9633-382639b6d0e3",
"amount": 10000,
"amount_currency": "USD",
"exchange_rate": 19,
"exchange_currency": "USD",
"file_path": "https://example.com/image.pdf",
"payable_payload": {
"expiration_date": "2025-01-01",
"issue_date": "2025-01-01",
"concept": "Payment of invoice 1234567890"
}
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
beneficiary_reference: '8b1895e2-5b13-4fa1-9633-382639b6d0e3',
amount: 10000,
amount_currency: 'USD',
exchange_rate: 19,
exchange_currency: 'USD',
file_path: 'https://example.com/image.pdf',
payable_payload: {
expiration_date: '2025-01-01',
issue_date: '2025-01-01',
concept: 'Payment of invoice 1234567890'
}
})
};
fetch('https://api.prod.payana.cloud/public/api/v1/payments', 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.prod.payana.cloud/public/api/v1/payments",
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([
'beneficiary_reference' => '8b1895e2-5b13-4fa1-9633-382639b6d0e3',
'amount' => 10000,
'amount_currency' => 'USD',
'exchange_rate' => 19,
'exchange_currency' => 'USD',
'file_path' => 'https://example.com/image.pdf',
'payable_payload' => [
'expiration_date' => '2025-01-01',
'issue_date' => '2025-01-01',
'concept' => 'Payment of invoice 1234567890'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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.prod.payana.cloud/public/api/v1/payments"
payload := strings.NewReader("{\n \"beneficiary_reference\": \"8b1895e2-5b13-4fa1-9633-382639b6d0e3\",\n \"amount\": 10000,\n \"amount_currency\": \"USD\",\n \"exchange_rate\": 19,\n \"exchange_currency\": \"USD\",\n \"file_path\": \"https://example.com/image.pdf\",\n \"payable_payload\": {\n \"expiration_date\": \"2025-01-01\",\n \"issue_date\": \"2025-01-01\",\n \"concept\": \"Payment of invoice 1234567890\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-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.prod.payana.cloud/public/api/v1/payments")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"beneficiary_reference\": \"8b1895e2-5b13-4fa1-9633-382639b6d0e3\",\n \"amount\": 10000,\n \"amount_currency\": \"USD\",\n \"exchange_rate\": 19,\n \"exchange_currency\": \"USD\",\n \"file_path\": \"https://example.com/image.pdf\",\n \"payable_payload\": {\n \"expiration_date\": \"2025-01-01\",\n \"issue_date\": \"2025-01-01\",\n \"concept\": \"Payment of invoice 1234567890\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.payana.cloud/public/api/v1/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"beneficiary_reference\": \"8b1895e2-5b13-4fa1-9633-382639b6d0e3\",\n \"amount\": 10000,\n \"amount_currency\": \"USD\",\n \"exchange_rate\": 19,\n \"exchange_currency\": \"USD\",\n \"file_path\": \"https://example.com/image.pdf\",\n \"payable_payload\": {\n \"expiration_date\": \"2025-01-01\",\n \"issue_date\": \"2025-01-01\",\n \"concept\": \"Payment of invoice 1234567890\"\n }\n}"
response = http.request(request)
puts response.read_body{
"reference": "8b1895e2-5b13-4fa1-9633-382639b6d0e3",
"beneficiary": {
"reference": "8b1895e2-5b13-4fa1-9633-382639b6d0e3",
"name": "John Doe",
"identifier_type": "NIT",
"identifier_number": "1234567890",
"is_deleted": true,
"deleted_at": "2019-08-24T14:15:22Z"
},
"document": null,
"amount": 10000,
"amount_currency": "USD",
"exchange_rate": 19,
"exchange_currency": "USD",
"status": "pending",
"file_path": "https://example.com/image.jpg",
"receipt_file_path": "https://example.com/image.jpg",
"is_archived": false,
"payable": {
"reference": "8b1895e2-5b13-4fa1-9633-382639b6d0e3",
"type": "advance",
"status": "paid",
"amount": 10000.65,
"amount_currency": "USD",
"file_path": "https://example.com/image.pdf",
"balance": 10000.65,
"issue_date": "2025-01-01",
"expiration_date": "2025-01-01",
"concept": "string",
"origin": "document",
"projects": []
},
"batch": null,
"tags": [],
"source_of_fund": null,
"accounting_receipt": null,
"paid_at": "2019-08-24T14:15:22Z",
"payment_method": "cash",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": {
"amount": [
"Amount must be greater than 0"
],
"beneficiary_id": [
"Beneficiary does not exist"
]
}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": {
"amount": [
"Amount must be greater than 0"
],
"beneficiary_id": [
"Beneficiary does not exist"
]
}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": {
"amount": [
"Amount must be greater than 0"
],
"beneficiary_id": [
"Beneficiary does not exist"
]
}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": {
"amount": [
"Amount must be greater than 0"
],
"beneficiary_id": [
"Beneficiary does not exist"
]
}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": {
"amount": [
"Amount must be greater than 0"
],
"beneficiary_id": [
"Beneficiary does not exist"
]
}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": {
"amount": [
"Amount must be greater than 0"
],
"beneficiary_id": [
"Beneficiary does not exist"
]
}
}
}Authorizations
API key provista por Payana.
Body
application/json
Payment payload
Referencia (UUID) del beneficiario.
Required range:
x >= 1Available options:
USD, COP, MXN, EUR Show child attributes
Show child attributes
Available options:
USD, COP, MXN, EUR Response
Payment created
Show child attributes
Show child attributes
Documento fuente del pago cuando el payable está vinculado a un documento (p. ej. factura sincronizada desde la DIAN/SAT). Es null en pagos manuales o anticipos sin documento asociado.
Show child attributes
Show child attributes
Available options:
USD, COP, MXN, EUR Available options:
USD, COP, MXN, EUR Estado del pago: pending (creado, sin procesar), in_process (en procesamiento), processed (acreditado) o failed (rechazado).
Available options:
pending, in_process, processed, failed Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I