Webhook-related operations
$webhooksController = $client->getWebhooksController();
WebhooksController
- List Webhook Subscriptions
- Create Webhook Subscription
- Retrieve Webhook Subscription
- Delete Webhook Subscription
Retrieve a list of all webhook subscriptions that supports filtering, sorting, and pagination through existing mechanisms.
function listWebhookSubscriptions(string $xMyPayQuickerVersion): WebhookCollectionResponse
Parameter | Type | Tags | Description |
---|---|---|---|
xMyPayQuickerVersion |
string |
Header, Required | Date-based API Version specified in the header required on all calls. |
$xMyPayQuickerVersion = '2020.02.24';
$result = $webhooksController->listWebhookSubscriptions($xMyPayQuickerVersion);
{
"links": [
{
"params": {
"rel": "self"
},
"href": "string"
}
],
"payload": [
{
"links": [
{
"params": {
"rel": "self"
},
"href": "string"
}
],
"url": "https://www.example.com/webhooks",
"namespace": "BANKACCOUNTS.UPDATED.STATUS.APPROVED",
"token": "webh-2dd54a53-3814-4ce1-862f-dc06b09ead4a",
"created": "2020-01-01",
"lastUpdated": "2020-02-01"
}
]
}
Create a webhook subscription for a given URL and namespace. When this event fires, the webhook receives a call from the API.
function createWebhookSubscription(
string $xMyPayQuickerVersion,
?WebhookSubscription $body = null
): WebhookSubscriptionResponse
Parameter | Type | Tags | Description |
---|---|---|---|
xMyPayQuickerVersion |
string |
Header, Required | Date-based API Version specified in the header required on all calls. |
body |
?WebhookSubscription |
Body, Optional | - |
$xMyPayQuickerVersion = '2020.02.24';
$result = $webhooksController->createWebhookSubscription($xMyPayQuickerVersion);
{
"links": [
{
"params": {
"rel": "self"
},
"href": "string"
}
],
"url": "https://www.example.com/webhooks",
"namespace": "BANKACCOUNTS.UPDATED.STATUS.APPROVED",
"token": "webh-2dd54a53-3814-4ce1-862f-dc06b09ead4a",
"created": "2020-01-01"
}
Retrieve a single webhook subscription using the webhook token.
function retrieveWebhookSubscription(
string $webhToken,
string $xMyPayQuickerVersion
): WebhookSubscriptionResponse
Parameter | Type | Tags | Description |
---|---|---|---|
webhToken |
string |
Template, Required | - |
xMyPayQuickerVersion |
string |
Header, Required | Date-based API Version specified in the header required on all calls. |
$webhToken = 'webh-token0';
$xMyPayQuickerVersion = '2020.02.24';
$result = $webhooksController->retrieveWebhookSubscription($webhToken, $xMyPayQuickerVersion);
{
"links": [
{
"params": {
"rel": "self"
},
"href": "string"
}
],
"url": "https://www.example.com/webhooks",
"namespace": "BANKACCOUNTS.UPDATED.STATUS.APPROVED",
"token": "webh-2dd54a53-3814-4ce1-862f-dc06b09ead4a",
"created": "2020-01-01",
"lastUpdated": "2020-02-01"
}
Delete a webhook subscription. Deleted webhooks no longer receive notifications about events. Deleting an already deleted webhook will result in a successful 200 (OK) response code.
function deleteWebhookSubscription(string $webhToken, string $xMyPayQuickerVersion): void
Parameter | Type | Tags | Description |
---|---|---|---|
webhToken |
string |
Template, Required | - |
xMyPayQuickerVersion |
string |
Header, Required | Date-based API Version specified in the header required on all calls. |
void
$webhToken = 'webh-token0';
$xMyPayQuickerVersion = '2020.02.24';
$webhooksController->deleteWebhookSubscription($webhToken, $xMyPayQuickerVersion);