REST API

Triggering a Test Webhook Notification Using the
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.
  1. Create a
    Token Management Service
    webhook subscription for your organization ID using the endpoint:
    POST
    https://apitest.cybersource.com
    /notification-subscriptions/v1/webhooks
    Set the
    productId
    field to
    tokenManagement
    and the
    eventTypes
    field to
    tms.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" } }
  2. On the left-hand panel, navigate to
    Token Management Service
    > Instrument Identifier > Create an Instrument Identifier.
  3. Update the sample request to
    Create Instrument Identifier (Card & Enroll for Network Token)
    :
  4. Set the
    card.number
    field to a test PAN. Contact
    Cybersource
    Customer Support for test PAN. Send the request to the endpoint:
    POST
    https://apitest.cybersource.com
    /tms/v1/instrumentidentifiers
    { "type": "enrollable card", "card": { "number": "411111111111XXXX", // Replace the ‘X’s with 1 "expirationMonth": "12", "expirationYear": "2031", "securityCode": "123" } }
    IMPORTANT
    A 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.
  5. Click
    Send
    . After you receive a successful response, you should be able to see a webhook event notification in your system.