Managing Subscriptions
After subscribing to webhooks, you can manage your webhooks in these ways:
- Retrieve the details of a subscription
- Retrieve a list of subscriptions by product and event
- Update a subscription
- Delete a subscription
Retrieving the Details of a Webhook Subscription
To retrieve the details of a webhook subscription, send a GET request.
To request the service, use the endpoint specified below. After you send the request, check the response message to verify that the request was successful. A 200-level response code indicates success.
For information about response codes, see
Transaction Response Codes
.
Endpoint
-
Test:GETapitest.cybersource.com/notification-subscriptions/v1/webhooks/{webhookId}
-
Production:GETapi.cybersource.com/notification-subscriptions/v1/webhooks/{webhookId}
-
Production in India:GET api.in.cybersource.com/notification-subscriptions/v1/webhooks/{webhookId}
Retrieving an Organization's Subscriptions Using the Product and Event
To request a list of webhooks for an organization, send a GET request and include the query parameters shown in this section.
To request the service, use the endpoint specified below. After you send the request, check the response message to verify that the request was successful. A 200-level response code indicates success.
For information about response codes, see
Transaction Response Codes
.
Endpoint
-
Test:GETapitest.cybersource.com/notification-subscriptions/v1/webhooks
-
Production:GETapi.cybersource.com/notification-subscriptions/v1/webhooks
-
Productionin India:GET api.in.cybersource.com/notification-subscriptions/v1/webhooks
Updating a Webhook Subscription
To update a webhook subscription, send a PATCH request. Include only the fields that you want to update.
To request the service, use the endpoint specified below. After you send the request, check the response message to verify that the request was successful. A 200-level response code indicates success.
For information about response codes, see
Transaction Response Codes
.
Endpoint
-
Test:
PATCH
apitest.cybersource.com
/notification-subscriptions/v1/webhooks/{webhookId}
-
Production:
PATCH
api.cybersource.com
/notification-subscriptions/v1/webhooks/{webhookId}
-
Production in India:
PATCH api.in.cybersource.com/notification-subscriptions/v1/webhooks/{webhookId}
Test:
PATCH
apitest.cybersource.com
/notification-subscriptions/v1/webhooks/{webhookId}
Production:
PATCH
api.cybersource.com
/notification-subscriptions/v1/webhooks/{webhookId}
Production in India:
PATCH api.in.cybersource.com/notification-subscriptions/v1/webhooks/{webhookId}
Deleting a Webhook Subscription
To delete a webhook subscription, send a DELETE request.
To request the service, use the endpoint specified below. After you send the request, check the response message to verify that the request was successful. A 200-level response code indicates success.
For information about response codes, see
Transaction Response Codes
.
Endpoint
-
Test:DELETEapitest.cybersource.com/notification-subscriptions/v1/webhooks/{webhookId}
-
Production:DELETEapi.cybersource.com/notification-subscriptions/v1/webhooks/{webhookId}
-
Production in India:DELETE api.in.cybersource.com/notification-subscriptions/v1/webhooks/{webhookId}