cURL
curl --request POST \
--url https://sandbox.hyperswitch.io/blocklist/batch \
--header 'Content-Type: multipart/form-data' \
--header 'api-key: <api-key>'import requests
url = "https://sandbox.hyperswitch.io/blocklist/batch"
headers = {
"api-key": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'multipart/form-data'}
};
fetch('https://sandbox.hyperswitch.io/blocklist/batch', 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://sandbox.hyperswitch.io/blocklist/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"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://sandbox.hyperswitch.io/blocklist/batch"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "multipart/form-data")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hyperswitch.io/blocklist/batch")
.header("api-key", "<api-key>")
.header("Content-Type", "multipart/form-data")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/blocklist/batch")
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"] = 'multipart/form-data'
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"total_rows": 1,
"status": "initiated"
}Blocklist
Blocklist batch upload
POST
/
blocklist
/
batch
cURL
curl --request POST \
--url https://sandbox.hyperswitch.io/blocklist/batch \
--header 'Content-Type: multipart/form-data' \
--header 'api-key: <api-key>'import requests
url = "https://sandbox.hyperswitch.io/blocklist/batch"
headers = {
"api-key": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'multipart/form-data'}
};
fetch('https://sandbox.hyperswitch.io/blocklist/batch', 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://sandbox.hyperswitch.io/blocklist/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"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://sandbox.hyperswitch.io/blocklist/batch"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "multipart/form-data")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hyperswitch.io/blocklist/batch")
.header("api-key", "<api-key>")
.header("Content-Type", "multipart/form-data")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/blocklist/batch")
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"] = 'multipart/form-data'
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"total_rows": 1,
"status": "initiated"
}Authorizations
Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Body
multipart/form-data
A multipart/form-data request with a file field containing a UTF-8 CSV (max 5 MB). The CSV must have a header row: type,data,metadata. type: one of card_bin (6 digits), extended_card_bin (8 digits), fingerprint. metadata: optional, key=value pairs separated by ; (e.g. reason=fraud;source=manual). Maximum 100,000 data rows.
The body is of type string.