curl --request POST \
--url https://api.fintoc.com/v1/webhook_endpoints \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled_events": [
"link.credentials_changed"
],
"url": "https://my.webhook.endpoint",
"description": "Webhook endpoint for payment events.",
"name": "My webhook endpoint"
}
'import requests
url = "https://api.fintoc.com/v1/webhook_endpoints"
payload = {
"enabled_events": ["link.credentials_changed"],
"url": "https://my.webhook.endpoint",
"description": "Webhook endpoint for payment events.",
"name": "My webhook endpoint"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled_events: ['link.credentials_changed'],
url: 'https://my.webhook.endpoint',
description: 'Webhook endpoint for payment events.',
name: 'My webhook endpoint'
})
};
fetch('https://api.fintoc.com/v1/webhook_endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fintoc.com/v1/webhook_endpoints",
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([
'enabled_events' => [
'link.credentials_changed'
],
'url' => 'https://my.webhook.endpoint',
'description' => 'Webhook endpoint for payment events.',
'name' => 'My webhook endpoint'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v1/webhook_endpoints"
payload := strings.NewReader("{\n \"enabled_events\": [\n \"link.credentials_changed\"\n ],\n \"url\": \"https://my.webhook.endpoint\",\n \"description\": \"Webhook endpoint for payment events.\",\n \"name\": \"My webhook endpoint\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fintoc.com/v1/webhook_endpoints")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled_events\": [\n \"link.credentials_changed\"\n ],\n \"url\": \"https://my.webhook.endpoint\",\n \"description\": \"Webhook endpoint for payment events.\",\n \"name\": \"My webhook endpoint\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/webhook_endpoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled_events\": [\n \"link.credentials_changed\"\n ],\n \"url\": \"https://my.webhook.endpoint\",\n \"description\": \"Webhook endpoint for payment events.\",\n \"name\": \"My webhook endpoint\"\n}"
response = http.request(request)
puts response.read_body{
"id": "we_M6yrvOepCe3Rqp8B",
"object": "webhook_endpoint",
"created_at": "2021-05-17T17:04:10.284Z",
"description": "Webhook endpoint for payment events.",
"enabled_events": [
"link.credentials_changed"
],
"mode": "live",
"name": "My webhook endpoint",
"secret": "whsec_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ",
"status": "enabled",
"url": "https://my.webhook.endpoint"
}Create a webhook endpoint
Creates a webhook endpoint that will receive notifications for the given enabled_events. The endpoint is created in the live or test mode of the API key used. The response includes the signing secret used to verify webhook payloads. Fintoc returns the secret only on creation, so store it securely. Your organization can have up to 16 enabled webhook endpoints in each mode. Creating, enabling, or changing the URL of a webhook endpoint counts as a change. Your organization can make up to 10 changes per hour and 30 per day across both modes. The counts reset at the start of each hour and each day, in UTC. If a delivery fails, Fintoc retries it. In test mode, Fintoc makes up to 3 delivery attempts over 3 hours. In live mode, Fintoc makes up to 17 delivery attempts over about 3 days. Fintoc doesn’t retry deliveries to a disabled or deleted webhook endpoint.
curl --request POST \
--url https://api.fintoc.com/v1/webhook_endpoints \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled_events": [
"link.credentials_changed"
],
"url": "https://my.webhook.endpoint",
"description": "Webhook endpoint for payment events.",
"name": "My webhook endpoint"
}
'import requests
url = "https://api.fintoc.com/v1/webhook_endpoints"
payload = {
"enabled_events": ["link.credentials_changed"],
"url": "https://my.webhook.endpoint",
"description": "Webhook endpoint for payment events.",
"name": "My webhook endpoint"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled_events: ['link.credentials_changed'],
url: 'https://my.webhook.endpoint',
description: 'Webhook endpoint for payment events.',
name: 'My webhook endpoint'
})
};
fetch('https://api.fintoc.com/v1/webhook_endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fintoc.com/v1/webhook_endpoints",
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([
'enabled_events' => [
'link.credentials_changed'
],
'url' => 'https://my.webhook.endpoint',
'description' => 'Webhook endpoint for payment events.',
'name' => 'My webhook endpoint'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v1/webhook_endpoints"
payload := strings.NewReader("{\n \"enabled_events\": [\n \"link.credentials_changed\"\n ],\n \"url\": \"https://my.webhook.endpoint\",\n \"description\": \"Webhook endpoint for payment events.\",\n \"name\": \"My webhook endpoint\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fintoc.com/v1/webhook_endpoints")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled_events\": [\n \"link.credentials_changed\"\n ],\n \"url\": \"https://my.webhook.endpoint\",\n \"description\": \"Webhook endpoint for payment events.\",\n \"name\": \"My webhook endpoint\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/webhook_endpoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled_events\": [\n \"link.credentials_changed\"\n ],\n \"url\": \"https://my.webhook.endpoint\",\n \"description\": \"Webhook endpoint for payment events.\",\n \"name\": \"My webhook endpoint\"\n}"
response = http.request(request)
puts response.read_body{
"id": "we_M6yrvOepCe3Rqp8B",
"object": "webhook_endpoint",
"created_at": "2021-05-17T17:04:10.284Z",
"description": "Webhook endpoint for payment events.",
"enabled_events": [
"link.credentials_changed"
],
"mode": "live",
"name": "My webhook endpoint",
"secret": "whsec_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ",
"status": "enabled",
"url": "https://my.webhook.endpoint"
}Body
Events that will trigger a webhook to be sent.
link.credentials_changed, link.refresh_intent.succeeded, link.refresh_intent.failed, account.refresh_intent.succeeded, account.refresh_intent.failed, account.refresh_intent.rejected, payment_intent.succeeded, payment_intent.rejected, payment_intent.failed, payment_intent.pending, payment_intent.expired, subscription.payment_method_updated, subscription.payment_method_update_failed, subscription_intent.succeeded, subscription_intent.rejected, subscription_intent.failed, charge.succeeded, charge.failed, account.refresh_intent.movements_removed, account.refresh_intent.movements_modified, refund.succeeded, refund.failed, refund.returned, refund.in_progress, payout.created, payout.canceled, payout.succeeded, payout.returned, checkout_session.finished, checkout_session.expired, transfer.inbound.succeeded, transfer.outbound.succeeded, transfer.outbound.partially_succeeded, transfer.outbound.failed, transfer.outbound.returned, transfer.outbound.reversed, transfer.inbound.returned, transfer.inbound.return_failed, account_number.deleted, account_verification.succeeded, account_verification.failed, transfer.inbound.rejected, transfer.inbound.reversed, payment_method.activated, payment_method.canceled, invoice.created, invoice.finalized, invoice.finalization_failed, invoice.paid, invoice.payment_created, invoice.payment_failed, invoice.payment_succeeded, invoice.split_redirected, invoice.upcoming, invoice.voided, invoice.marked_uncollectible, dispute.waiting_documentation, dispute.in_review, dispute.won, dispute.lost, dispute.expired, entity.onboarding.approved, entity.onboarding.rejected, transfer_batch.in_progress, transfer_batch.rejected, transfer_batch.expired, transfer_batch.succeeded, transfer_batch.partially_succeeded, transfer_batch.failed ["link.credentials_changed"]
Response
Webhook endpoint created. The signing secret is only returned in this response.
Event types that trigger a notification to this endpoint.
link.credentials_changed, link.refresh_intent.succeeded, link.refresh_intent.failed, account.refresh_intent.succeeded, account.refresh_intent.failed, account.refresh_intent.rejected, payment_intent.succeeded, payment_intent.rejected, payment_intent.failed, payment_intent.pending, payment_intent.expired, subscription.payment_method_updated, subscription.payment_method_update_failed, subscription_intent.succeeded, subscription_intent.rejected, subscription_intent.failed, charge.succeeded, charge.failed, account.refresh_intent.movements_removed, account.refresh_intent.movements_modified, refund.succeeded, refund.failed, refund.returned, refund.in_progress, payout.created, payout.canceled, payout.succeeded, payout.returned, checkout_session.finished, checkout_session.expired, transfer.inbound.succeeded, transfer.outbound.succeeded, transfer.outbound.partially_succeeded, transfer.outbound.failed, transfer.outbound.returned, transfer.outbound.reversed, transfer.inbound.returned, transfer.inbound.return_failed, account_number.deleted, account_verification.succeeded, account_verification.failed, transfer.inbound.rejected, transfer.inbound.reversed, payment_method.activated, payment_method.canceled, invoice.created, invoice.finalized, invoice.finalization_failed, invoice.paid, invoice.payment_created, invoice.payment_failed, invoice.payment_succeeded, invoice.split_redirected, invoice.upcoming, invoice.voided, invoice.marked_uncollectible, dispute.waiting_documentation, dispute.in_review, dispute.won, dispute.lost, dispute.expired, entity.onboarding.approved, entity.onboarding.rejected, transfer_batch.in_progress, transfer_batch.rejected, transfer_batch.expired, transfer_batch.succeeded, transfer_batch.partially_succeeded, transfer_batch.failed Was this page helpful?