Update webhook
curl --request PUT \
--url https://api.opencard.io/api/v1/application/accounts/{accountId}/organizations/{organizationId}/webhooks/{webhookId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://your-app.com/hooks/opencard",
"card_transaction_cleared": true
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://your-app.com/hooks/opencard', card_transaction_cleared: true})
};
fetch('https://api.opencard.io/api/v1/application/accounts/{accountId}/organizations/{organizationId}/webhooks/{webhookId}', 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}"
payload = {
"url": "https://your-app.com/hooks/opencard",
"card_transaction_cleared": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://your-app.com/hooks/opencard',
'card_transaction_cleared' => true
]),
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": 5,
"organization_id": 3,
"url": "https://your-app.com/hooks/opencard",
"active": true,
"enabled": true,
"card_transaction_authorized": true,
"card_transaction_cleared": true,
"card_transaction_deleted": true,
"receipt_fetched": true
}Webhooks
Update webhook
Same body as create. Changing url runs the challenge handshake again.
PUT
/
accounts
/
{accountId}
/
organizations
/
{organizationId}
/
webhooks
/
{webhookId}
Update webhook
curl --request PUT \
--url https://api.opencard.io/api/v1/application/accounts/{accountId}/organizations/{organizationId}/webhooks/{webhookId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://your-app.com/hooks/opencard",
"card_transaction_cleared": true
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://your-app.com/hooks/opencard', card_transaction_cleared: true})
};
fetch('https://api.opencard.io/api/v1/application/accounts/{accountId}/organizations/{organizationId}/webhooks/{webhookId}', 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}"
payload = {
"url": "https://your-app.com/hooks/opencard",
"card_transaction_cleared": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://your-app.com/hooks/opencard',
'card_transaction_cleared' => true
]),
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": 5,
"organization_id": 3,
"url": "https://your-app.com/hooks/opencard",
"active": true,
"enabled": true,
"card_transaction_authorized": true,
"card_transaction_cleared": true,
"card_transaction_deleted": true,
"receipt_fetched": true
}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
Response
201 - application/json
Updated webhook

