Add webhook group
curl --request POST \
--url https://api.opencard.io/api/v1/application/accounts/{accountId}/organizations/{organizationId}/webhooks/{webhookId}/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"buyer_party_sub_id": "5561234567"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({buyer_party_sub_id: '5561234567'})
};
fetch('https://api.opencard.io/api/v1/application/accounts/{accountId}/organizations/{organizationId}/webhooks/{webhookId}/groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.opencard.io/api/v1/application/accounts/{accountId}/organizations/{organizationId}/webhooks/{webhookId}/groups"
payload = { "buyer_party_sub_id": "5561234567" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opencard.io/api/v1/application/accounts/{accountId}/organizations/{organizationId}/webhooks/{webhookId}/groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'buyer_party_sub_id' => '5561234567'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": 4,
"webhook_id": 5,
"buyer_party_sub_id": "5561234567"
}Webhooks
Add webhook group
POST
/
accounts
/
{accountId}
/
organizations
/
{organizationId}
/
webhooks
/
{webhookId}
/
groups
Add webhook group
curl --request POST \
--url https://api.opencard.io/api/v1/application/accounts/{accountId}/organizations/{organizationId}/webhooks/{webhookId}/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"buyer_party_sub_id": "5561234567"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({buyer_party_sub_id: '5561234567'})
};
fetch('https://api.opencard.io/api/v1/application/accounts/{accountId}/organizations/{organizationId}/webhooks/{webhookId}/groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.opencard.io/api/v1/application/accounts/{accountId}/organizations/{organizationId}/webhooks/{webhookId}/groups"
payload = { "buyer_party_sub_id": "5561234567" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opencard.io/api/v1/application/accounts/{accountId}/organizations/{organizationId}/webhooks/{webhookId}/groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'buyer_party_sub_id' => '5561234567'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": 4,
"webhook_id": 5,
"buyer_party_sub_id": "5561234567"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Your account ID
Organization ID
Webhook ID
Body
application/json
Buyer party (organization number) this webhook should receive transactions for
Response
201 - application/json
Group created

