UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

113 lines (74 loc) 4.41 kB
# CyberSource.ManageWebhooksApi All URIs are relative to *https://apitest.cybersource.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**notificationSubscriptionsV1WebhooksWebhookIdPost**](ManageWebhooksApi.md#notificationSubscriptionsV1WebhooksWebhookIdPost) | **POST** /notification-subscriptions/v1/webhooks/{webhookId} | Test a Webhook Configuration [**saveAsymEgressKey**](ManageWebhooksApi.md#saveAsymEgressKey) | **POST** /kms/egress/v2/keys-asym | Message Level Encryption <a name="notificationSubscriptionsV1WebhooksWebhookIdPost"></a> # **notificationSubscriptionsV1WebhooksWebhookIdPost** > InlineResponse2014 notificationSubscriptionsV1WebhooksWebhookIdPost(webhookId) Test a Webhook Configuration Test the webhook configuration by sending a sample webhook. Calling this endpoint sends a sample webhook to the endpoint identified in the user's subscription. It will contain sample values for the product & eventType based on values present in your subscription along with a sample message in the payload. Based on the webhook response users can make any necessary modifications or rest assured knowing their setup is configured correctly. ### Example ```javascript var CyberSource = require('CyberSource'); var apiInstance = new CyberSource.ManageWebhooksApi(); var webhookId = "webhookId_example"; // String | The Webhook Identifier. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.notificationSubscriptionsV1WebhooksWebhookIdPost(webhookId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **webhookId** | **String**| The Webhook Identifier. | ### Return type [**InlineResponse2014**](InlineResponse2014.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json;charset=utf-8 - **Accept**: application/hal+json;charset=utf-8 <a name="saveAsymEgressKey"></a> # **saveAsymEgressKey** > InlineResponse2015 saveAsymEgressKey(vCSenderOrganizationId, vCPermissions, saveAsymEgressKey, opts) Message Level Encryption Store and manage certificates that will be used to preform Message Level Encryption (MLE). Each new webhook will need its own unique asymmetric certificate. You can either use a digital certificate issued/signed by a CA or self-sign your own using the documentation available on the Developer Guide. ### Example ```javascript var CyberSource = require('CyberSource'); var apiInstance = new CyberSource.ManageWebhooksApi(); var vCSenderOrganizationId = "vCSenderOrganizationId_example"; // String | Sender organization id var vCPermissions = "vCPermissions_example"; // String | Encoded user permissions returned by the CGK, for the entity user who initiated the boarding var saveAsymEgressKey = new CyberSource.SaveAsymEgressKey(); // SaveAsymEgressKey | Provide egress Asymmetric key information to save (create or store) var opts = { 'vCCorrelationId': "vCCorrelationId_example" // String | A globally unique id associated with your request }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.saveAsymEgressKey(vCSenderOrganizationId, vCPermissions, saveAsymEgressKey, opts, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **vCSenderOrganizationId** | **String**| Sender organization id | **vCPermissions** | **String**| Encoded user permissions returned by the CGK, for the entity user who initiated the boarding | **saveAsymEgressKey** | [**SaveAsymEgressKey**](SaveAsymEgressKey.md)| Provide egress Asymmetric key information to save (create or store) | **vCCorrelationId** | **String**| A globally unique id associated with your request | [optional] ### Return type [**InlineResponse2015**](InlineResponse2015.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json;charset=utf-8 - **Accept**: application/hal+json;charset=utf-8