Skip to content

Webhooks

NeonPay sends webhook notifications to alert applications when data is created or updated. These notifications contain useful data; your application should listen for these and update their own records as appropriate.

Webhook Workflow

Webhook notifications are sent as a POST request with a JSON body to the Webhook URL you specify. The body of these webhooks does not contain the details of the webhook; merely that the trigger has occurred. Here's an example of the body:

{
  "notification_id": 12454,
  "type": "merchant.created",
  "created_at": "2019-02-11 15:13:38"
}

An application listens for webhooks, then query NeonPay’s Notifications API to retrieve the details using the notification_id provided in the webhook body.

The Notifications API can also be queried at any time to retrieve any past notifications. If desired, an application can ignore the webhooks entirely and simply poll the Notifications API for updates.

Types of Webhooks

Webhook Description
bank_account.created A bank account has been created.
bank_account.updated A bank account has been updated.
bank_account.deleted A bank account has been deleted.
charge.successful A charge was successfully processed.
charge.failed A charge was attempted but failed.
charge.authorized A charge was authorized but not captured.
charge.captured A previously authorized charge was captured.
charge.cancelled A previously authorized charge was cancelled.
charge.updated A charge has been updated.
charge.refunded A charge has been refunded.
refund.updated A refund has been updated.
dispute.created A dispute has been created.
dispute.closed A dispute has been resolved and closed.
dispute.updated A dispute has been updated. Typically this happens when evidence is provided or a processor submits new information.
payout.created A payout has been created.
payout.cancelled A payout has been cancelled.
payout.failed A payout was attempted but failed.
payout.paid A payout was successfully paid.
merchant.created A new merchant account was created.
merchant.updated A merchant account was updated.
merchant.info_needed A merchant account requires additional information to be submitted.
organization.referred An organization has been created with a referrer_id in the /organization/register route. This webhook will include the client_id and state if passed in the URL to /register.