curl --request POST \
--url https://sandbox.hyperswitch.io/blocklist/batch \
--header 'Content-Type: multipart/form-data' \
--header 'api-key: <api-key>' \
--data-binary $'<string>'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_POSTFIELDS => "<string>",
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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hyperswitch.io/blocklist/batch"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
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")
.body("<string>")
.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'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"total_rows": 1,
"status": "initiated"
}Blocklist batch upload
curl --request POST \
--url https://sandbox.hyperswitch.io/blocklist/batch \
--header 'Content-Type: multipart/form-data' \
--header 'api-key: <api-key>' \
--data-binary $'<string>'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_POSTFIELDS => "<string>",
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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hyperswitch.io/blocklist/batch"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
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")
.body("<string>")
.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'
request.body = "<string>"
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.
Headers
The business profile every entry in this upload is blocked under. Resolution follows the same rules as blocking a single entry.
Merchant ID of the connected merchant on whose behalf the operation is performed. Required when authenticating with a platform merchant's API key. Standard and connected merchants must not send it.
Query Parameters
Overrides every CSV row with payment or payout when selected. When omitted, row selections are used; missing or empty row values default to payment. The transaction namespace of a blocklist entry, stored as text.
payment, payout Body
A multipart/form-data request with a file field containing a UTF-8 CSV (max 5 MiB). The part's filename is recorded on the job and returned as file_name. The CSV header is type,data,metadata,transaction_type; older headers without transaction_type are accepted. type: one of generic_card_bin (6 to 10 digits), card_bin (6 digits), extended_card_bin (8 digits), fingerprint. metadata: optional, key=value pairs separated by ; (e.g. reason=fraud;source=manual). transaction_type: optional, payment (default) or payout; selection may differ per row. Invalid CSV transaction-type values are rejected even when a query override is selected. Maximum 100,000 data rows.
The body is of type string.
Was this page helpful?