Banks
Ecart Pay offers a comprehensive list of banks for conducting payouts and financial transactions.
By leveraging this catalog, businesses and users can ensure that their preferred bank is supported and streamline their payment processes. The banks catalog can be filtered by country, making it easy to identify the relevant financial institutions for your operations.
IMPORTANTTo follow the steps below, it is essential to have the corresponding Authorization Token. For more information, please refer to the following documentation page: Authorization Token
Get All Banks by Country
This endpoint provides a complete list of banks available in a specified country. It is especially useful for creating dropdown menus or verifying the banks compatible with Ecart Pay's services.
Visit our API Reference to test this endpoint.
Endpoint
GET {{baseURL}}/api/banks?country={{country_code}}
Headers
Authorization: {token}
Example Request (for Mexico)
curl --location 'https://sandbox.ecartpay.com/api/banks?country=MX' \
--header 'Authorization: <your_merchant_token>' \
--header 'Cookie: lang=en'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.ecartpay.com/api/banks?country=MX"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "<your_merchant_token>")
req.Header.Add("Cookie", "lang=en")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}GET /api/banks?country=MX HTTP/1.1
Host: sandbox.ecartpay.com
Authorization: <your_merchant_token>
Cookie: lang=en// OkHttp
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://sandbox.ecartpay.com/api/banks?country=MX")
.method("GET", body)
.addHeader("Authorization", "<your_merchant_token>")
.addHeader("Cookie", "lang=en")
.build();
Response response = client.newCall(request).execute();
// -------------------------------------------------------------
// Unirest
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://sandbox.ecartpay.com/api/banks?country=MX")
.header("Authorization", "<your_merchant_token>")
.header("Cookie", "lang=en")
.asString();// Fetch
const myHeaders = new Headers();
myHeaders.append("Authorization", "<your_merchant_token>");
myHeaders.append("Cookie", "lang=en");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://sandbox.ecartpay.com/api/banks?country=MX", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
// -------------------------------------------------------------
// jQuery
var settings = {
"url": "https://sandbox.ecartpay.com/api/banks?country=MX",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "<your_merchant_token>",
"Cookie": "lang=en"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
// -------------------------------------------------------------
// XHR
// WARNING: For GET requests, body is set to null by browsers.
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://sandbox.ecartpay.com/api/banks?country=MX");
xhr.setRequestHeader("Authorization", "<your_merchant_token>");
// WARNING: Cookies will be stripped away by the browser before sending the request.
xhr.setRequestHeader("Cookie", "lang=en");
xhr.send();CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(curl, CURLOPT_URL, "https://sandbox.ecartpay.com/api/banks?country=MX");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: <your_merchant_token>");
headers = curl_slist_append(headers, "Cookie: lang=en");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
res = curl_easy_perform(curl);
curl_slist_free_all(headers);
}
curl_easy_cleanup(curl);// Axios
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://sandbox.ecartpay.com/api/banks?country=MX',
headers: {
'Authorization': '<your_merchant_token>',
'Cookie': 'lang=en'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
// -------------------------------------------------------------
// Native
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'GET',
'hostname': 'sandbox.ecartpay.com',
'path': '/api/banks?country=MX',
'headers': {
'Authorization': '<your_merchant_token>',
'Cookie': 'lang=en'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
// -------------------------------------------------------------
// Request
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://sandbox.ecartpay.com/api/banks?country=MX',
'headers': {
'Authorization': '<your_merchant_token>',
'Cookie': 'lang=en'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
// -------------------------------------------------------------
// Unirest
var unirest = require('unirest');
var req = unirest('GET', 'https://sandbox.ecartpay.com/api/banks?country=MX')
.headers({
'Authorization': '<your_merchant_token>',
'Cookie': 'lang=en'
})
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandbox.ecartpay.com/api/banks?country=MX"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"Authorization": @"<your_merchant_token>",
@"Cookie": @"lang=en"
};
[request setAllHTTPHeaderFields:headers];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);open Lwt
open Cohttp
open Cohttp_lwt_unix
let reqBody =
let uri = Uri.of_string "https://sandbox.ecartpay.com/api/banks?country=MX" in
let headers = Header.init ()
|> fun h -> Header.add h "Authorization" "<your_merchant_token>"
|> fun h -> Header.add h "Cookie" "lang=en"
in
Client.call ~headers `GET uri >>= fun (_resp, body) ->
body |> Cohttp_lwt.Body.to_string >|= fun body -> body
let () =
let respBody = Lwt_main.run reqBody in
print_endline (respBody)// cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.ecartpay.com/api/banks?country=MX',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: <your_merchant_token>',
'Cookie: lang=en'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
// -------------------------------------------------------------
// Guzzle
<?php
$client = new Client();
$headers = [
'Authorization' => '<your_merchant_token>',
'Cookie' => 'lang=en'
];
$request = new Request('GET', 'https://sandbox.ecartpay.com/api/banks?country=MX', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
// -------------------------------------------------------------
// HTTP_Request2
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.ecartpay.com/api/banks?country=MX');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => '<your_merchant_token>',
'Cookie' => 'lang=en'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
// -------------------------------------------------------------
// pecl_http
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://sandbox.ecartpay.com/api/banks?country=MX');
$request->setRequestMethod('GET');
$request->setOptions(array());
$request->setHeaders(array(
'Authorization' => '<your_merchant_token>',
'Cookie' => 'lang=en'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "<your_merchant_token>")
$headers.Add("Cookie", "lang=en")
$response = Invoke-RestMethod 'https://sandbox.ecartpay.com/api/banks?country=MX' -Method 'GET' -Headers $headers
$response | ConvertTo-Json# http.client
import http.client
conn = http.client.HTTPSConnection("sandbox.ecartpay.com")
payload = ''
headers = {
'Authorization': '<your_merchant_token>',
'Cookie': 'lang=en'
}
conn.request("GET", "/api/banks?country=MX", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
// -------------------------------------------------------------
# Requests
import requests
url = "https://sandbox.ecartpay.com/api/banks?country=MX"
payload = {}
headers = {
'Authorization': '<your_merchant_token>',
'Cookie': 'lang=en'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)# httr
library(httr)
headers = c(
'Authorization' = '<your_merchant_token>',
'Cookie' = 'lang=en'
)
res <- VERB("GET", url = "https://sandbox.ecartpay.com/api/banks?country=MX", add_headers(headers))
cat(content(res, 'text'))
// -------------------------------------------------------------
# RCurl
library(RCurl)
headers = c(
"Authorization" = "<your_merchant_token>",
"Cookie" = "lang=en"
)
res <- getURL("https://sandbox.ecartpay.com/api/banks?country=MX", .opts=list(httpheader = headers, followlocation = TRUE))
cat(res)require "uri"
require "net/http"
url = URI("https://sandbox.ecartpay.com/api/banks?country=MX")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "<your_merchant_token>"
request["Cookie"] = "lang=en"
response = https.request(request)
puts response.read_body#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::Client::builder()
.build()?;
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("Authorization", "<your_merchant_token>".parse()?);
headers.insert("Cookie", "lang=en".parse()?);
let request = client.request(reqwest::Method::GET, "https://sandbox.ecartpay.com/api/banks?country=MX")
.headers(headers);
let response = request.send().await?;
let body = response.text().await?;
println!("{}", body);
Ok(())
}# Httpie
http --follow --timeout 3600 GET 'https://sandbox.ecartpay.com/api/banks?country=MX' \
Authorization:'<your_merchant_token>' \
Cookie:'lang=en'
// -------------------------------------------------------------
# wget
wget --no-check-certificate --quiet \
--method GET \
--timeout=0 \
--header 'Authorization: <your_merchant_token>' \
--header 'Cookie: lang=en' \
'https://sandbox.ecartpay.com/api/banks?country=MX'var request = URLRequest(url: URL(string: "https://sandbox.ecartpay.com/api/banks?country=MX")!,timeoutInterval: Double.infinity)
request.addValue("<your_merchant_token>", forHTTPHeaderField: "Authorization")
request.addValue("lang=en", forHTTPHeaderField: "Cookie")
request.httpMethod = "GET"
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}
task.resume()Example Response
[
{
"id": "5f331fb9f7480d71f16b91e9",
"clave": "40138",
"name": "ABC CAPITAL",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91fe",
"clave": "90614",
"name": "ACCIVAL",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91e6",
"clave": "40133",
"name": "ACTINVER",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91d5",
"clave": "40062",
"name": "AFIRME",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b920c",
"clave": "90638",
"name": "AKALA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91d8",
"clave": "40103",
"name": "AMERICAN EXPRES",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9212",
"clave": "90652",
"name": "ASEA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9216",
"clave": "90659",
"name": "ASP INTEGRA OPC",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91e1",
"clave": "40128",
"name": "AUTOFIN",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9219",
"clave": "90674",
"name": "AXA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91e0",
"clave": "40127",
"name": "AZTECA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91cd",
"clave": "40030",
"name": "BAJIO",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91d9",
"clave": "40106",
"name": "BAMSA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91c9",
"clave": "40002",
"name": "BANAMEX",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91e4",
"clave": "40131",
"name": "BANCO FAMSA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91f3",
"clave": "40154",
"name": "BANCO FINTERRA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91c3",
"clave": "37006",
"name": "BANCOMEXT",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91e8",
"clave": "40137",
"name": "BANCOPPEL",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91f2",
"clave": "40152",
"name": "BANCREA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91c5",
"clave": "37019",
"name": "BANJERCITO",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91ee",
"clave": "40147",
"name": "BANKAOOL",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91c4",
"clave": "37009",
"name": "BANOBRAS",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91d6",
"clave": "40072",
"name": "BANORTE/IXE",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91d2",
"clave": "40058",
"name": "BANREGIO",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91c7",
"clave": "37166",
"name": "BANSEFI",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91d4",
"clave": "40060",
"name": "BANSI",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91e2",
"clave": "40129",
"name": "BARCLAYS",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91ed",
"clave": "40145",
"name": "BBASE",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91ca",
"clave": "40012",
"name": "BBVA BANCOMER",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91dc",
"clave": "40112",
"name": "BMONEX",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b921a",
"clave": "90677",
"name": "CAJA POP MEXICA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b921f",
"clave": "90683",
"name": "CAJA TELEFONIST",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9202",
"clave": "90621",
"name": "CB ACTINVER",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9207",
"clave": "90630",
"name": "CB INTERCAM",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b920d",
"clave": "90640",
"name": "CB JPMORGAN",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9204",
"clave": "90626",
"name": "CBDEUTSCHE",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9208",
"clave": "90631",
"name": "CI BOLSA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91ec",
"clave": "40143",
"name": "CIBANCO",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9225",
"clave": "90901",
"name": "CLS",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91e3",
"clave": "40130",
"name": "COMPARTAMOS",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91ea",
"clave": "40140",
"name": "CONSUBANCO",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91df",
"clave": "40126",
"name": "CREDIT SUISSE",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b921d",
"clave": "90680",
"name": "CRISTOBAL COLON",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91de",
"clave": "40124",
"name": "DEUTSCHE",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91f1",
"clave": "40151",
"name": "DONDE",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91fb",
"clave": "90606",
"name": "ESTRUCTURADORES",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9210",
"clave": "90648",
"name": "EVERCORE",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91ff",
"clave": "90616",
"name": "FINAMEX",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9209",
"clave": "90634",
"name": "FINCOMUN",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b921c",
"clave": "90679",
"name": "FND",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9224",
"clave": "90689",
"name": "FOMPED",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9221",
"clave": "90685",
"name": "FONDO (FIRA)",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91f8",
"clave": "90601",
"name": "GBM",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b920a",
"clave": "90636",
"name": "HDI SEGUROS",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91c8",
"clave": "37168",
"name": "HIPOTECARIA FED",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91cc",
"clave": "40021",
"name": "HSBC",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9218",
"clave": "90671",
"name": "HUASTECAS",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91f4",
"clave": "40155",
"name": "ICBC",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91ce",
"clave": "40036",
"name": "INBURSA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9226",
"clave": "90902",
"name": "INDEVAL",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9223",
"clave": "90687",
"name": "INFONAVIT",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91f0",
"clave": "40150",
"name": "INMOBILIARIO",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91cf",
"clave": "40037",
"name": "INTERACCIONES",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91e7",
"clave": "40136",
"name": "INTERCAM BANCO",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9222",
"clave": "90686",
"name": "INVERCAP",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91d7",
"clave": "40102",
"name": "INVESTA BANK",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91d3",
"clave": "40059",
"name": "INVEX",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91db",
"clave": "40110",
"name": "JP MORGAN",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9213",
"clave": "90653",
"name": "KUSPIT",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9217",
"clave": "90670",
"name": "LIBERTAD",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91f9",
"clave": "90602",
"name": "MASARI",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91d0",
"clave": "40042",
"name": "MIFEL",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91f6",
"clave": "40158",
"name": "MIZUHO BANK",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91f7",
"clave": "90600",
"name": "MONEXCB",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91e5",
"clave": "40132",
"name": "MULTIVA BANCO",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91fd",
"clave": "90613",
"name": "MULTIVA CBOLSA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91c6",
"clave": "37135",
"name": "NAFIN",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b920b",
"clave": "90637",
"name": "ORDER",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9211",
"clave": "90649",
"name": "OSKNDIA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91ef",
"clave": "40148",
"name": "PAGATODO",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b921e",
"clave": "90681",
"name": "PRINCIPAL",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9201",
"clave": "90620",
"name": "PROFUTURO",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b920e",
"clave": "90642",
"name": "REFORMA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91f5",
"clave": "40156",
"name": "SABADELL",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91cb",
"clave": "40014",
"name": "SANTANDER",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91d1",
"clave": "40044",
"name": "SCOTIABANK",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9203",
"clave": "90623",
"name": "SKANDIA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9214",
"clave": "90655",
"name": "SOFIEXPRESS",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b920f",
"clave": "90646",
"name": "STP",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b921b",
"clave": "90678",
"name": "SURA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91da",
"clave": "40108",
"name": "TOKYO",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9220",
"clave": "90684",
"name": "TRANSFER",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9215",
"clave": "90656",
"name": "UNAGRA",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9200",
"clave": "90617",
"name": "VALMEX",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91fa",
"clave": "90605",
"name": "VALUE",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91dd",
"clave": "40113",
"name": "VE POR MAS",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91fc",
"clave": "90608",
"name": "VECTOR",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b91eb",
"clave": "40141",
"name": "VOLKSWAGEN",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9205",
"clave": "90627",
"name": "ZURICH",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
},
{
"id": "5f331fb9f7480d71f16b9206",
"clave": "90628",
"name": "ZURICHVI",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
}
]Get Single Bank
This endpoint allows you to retrieve detailed information about a specific bank by providing its unique ID. This is useful for confirming bank details or ensuring compatibility with Ecart Pay’s payout system.
Visit our API Reference to test this endpoint.
Endpoint
GET {{baseURL}}/api/banks/{{bank_id}}
Headers
Authorization: {token}
Example Request
curl --location 'https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9' \
--header 'Authorization: <your_merchant_token>' \
--header 'Cookie: lang=en'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "<your_merchant_token>")
req.Header.Add("Cookie", "lang=en")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}GET /api/banks/5f331fb9f7480d71f16b91e9 HTTP/1.1
Host: sandbox.ecartpay.com
Authorization: <your_merchant_token>
Cookie: lang=en// OkHttp
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9")
.method("GET", body)
.addHeader("Authorization", "<your_merchant_token>")
.addHeader("Cookie", "lang=en")
.build();
Response response = client.newCall(request).execute();
// -------------------------------------------------------------
// Unirest
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9")
.header("Authorization", "<your_merchant_token>")
.header("Cookie", "lang=en")
.asString();// Fetch
const myHeaders = new Headers();
myHeaders.append("Authorization", "<your_merchant_token>");
myHeaders.append("Cookie", "lang=en");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
// -------------------------------------------------------------
// jQuery
var settings = {
"url": "https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "<your_merchant_token>",
"Cookie": "lang=en"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
// -------------------------------------------------------------
// XHR
// WARNING: For GET requests, body is set to null by browsers.
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9");
xhr.setRequestHeader("Authorization", "<your_merchant_token>");
// WARNING: Cookies will be stripped away by the browser before sending the request.
xhr.setRequestHeader("Cookie", "lang=en");
xhr.send();CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(curl, CURLOPT_URL, "https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: <your_merchant_token>");
headers = curl_slist_append(headers, "Cookie: lang=en");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
res = curl_easy_perform(curl);
curl_slist_free_all(headers);
}
curl_easy_cleanup(curl);// Axios
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9',
headers: {
'Authorization': '<your_merchant_token>',
'Cookie': 'lang=en'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
// -------------------------------------------------------------
// Native
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'GET',
'hostname': 'sandbox.ecartpay.com',
'path': '/api/banks/5f331fb9f7480d71f16b91e9',
'headers': {
'Authorization': '<your_merchant_token>',
'Cookie': 'lang=en'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
// -------------------------------------------------------------
// Request
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9',
'headers': {
'Authorization': '<your_merchant_token>',
'Cookie': 'lang=en'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
// -------------------------------------------------------------
// Unirest
var unirest = require('unirest');
var req = unirest('GET', 'https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9')
.headers({
'Authorization': '<your_merchant_token>',
'Cookie': 'lang=en'
})
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"Authorization": @"<your_merchant_token>",
@"Cookie": @"lang=en"
};
[request setAllHTTPHeaderFields:headers];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);open Lwt
open Cohttp
open Cohttp_lwt_unix
let reqBody =
let uri = Uri.of_string "https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9" in
let headers = Header.init ()
|> fun h -> Header.add h "Authorization" "<your_merchant_token>"
|> fun h -> Header.add h "Cookie" "lang=en"
in
Client.call ~headers `GET uri >>= fun (_resp, body) ->
body |> Cohttp_lwt.Body.to_string >|= fun body -> body
let () =
let respBody = Lwt_main.run reqBody in
print_endline (respBody)// cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: <your_merchant_token>',
'Cookie: lang=en'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
// -------------------------------------------------------------
// Guzzle
<?php
$client = new Client();
$headers = [
'Authorization' => '<your_merchant_token>',
'Cookie' => 'lang=en'
];
$request = new Request('GET', 'https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
// -------------------------------------------------------------
// HTTP_Request2
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => '<your_merchant_token>',
'Cookie' => 'lang=en'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
// -------------------------------------------------------------
// pecl_http
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9');
$request->setRequestMethod('GET');
$request->setOptions(array());
$request->setHeaders(array(
'Authorization' => '<your_merchant_token>',
'Cookie' => 'lang=en'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "<your_merchant_token>")
$headers.Add("Cookie", "lang=en")
$response = Invoke-RestMethod 'https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9' -Method 'GET' -Headers $headers
$response | ConvertTo-Json# http.client
import http.client
conn = http.client.HTTPSConnection("sandbox.ecartpay.com")
payload = ''
headers = {
'Authorization': '<your_merchant_token>',
'Cookie': 'lang=en'
}
conn.request("GET", "/api/banks/5f331fb9f7480d71f16b91e9", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
// -------------------------------------------------------------
# Requests
import requests
url = "https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9"
payload = {}
headers = {
'Authorization': '<your_merchant_token>',
'Cookie': 'lang=en'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)# httr
library(httr)
headers = c(
'Authorization' = '<your_merchant_token>',
'Cookie' = 'lang=en'
)
res <- VERB("GET", url = "https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9", add_headers(headers))
cat(content(res, 'text'))
// -------------------------------------------------------------
# RCurl
library(RCurl)
headers = c(
"Authorization" = "<your_merchant_token>",
"Cookie" = "lang=en"
)
res <- getURL("https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9", .opts=list(httpheader = headers, followlocation = TRUE))
cat(res)require "uri"
require "net/http"
url = URI("https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "<your_merchant_token>"
request["Cookie"] = "lang=en"
response = https.request(request)
puts response.read_body#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::Client::builder()
.build()?;
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("Authorization", "<your_merchant_token>".parse()?);
headers.insert("Cookie", "lang=en".parse()?);
let request = client.request(reqwest::Method::GET, "https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9")
.headers(headers);
let response = request.send().await?;
let body = response.text().await?;
println!("{}", body);
Ok(())
}# Httpie
http --follow --timeout 3600 GET 'https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9' \
Authorization:'<your_merchant_token>' \
Cookie:'lang=en'
// -------------------------------------------------------------
# wget
wget --no-check-certificate --quiet \
--method GET \
--timeout=0 \
--header 'Authorization: <your_merchant_token>' \
--header 'Cookie: lang=en' \
'https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9'var request = URLRequest(url: URL(string: "https://sandbox.ecartpay.com/api/banks/5f331fb9f7480d71f16b91e9")!,timeoutInterval: Double.infinity)
request.addValue("<your_merchant_token>", forHTTPHeaderField: "Authorization")
request.addValue("lang=en", forHTTPHeaderField: "Cookie")
request.httpMethod = "GET"
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}
task.resume()Example Response
{
"id": "5f331fb9f7480d71f16b91e9",
"clave": 40138,
"name": "ABC CAPITAL",
"created_at": "2020-08-11T23:02:18.048Z",
"updated_at": "2020-08-11T23:02:18.048Z",
"country": "MX"
}By utilizing the banks catalog, users can build robust financial workflows and improve their payment systems, ensuring reliability and efficiency at every step.
Updated 3 days ago