List banks
curl --request GET \
--url https://api.prod.payana.cloud/public/api/v1/banks \
--header 'api-key: <api-key>'import requests
url = "https://api.prod.payana.cloud/public/api/v1/banks"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://api.prod.payana.cloud/public/api/v1/banks', 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/banks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.prod.payana.cloud/public/api/v1/banks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.prod.payana.cloud/public/api/v1/banks")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.payana.cloud/public/api/v1/banks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"reference": "8b1895e2-5b13-4fa1-9633-382639b6d0e3",
"name": "Banco de Bogotá",
"bank_code": "001",
"logo": "https://example.com/logo.png"
},
{
"reference": "9c2a8e3f-6b24-5fb2-a744-493750c7e1f4",
"name": "Banco de Occidente",
"bank_code": "023",
"logo": "https://example.com/logo2.png"
}
]{
"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"
]
}
}
}Banks
List Banks
Lista todos los bancos disponibles para el país de la compañía.
GET
/
banks
List banks
curl --request GET \
--url https://api.prod.payana.cloud/public/api/v1/banks \
--header 'api-key: <api-key>'import requests
url = "https://api.prod.payana.cloud/public/api/v1/banks"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://api.prod.payana.cloud/public/api/v1/banks', 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/banks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.prod.payana.cloud/public/api/v1/banks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.prod.payana.cloud/public/api/v1/banks")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.payana.cloud/public/api/v1/banks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"reference": "8b1895e2-5b13-4fa1-9633-382639b6d0e3",
"name": "Banco de Bogotá",
"bank_code": "001",
"logo": "https://example.com/logo.png"
},
{
"reference": "9c2a8e3f-6b24-5fb2-a744-493750c7e1f4",
"name": "Banco de Occidente",
"bank_code": "023",
"logo": "https://example.com/logo2.png"
}
]{
"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"
]
}
}
}⌘I