curl --request GET \
--url https://sandbox.birrpay.io/relay/{relay_id} \
--header 'X-Profile-Id: <x-profile-id>' \
--header 'api-key: <api-key>'import requests
url = "https://sandbox.birrpay.io/relay/{relay_id}"
headers = {
"X-Profile-Id": "<x-profile-id>",
"api-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Profile-Id': '<x-profile-id>', 'api-key': '<api-key>'}
};
fetch('https://sandbox.birrpay.io/relay/{relay_id}', 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/relay/{relay_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Profile-Id: <x-profile-id>",
"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.birrpay.io/relay/{relay_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Profile-Id", "<x-profile-id>")
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://sandbox.birrpay.io/relay/{relay_id}")
.header("X-Profile-Id", "<x-profile-id>")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.birrpay.io/relay/{relay_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Profile-Id"] = '<x-profile-id>'
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "relay_mbabizu24mvu3mela5njyhpit4",
"status": "created",
"connector_resource_id": "pi_3MKEivSFNglxLpam0ZaL98q9",
"connector_id": "mca_5apGeP94tMts6rg3U3kR",
"profile_id": "pro_abcdefghijklmnopqrstuvwxyz",
"type": "refund",
"error": {
"code": "<string>",
"message": "<string>"
},
"connector_reference_id": "re_3QY4TnEOqOywnAIx1Mm1p7GQ",
"data": {
"refund": {
"amount": 6540,
"currency": "AED",
"reason": "Customer returned the product"
}
}
}Relay - Retrieve
Retrieves a relay details.
curl --request GET \
--url https://sandbox.birrpay.io/relay/{relay_id} \
--header 'X-Profile-Id: <x-profile-id>' \
--header 'api-key: <api-key>'import requests
url = "https://sandbox.birrpay.io/relay/{relay_id}"
headers = {
"X-Profile-Id": "<x-profile-id>",
"api-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Profile-Id': '<x-profile-id>', 'api-key': '<api-key>'}
};
fetch('https://sandbox.birrpay.io/relay/{relay_id}', 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/relay/{relay_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Profile-Id: <x-profile-id>",
"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.birrpay.io/relay/{relay_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Profile-Id", "<x-profile-id>")
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://sandbox.birrpay.io/relay/{relay_id}")
.header("X-Profile-Id", "<x-profile-id>")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.birrpay.io/relay/{relay_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Profile-Id"] = '<x-profile-id>'
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "relay_mbabizu24mvu3mela5njyhpit4",
"status": "created",
"connector_resource_id": "pi_3MKEivSFNglxLpam0ZaL98q9",
"connector_id": "mca_5apGeP94tMts6rg3U3kR",
"profile_id": "pro_abcdefghijklmnopqrstuvwxyz",
"type": "refund",
"error": {
"code": "<string>",
"message": "<string>"
},
"connector_reference_id": "re_3QY4TnEOqOywnAIx1Mm1p7GQ",
"data": {
"refund": {
"amount": 6540,
"currency": "AED",
"reason": "Customer returned the product"
}
}
}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
Profile ID for authentication
Path Parameters
The unique identifier for the Relay
Response
Relay Retrieved
The unique identifier for the Relay
"relay_mbabizu24mvu3mela5njyhpit4"
created, pending, success, failure The identifier that is associated to a resource at the connector reference to which the relay request is being made
"pi_3MKEivSFNglxLpam0ZaL98q9"
Identifier of the connector ( merchant connector account ) which was chosen to make the payment
"mca_5apGeP94tMts6rg3U3kR"
The business profile that is associated with this relay request.
"pro_abcdefghijklmnopqrstuvwxyz"
refund Show child attributes
Show child attributes
The identifier that is associated to a resource at the connector to which the relay request is being made
"re_3QY4TnEOqOywnAIx1Mm1p7GQ"
Show child attributes
Show child attributes