Skip to main content

Webhooks

Webhooks in the Cloud Wallet SDK enable real-time notifications for wallet-related events, such as credential or proof request updates. This section covers methods to register, retrieve, and delete webhooks.

Register Webhook

Registers a webhook URL to receive real-time event notifications.

import { CloudWallet } from '@hovi/cloudwallet-sdk';

const wallet = new CloudWallet({
apiKey: 'your-ecosystem-api-key',
});

const result = await wallet.registerWebhook({
webhookUrl: 'https://example.com/webhook',
});

Params

ParameterTypeDescription
webhookUrlstring (Required)The URL where webhook notifications will be sent.
note
  • Ensure the webhookUrl is accessible and can handle POST requests.
  • Webhooks are used to receive updates on wallet events, such as credential or proof request changes.

Delete Webhook

Deletes a registered webhook URL to stop receiving notifications.

import { CloudWallet } from '@hovi/cloudwallet-sdk';

const wallet = new CloudWallet({
apiKey: 'your-ecosystem-api-key',
});

const result = await wallet.deleteWebhook({
webhookUrl: 'https://example.com/webhook',
});

Params

ParameterTypeDescription
webhookUrlstring (Required)The URL of the webhook to delete.
note
  • This action stops notifications from being sent to the specified webhook URL.
  • Ensure no critical processes depend on the webhook before deletion.

Get Webhook

Retrieves details of registered webhooks.

import { CloudWallet } from '@hovi/cloudwallet-sdk';

const wallet = new CloudWallet({
apiKey: 'your-ecosystem-api-key',
});

const result = await wallet.getWebhook();

note
  • This method retrieves all registered webhooks for the wallet.
  • No parameters are required as it fetches all webhooks associated with the API key.