API to disconnect an existing payment config for given account
POST https://services.leadconnectorhq.com/payments/custom-provider/disconnect
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.
Query parameters
locationId
string
default:"Lk3nlfk4lxlelVEwcW"
required
Account id
Body
liveMode
boolean
default:"true"
required
Whether the config is for test mode or live mode. true represents config is for live payments
Respuestas
200 - Successful response
success
boolean
default:"true"
required
Whether the custom provider config is disconnect or not. true represents config is disconnect
400 - No such config exists for given locationId and marketplaceAppId
422 - Unprocessable Entity
Ejemplo
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);