API Key - Revoke
curl --request DELETE \
--url https://api.sandbox.pesaswap.io/api_keys/{merchant_id}/{key_id} \
--header 'api-key: <api-key>'const options = {method: 'DELETE', headers: {'api-key': '<api-key>'}};
fetch('https://api.sandbox.pesaswap.io/api_keys/{merchant_id}/{key_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sandbox.pesaswap.io/api_keys/{merchant_id}/{key_id}"
headers = {"api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.pesaswap.io/api_keys/{merchant_id}/{key_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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;
}{
"merchant_id": "y3oqhf46pyzuxjbcn2giaqnb44",
"key_id": "5hEEqkgJUyuxgSKGArHA4mWSnX",
"revoked": "true"
}API Key
API Key - Revoke
Revoke the specified API Key. Once revoked, the API Key can no longer be used for authenticating with our APIs.
DELETE
/
api_keys
/
{merchant_id}
/
{key_id}
API Key - Revoke
curl --request DELETE \
--url https://api.sandbox.pesaswap.io/api_keys/{merchant_id}/{key_id} \
--header 'api-key: <api-key>'const options = {method: 'DELETE', headers: {'api-key': '<api-key>'}};
fetch('https://api.sandbox.pesaswap.io/api_keys/{merchant_id}/{key_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sandbox.pesaswap.io/api_keys/{merchant_id}/{key_id}"
headers = {"api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.pesaswap.io/api_keys/{merchant_id}/{key_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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;
}{
"merchant_id": "y3oqhf46pyzuxjbcn2giaqnb44",
"key_id": "5hEEqkgJUyuxgSKGArHA4mWSnX",
"revoked": "true"
}Authorizations
Path Parameters
Response
API Key revoked
The response body for revoking an API Key.