Security preferences
Security preferences provide you the option to add additional layers of security for your webhook notifications by:
- Adding webhook authorization details
- Changing the Digital Signing Algorithm to Rivest-Shamir-Adelman (RSA). (The default is Elliptic Curve.)
This allows you to use OAuth (Open Authorization) protected callback URLs where webhook notifications are delivered using the authorization details you provide in securityPreferences.
How security preferences work
- You subscribe to the notification events of your choice by performing a
POSTcall to the/subscriptionsendpoint along with the following authentication fields.Fields for webhook and token authorization, and digital signing algorithm on webhook notifications Field name Data type Description Required (R)
Optional (O)
Conditional (C)securityPreferencesObject Parent object that holds information about the security preferences. R - You must provide this to use security preferences. securityPreferences. webhookAuthorizationTypeString Authorization setup that is needed to receive notifications supported by Open Authorization standard such as webhook notifications. Valid values are:
- none - No webhook authorization.
- basic - Basic authorization using the Authorization key-value provided in
headerFields. - token - OAuth using the values provided in
authorizationDetails.
O securityPreferences. tokenEndpointAuthorizationTypeString Authorization setup that is needed to receive notifications using tokens. Valid values are:
- none
- client_secret_post
- private_key_jwt
C - You must provide this when webhookAuthorizationType = token.securityPreferences. mTLSEnabledBoolean Indicates that mutual Transport Layer Security for handshake certificate validation is enabled or disabled.
If set to true, you must share your certificate during onboarding.
O securityPreferences. authorizationDetailsObject Child object that holds additional authorization details to apply when sending webhook notifications. C - You must provide this when webhookAuthorizationType = token.securityPreferences.authorizationDetails. tokenEndpointString A reference to a web resource on the internet that specifies the location and mechanism for the identity provider to fetch the token. O securityPreferences.authorizationDetails. clientCredentialsObject Child object that holds client credential details. C - You must provide this when tokenEndpointAuthorizationType = client_secret_post.securityPreferences.authorizationDetails.clientCredentials. clientSecretString A confidential string known only to the application and the authorization server. O securityPreferences.authorizationDetails.clientCredentials. clientIdString A public identifier for the application for authenticating the client. O securityPreferences.authorizationDetails.clientCredentials. contentTypeString If your IDA server expects a value other than application/x-www-form-urlencoded, provide it here. O securityPreferences.authorizationDetails.clientCredentials. clientCredentialRequestBodyDefine parameters like grant type, scope, etc, to include in the request body. O securityPreferences.authorizationDetails. jwtDetailsChild object that holds JSON Web Token (JWT) details. C - you must provide this when tokenEndpointAuthorizationType = private_key_jwt.securityPreferences.authorizationDetails.jwtDetails. clientSecretString A confidential string known only to the application and the authorization server. O securityPreferences.authorizationDetails.jwtDetails. jwtHeaderFieldsString,String Hash map object with key-value pairs that will be used as the header part of a JWT token. O securityPreferences.authorizationDetails.jwtDetails. jwtRequestBodyString,String Hash map object with key-value pairs that will be used as the body part of a JWT token. O securityPreferences.authorizationDetails.jwtDetails. jwtRequestParametersString,String The JWT request parameters and values you expect to receive as part of authenticating into your servers for webhook delivery. O securityPreferences. headerFieldsObject Hash map object with key-value pairs that are passed to the request header while connecting to the merchant server.
These are additional headers that are sent on all auth and webhooks.C - You must provide this when webhookAuthorizationType = basicsecurityPreferences. signingAlgorithmString Enumerates the Digital Signing Algorithm preferred by the client. This is used to sign payloads and for identity verification.
- For Rivest-Shamir-Adelman (RSA) key length will be 3072
- For Elliptic Curve (EC) key length will be 256.
If no value is provided for this field, the default value is EC.
O - Notifications API backend verifies the webhook subscription, processes the request, and stores the header fields and authorization details you sent, based on the authorization type you chose.
- When the notification event you subscribed to occurs, the following happens:
Webhook authorization type scenarios Scenario What happens If webhookAuthorizationType = basicThe values in headerFieldsare added to the header of the webhook notification.If webhookAuthorizationType = tokenandtokenEndpointAuthorizationType = client_secret_postThe token is retrieved from the tokenEndpointusing the clientCredentials.clientIdand clientCredentials.clientSecret, and attached to the webhook notification.If webhookAuthorizationType = tokenandtokenEndpointAuthorizationType = private_key_jwtThe token is retrieved from the tokenEndpoint, encrypted with the private JWT key (jwtHeaderFields,jwtRequestBody,jwtRequestParameters), and attached to the webhook notification.
(decrypt it using the public key from GET /public-keys)If webhookAuthorizationType = tokenandtokenEndpointAuthorizationType = noneThe token is retrieved from the tokenEndpointand attached to the webhook notification.If mTLSEnabled = trueA mutual handshake for network security is done by using the certificates before sending the webhook notification. (You must share your certificate during onboarding) - After all the security preferences are added, the notification is signed using the
signingAlgorithmyou chose.- You can verify the webhook’s origin by decrypting the signature header value with the public key from GET /public-keys.
- The encrypted webhook notification is sent to the OAuth-protected
callbackURLusing the authorization details you provided.
The following example shows how to send the security preference details when you subscribe to a notification.
HTTP method: POST
Endpoint: /subscriptions
Scenario: Subscribing to notification events along with the security preference for webhookAuthorizationType = token and tokenEndpointAuthorizationType = private_key_jwt.
{
"notifications": {
"paymentUpdateNotification": [
"All"
]
},
"securityPreferences": {
"webhookAuthorizationType": "token",
"tokenEndpointAuthorizationType": "private_key_jwt",
"mTLSEnabled": false,
"authorizationDetails": {
"tokenEndpoint": "AUTH_ENDPOINT",
"jwtDetails": {
"jwtHeaderFields": {
"typ": "JWT",
"alg": "RS256",
"kid": "kid"
},
"jwtRequestBody": {
"sub": "dsd5yhuyuiyok5vQMZdZT3o",
"iss": "//mns-aws.jpmchase.com",
"aud": "jpmchase.com"
},
"jwtRequestParameters": {
"grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
"assertion": "CLIENT_ASSERTION_JWT"
}
}
},
"signingAlgorithm": "RSA"
},
"callbackURL": "https://merchant.notification.com",
"subscriptionChannel": "WEBHOOK",
"subscriptionChannels": [
"WEBHOOK"
]
}Response:
{
"notifications": {
"paymentUpdateNotification": [
"All"
]
},
"subscriptionId": "29332a27-af16-47a0-b876-8b8a13dc35fe",
"subscriptionCreateTimestamp": "2026-07-15T16:50:38.833Z",
"subscriptionUpdatedTimestamp": "2026-07-15T16:50:38.870Z",
"callbackURL": "https://merchant.notification.com",
"responseStatus": "SUCCESS",
"responseCode": "ACCEPTED",
"responseMessage": "Request Accepted",
"publicKey": {
"publicKeyIdentifier": "0643e123ca434c39bdbd29d77330fff0",
"publicKeyText": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWouNwN+s+Vowv24YvrRUBKIlkMpLGPL8C+VFUh8nolNg0H13pFqqL/mV3X7Yglm0ht2D3b7WkAuZeYIPmibWiA==",
"publicKeyExpirationDate": "2024-11-01T09:19:26.867Z"
},
"subscriptionChannel": "WEBHOOK"
}