Webhooks
A webhook is a URL on your server that Hovi calls when something happens in a wallet, for example when a credential offer arrives. Webhooks belong to a wallet, so these methods use the wallet's access token, not the API key (see Authentication). The events and how to check a webhook's signature are explained in Cloud Wallet webhooks.
Register webhook
Registers a webhook URL for the wallet.
import { CloudWallet } from '@hovi/cloudwallet-sdk';
const wallet = new CloudWallet({
walletAccessToken: '<WALLET_ACCESS_TOKEN>',
apiBaseUrl: 'https://cloudwallet.hovi.id',
});
const result = await wallet.registerWebhook({
webhookUrl: 'https://example.com/wallet-webhook',
});
Params
| Parameter | Type | Description |
|---|---|---|
| webhookUrl | string (Required) | The HTTPS URL that receives the events. |
Delete webhook
Removes a webhook URL from the wallet. Hovi stops sending events to it.
import { CloudWallet } from '@hovi/cloudwallet-sdk';
const wallet = new CloudWallet({
walletAccessToken: '<WALLET_ACCESS_TOKEN>',
apiBaseUrl: 'https://cloudwallet.hovi.id',
});
const result = await wallet.deleteWebhook({
webhookUrl: 'https://example.com/wallet-webhook',
});
Params
| Parameter | Type | Description |
|---|---|---|
| webhookUrl | string (Required) | The URL of the webhook to delete. |
Get webhook
Lists the wallet's webhooks.
import { CloudWallet } from '@hovi/cloudwallet-sdk';
const wallet = new CloudWallet({
walletAccessToken: '<WALLET_ACCESS_TOKEN>',
apiBaseUrl: 'https://cloudwallet.hovi.id',
});
const result = await wallet.getWebhook();