v1

latestOpenAPI 3.0.1Apache 2.02026-07-248286406.8 KB
Account

Create a webhook configuration

This POST endpoint is used to create a new webhook configuration for your account. <br> To set up a webhook, provide a target url and an array of event_types that the webhook should listen to. <br> Upon successful creation, the response will include a unique webhook_token associated with the newly registered webhook as well as webhook_secret which will be used to encrypt the incoming payloads. <br> This token can be used for future management of the webhook.

post/payout/account/webhooks

Request body

webhook_urlstring required

The URL that will receive the webhook payloads

event_typesstring[] required

The type of events the webhook will receive notifications for

Example request

{
  "webhook_url": "https://www.masspay.io/webhooks"
}

Response

Created

webhook_tokenstring required

The token associated with this webhook configuration

webhook_secretstring required

A secret key used to encrypt the data transmitted via the webhook. The resulting signature is included in the X-MassPay-Signature header.

Example response

{
  "webhook_token": "webhook_a0d7d26f-3d77-474e-9053-c4235032f37a",
  "webhook_secret": "29f67213-29a9-44d3-abf6-c4441ad07bc9"
}