API to disconnect an existing payment config for given account
http
POST https://services.leadconnectorhq.com/payments/custom-provider/disconnectAuthorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Query parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
locationId | string | Yes | Lk3nlfk4lxlelVEwcW | Account id |
Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
liveMode | boolean | Yes | true | Whether the config is for test mode or live mode. true represents config is for live payments |
Responses
200 - Successful response
success(boolean, required): Whether the custom provider config is disconnect or not. true represents config is disconnect Example:true
json
{
"success": "true"
}400 - No such config exists for given locationId and marketplaceAppId
json
{}422 - Unprocessable Entity
json
{}Example
curl -X POST 'https://services.leadconnectorhq.com/payments/custom-provider/disconnect' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"liveMode": "true"
}'const response = await fetch('https://services.leadconnectorhq.com/payments/custom-provider/disconnect', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"liveMode": "true"}),
});
const data = await response.json();import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/payments/custom-provider/disconnect',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"liveMode": "true"},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/payments/custom-provider/disconnect');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'liveMode': 'true'}),
]);
$data = json_decode(curl_exec($ch), true);