Skip to content
payrocdevelopers

Retrieve event subscription

Browse API reference

GET/event-subscriptions/{subscriptionId}getEventSubscription

Use this method to retrieve the details of an event subscription.

In your request, include the subscriptionId that we sent to you when we created the event subscription.

Note: If you don't know the subscriptionId of the event subscription, go to List event subscriptions.

Parameters

NameInTypeDescription
subscriptionIdRequiredpathinteger

Unique identifier that we assigned to the event subscription.
Note: Our gateway returned the subscriptionId in the id field in the response of the Create Event Subscription method.

Responses

Returns the event subscription object.

200 OK · application/json
{
  "enabled": true,
  "eventTypes": [
    "processingAccount.status.changed"
  ],
  "id": 2565435189324,
  "metadata": {
    "yourCustomField": "abc123"
  },
  "notifications": [
    {
      "secret": "**********oP3456",
      "supportEmailAddress": "jane.doe@example.com",
      "type": "webhook",
      "uri": "https://my-server/notification/endpoint"
    }
  ],
  "status": "registered"
}
Response schema · 11 fields
  • enabledbooleanrequired
    Indicates if we should notify you when the event occurs. The value is one of the following: true We notify you when the event occurs. false We don't notify you when the event occurs.
  • eventTypesstring[]required
    Array of events that you want to subscribe to. For a list of events, go to Events List.
  • idintegerint64
    Unique identifier that we assigned to the event subscription.
  • metadataobject
    Object that you can send to include custom data in the request. For more information about how to use metadata, go to Metadata.
  • notificationsobject[]required
    Array of polymorphic notification objects that contain information about how we contact you when an event occurs.
    • option 1object
      • secretstringrequired
        String that we send with a notification so that you can ensure it is a valid notification from our gateway. We include the value in the Payroc-Secret header parameter in the webhook call. Note: In the response, we truncate the secret to the last 16 characters and mask the first 10 characters.16–64 chars
      • supportEmailAddressstringrequired
        Email address of the person or team that we contact if we can't deliver notifications.
      • typestringrequired
        Type of notification method. Note: To receive notifications by webhook, your server must be able to handle POST requests.webhook
      • uristringrequired
        Public endpoint that we send notifications to.
  • statusstring
    Status of the subscription. We return one of the following values: registered You have set up the subscription, and we will notify you when an event occurs. suspended We have deactivated the event subscription, and we won't notify you when an event occurs. failed We couldn't contact your URI endpoint. We email the supportEmailAddress.registeredsuspendedfailed

Used in workflows

Search documentation

API reference169
Guides118
Knowledge38
legal1
Solutions32
Workflows74
↑↓highlight↵openView all search results

Menu

Theme

Sign out

Your saved plans remain in your organization. This browser’s private draft and account view will be cleared.

Talk to an engineer