Skip to content

Latest commit

 

History

History
88 lines (65 loc) · 6.74 KB

File metadata and controls

88 lines (65 loc) · 6.74 KB

WebhookSubscriptions.Webhooks

Overview

Available Operations

  • list - List webhooks for a webhook subscription

list

Retrieve all fired webhooks for a specific webhook subscription with comprehensive filtering and pagination support. Returns webhook delivery history including topics, attempts, request/response details, and delivery status over a rolling 30-day period. Supports filtering by resource ID, date ranges, and pagination parameters for detailed webhook delivery analysis. Critical for debugging webhook delivery issues and monitoring event notification success rates.

Example Usage

import { Dwolla } from "dwolla";

const dwolla = new Dwolla({
  security: {
    clientID: process.env["DWOLLA_CLIENT_ID"] ?? "",
    clientSecret: process.env["DWOLLA_CLIENT_SECRET"] ?? "",
  },
});

async function run() {
  const result = await dwolla.webhookSubscriptions.webhooks.list({
    id: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { DwollaCore } from "dwolla/core.js";
import { webhookSubscriptionsWebhooksList } from "dwolla/funcs/webhookSubscriptionsWebhooksList.js";

// Use `DwollaCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const dwolla = new DwollaCore({
  security: {
    clientID: process.env["DWOLLA_CLIENT_ID"] ?? "",
    clientSecret: process.env["DWOLLA_CLIENT_SECRET"] ?? "",
  },
});

async function run() {
  const res = await webhookSubscriptionsWebhooksList(dwolla, {
    id: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("webhookSubscriptionsWebhooksList failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.ListWebhooksRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ListWebhooksResponse>

Errors

Error Type Status Code Content Type
errors.ForbiddenError 403 application/vnd.dwolla.v1.hal+json
errors.NotFoundError 404 application/vnd.dwolla.v1.hal+json
errors.APIError 4XX, 5XX */*