Routing - Elimination
curl --request POST \
--url https://sandbox.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"decision_engine_configs": {
"threshold": 123
},
"params": [],
"elimination_analyser_config": {
"bucket_size": 1,
"bucket_leak_interval_in_secs": 1
}
}
'import requests
url = "https://sandbox.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create"
payload = {
"decision_engine_configs": { "threshold": 123 },
"params": [],
"elimination_analyser_config": {
"bucket_size": 1,
"bucket_leak_interval_in_secs": 1
}
}
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({
decision_engine_configs: {threshold: 123},
params: [],
elimination_analyser_config: {bucket_size: 1, bucket_leak_interval_in_secs: 1}
})
};
fetch('https://sandbox.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create', 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.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create",
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([
'decision_engine_configs' => [
'threshold' => 123
],
'params' => [
],
'elimination_analyser_config' => [
'bucket_size' => 1,
'bucket_leak_interval_in_secs' => 1
]
]),
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://sandbox.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create"
payload := strings.NewReader("{\n \"decision_engine_configs\": {\n \"threshold\": 123\n },\n \"params\": [],\n \"elimination_analyser_config\": {\n \"bucket_size\": 1,\n \"bucket_leak_interval_in_secs\": 1\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://sandbox.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"decision_engine_configs\": {\n \"threshold\": 123\n },\n \"params\": [],\n \"elimination_analyser_config\": {\n \"bucket_size\": 1,\n \"bucket_leak_interval_in_secs\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create")
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 \"decision_engine_configs\": {\n \"threshold\": 123\n },\n \"params\": [],\n \"elimination_analyser_config\": {\n \"bucket_size\": 1,\n \"bucket_leak_interval_in_secs\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"profile_id": "<string>",
"name": "<string>",
"kind": "single",
"description": "<string>",
"created_at": 123,
"modified_at": 123,
"algorithm_for": "payment",
"decision_engine_routing_id": "<string>"
}Routing
Routing - Elimination
Create a elimination based dynamic routing algorithm
POST
/
account
/
{account_id}
/
business_profile
/
{profile_id}
/
dynamic_routing
/
elimination
/
create
Routing - Elimination
curl --request POST \
--url https://sandbox.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"decision_engine_configs": {
"threshold": 123
},
"params": [],
"elimination_analyser_config": {
"bucket_size": 1,
"bucket_leak_interval_in_secs": 1
}
}
'import requests
url = "https://sandbox.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create"
payload = {
"decision_engine_configs": { "threshold": 123 },
"params": [],
"elimination_analyser_config": {
"bucket_size": 1,
"bucket_leak_interval_in_secs": 1
}
}
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({
decision_engine_configs: {threshold: 123},
params: [],
elimination_analyser_config: {bucket_size: 1, bucket_leak_interval_in_secs: 1}
})
};
fetch('https://sandbox.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create', 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.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create",
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([
'decision_engine_configs' => [
'threshold' => 123
],
'params' => [
],
'elimination_analyser_config' => [
'bucket_size' => 1,
'bucket_leak_interval_in_secs' => 1
]
]),
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://sandbox.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create"
payload := strings.NewReader("{\n \"decision_engine_configs\": {\n \"threshold\": 123\n },\n \"params\": [],\n \"elimination_analyser_config\": {\n \"bucket_size\": 1,\n \"bucket_leak_interval_in_secs\": 1\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://sandbox.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"decision_engine_configs\": {\n \"threshold\": 123\n },\n \"params\": [],\n \"elimination_analyser_config\": {\n \"bucket_size\": 1,\n \"bucket_leak_interval_in_secs\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.birrpay.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/create")
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 \"decision_engine_configs\": {\n \"threshold\": 123\n },\n \"params\": [],\n \"elimination_analyser_config\": {\n \"bucket_size\": 1,\n \"bucket_leak_interval_in_secs\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"profile_id": "<string>",
"name": "<string>",
"kind": "single",
"description": "<string>",
"created_at": 123,
"modified_at": 123,
"algorithm_for": "payment",
"decision_engine_routing_id": "<string>"
}Authorizations
api_keyjwt_key
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.
Path Parameters
Merchant id
Profile id under which Dynamic routing needs to be created
Query Parameters
Feature to enable for elimination based routing
Available options:
metrics, dynamic_connector_selection, none Body
application/json
Response
Routing Algorithm created
Available options:
single, priority, volume_split, advanced, dynamic, three_ds_decision_rule Available options:
payment, payout, three_ds_authentication