Triggering a Test Webhook Notification Using the Token Management Service
Token Management Service
Follow these steps to trigger a test webhook notification in the
Cybersource
Developer Center using the Token Management Service
(TMS
). IMPORTANT
You must first confirm that your
organization ID is enabled for
TMS
and that a TMS
vault is set up. For assistance, contact Cybersource
Customer Support.- Create aToken Management Servicewebhook subscription for your organization ID using the endpoint:POSThttps://apitest.cybersource.com/notification-subscriptions/v1/webhooksSet theproductIdfield totokenManagementand theeventTypesfield totms.networktoken.provisioned. This example creates a webhook subscription using Mutual Trust, but you can use OAuth or OAuth with JWT.{ "name": "TMS Webhook", "description": "Sample TMS Webhook from Developer Center", "organizationId": "organizationId", "productId": "tokenManagement", "eventTypes": [ "tms.networktoken.provisioned" ], "webhookUrl": "https://MyWebhookServer.com:8443/simulateClient", "healthCheckUrl": "https://MyWebhookServer.com:8443/simulateClientHealthCheck", "notificationScope": "SELF", "retryPolicy": { "algorithm": "ARITHMETIC", "firstRetry": 1, "interval": 1, "numberOfRetries": 3, "deactivateFlag": "false", "repeatSequenceCount": 0, "repeatSequenceWaitTime": 0 }, "securityPolicy": { "securityType": "KEY", "proxyType": "external" } }
- On the left-hand panel, navigate toToken Management Service> Instrument Identifier > Create an Instrument Identifier.
- Update the sample request toCreate Instrument Identifier (Card & Enroll for Network Token):
- Set thecard.numberfield to a test PAN. ContactCybersourceCustomer Support for test PAN. Send the request to the endpoint:POSThttps://apitest.cybersource.com/tms/v1/instrumentidentifiers{ "type": "enrollable card", "card": { "number": "411111111111XXXX", // Replace the ‘X’s with 1 "expirationMonth": "12", "expirationYear": "2031", "securityCode": "123" } }IMPORTANTA test PAN can have only one associated instrument identifier. If multiple webhook notification tests must be run, first delete the instrument identifier created for that PAN using the Delete an Instrument Identifier API.
- ClickSend. After you receive a successful response, you should be able to see a webhook event notification in your system.