Webhook Subscriptions

Create a Subscription

Creates a new subscription based on the provided data.

How signing requests work

When setting up, it's common to generate, store, and share a secret between your app and the app that wants to receive webhooks. The secret should be a random string, and how to create it is entirely up to you. The package will use the secret to sign a webhook call. By default, the package will add a header called Signature that will contain a signature the receiving app can use if the payload hasn't been tampered with.

Required scope: subscriptions:write

post/subscriptions

Request

  • Base URL
    https://sandbox.signup.nmi.com/api/v1
  • URL
    https://sandbox.signup.nmi.com/api/v1/subscriptions
  • Auth
    OAuth 2
    Client credentials
    Token URL: /oauth/token scopes: subscriptions:write

Headers

Idempotency-Keystring

Provide a random key (for example, UUID) to make the request idempotent

Request body

callback_urlstring required

The callback URL of the subscription.

secretstring required

The secret key is used to generate a secure signature with the HMAC-SHA256 hashing algorithm, which is included in the webhook event Signature header.

eventsEventTypes[] required

Subscription events

Example request

{
  "events": [
    "application.merchant.boarded"
  ]
}

Response

Subscription created successfully

idstring required

The unique identifier of the subscription.

callback_urlstring

The callback URL of the subscription.

status'active' | 'inactive' required
eventsEventTypes[] required

Subscription events

created_atstring date-time required

The date and time when the application was created.

updated_atstring date-time required

The date and time when the application was last updated.

Example response

{
  "events": [
    "application.merchant.boarded"
  ],
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2025-01-01T00:00:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.