Webhooks
Get Webhook Details
Get detailed information about a specific webhook.
GET
/
webhooks
/
{webhook_id}
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const webhookDetails = await client.webhooks.retrieve('webhook_id');
console.log(webhookDetails.id);from dodopayments import DodoPayments
client = DodoPayments(
bearer_token="My Bearer Token",
)
webhook_details = client.webhooks.retrieve(
"webhook_id",
)
print(webhook_details.id)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
webhookDetails, err := client.Webhooks.Get(context.TODO(), "webhook_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", webhookDetails.ID)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.webhooks.WebhookDetails;
import com.dodopayments.api.models.webhooks.WebhookRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
WebhookDetails webhookDetails = client.webhooks().retrieve("webhook_id");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.webhooks.WebhookDetails
import com.dodopayments.api.models.webhooks.WebhookRetrieveParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val webhookDetails: WebhookDetails = client.webhooks().retrieve("webhook_id")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
webhook_details = dodo_payments.webhooks.retrieve("webhook_id")
puts(webhook_details)curl --request GET \
--url https://test.dodopayments.com/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.dodopayments.com/webhooks/{webhook_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"created_at": "<string>",
"description": "<string>",
"id": "<string>",
"metadata": {},
"updated_at": "<string>",
"url": "<string>",
"disabled": true,
"filter_types": [
"<string>"
],
"rate_limit": 1
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Webhook details retrived.
Created at timestamp
An example webhook name.
The webhook's ID.
Metadata of the webhook
Show child attributes
Show child attributes
Updated at timestamp
Url endpoint of the webhook
Status of the webhook.
If true, events are not sent
Filter events to the webhook.
Webhook event will only be sent for events in the list.
Configured rate limit
Required range:
x >= 0Was this page helpful?
⌘I
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const webhookDetails = await client.webhooks.retrieve('webhook_id');
console.log(webhookDetails.id);from dodopayments import DodoPayments
client = DodoPayments(
bearer_token="My Bearer Token",
)
webhook_details = client.webhooks.retrieve(
"webhook_id",
)
print(webhook_details.id)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
webhookDetails, err := client.Webhooks.Get(context.TODO(), "webhook_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", webhookDetails.ID)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.webhooks.WebhookDetails;
import com.dodopayments.api.models.webhooks.WebhookRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
WebhookDetails webhookDetails = client.webhooks().retrieve("webhook_id");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.webhooks.WebhookDetails
import com.dodopayments.api.models.webhooks.WebhookRetrieveParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val webhookDetails: WebhookDetails = client.webhooks().retrieve("webhook_id")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
webhook_details = dodo_payments.webhooks.retrieve("webhook_id")
puts(webhook_details)curl --request GET \
--url https://test.dodopayments.com/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.dodopayments.com/webhooks/{webhook_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"created_at": "<string>",
"description": "<string>",
"id": "<string>",
"metadata": {},
"updated_at": "<string>",
"url": "<string>",
"disabled": true,
"filter_types": [
"<string>"
],
"rate_limit": 1
}