curl --request GET \
--url https://sandbox.hyperswitch.io/mandates/{mandate_id} \
--header 'api-key: <api-key>'import requests
url = "https://sandbox.hyperswitch.io/mandates/{mandate_id}"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://sandbox.hyperswitch.io/mandates/{mandate_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.hyperswitch.io/mandates/{mandate_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 => [
"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/mandates/{mandate_id}"
req, _ := http.NewRequest("GET", url, nil)
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.hyperswitch.io/mandates/{mandate_id}")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/mandates/{mandate_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"mandate_id": "<string>",
"status": "active",
"payment_method_id": "<string>",
"payment_method": "<string>",
"payment_method_type": "<string>",
"card": {
"last4_digits": "<string>",
"card_exp_month": "<string>",
"card_exp_year": "<string>",
"card_holder_name": "<string>",
"card_token": "<string>",
"scheme": "<string>",
"issuer_country": "<string>",
"card_fingerprint": "<string>",
"card_isin": "<string>",
"card_issuer": "<string>",
"card_network": "Visa",
"card_type": "<string>",
"nick_name": "<string>"
},
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "2022-09-10T10:11:12Z",
"online": {
"ip_address": "123.32.25.123",
"user_agent": "<string>"
}
}
}Mandates - Retrieve Mandate
Retrieves a mandate created using the Payments/Create API
curl --request GET \
--url https://sandbox.hyperswitch.io/mandates/{mandate_id} \
--header 'api-key: <api-key>'import requests
url = "https://sandbox.hyperswitch.io/mandates/{mandate_id}"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://sandbox.hyperswitch.io/mandates/{mandate_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.hyperswitch.io/mandates/{mandate_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 => [
"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/mandates/{mandate_id}"
req, _ := http.NewRequest("GET", url, nil)
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.hyperswitch.io/mandates/{mandate_id}")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/mandates/{mandate_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"mandate_id": "<string>",
"status": "active",
"payment_method_id": "<string>",
"payment_method": "<string>",
"payment_method_type": "<string>",
"card": {
"last4_digits": "<string>",
"card_exp_month": "<string>",
"card_exp_year": "<string>",
"card_holder_name": "<string>",
"card_token": "<string>",
"scheme": "<string>",
"issuer_country": "<string>",
"card_fingerprint": "<string>",
"card_isin": "<string>",
"card_issuer": "<string>",
"card_network": "Visa",
"card_type": "<string>",
"nick_name": "<string>"
},
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "2022-09-10T10:11:12Z",
"online": {
"ip_address": "123.32.25.123",
"user_agent": "<string>"
}
}
}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.
Path Parameters
The identifier for mandate
Response
The mandate was retrieved successfully
The identifier for mandate
The status of the mandate, which indicates whether it can be used to initiate a payment.
active, inactive, pending, revoked The identifier for payment method
The payment method
The payment method type
Show child attributes
Show child attributes
This "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.
Show child attributes
Show child attributes
Was this page helpful?