Class: Webhook

Webhook

With webhooks we give you the possibility to react automatically to certain events which happen within our system. A webhook is basically a URL where we send an HTTP POST request to, every time one of the events attached to that webhook is triggered. Alternatively you can define an email address where we send the event's information to You can manage your webhooks via the API as explained below or you can use the web interface inside our cockpit.
Our call to the webhook / email includes a JSON encoded event object with detailed information about the event in it's POST body.

new Webhook()

Creates a new Webhook. Generally you should never create a PAYMILL object on your own.
Source:

Extends

  • PaymillObject

Classes

Filter
Order

Members

<static> EventType

An event type for a webhook.
Properties:
Name Type Description
CHARGEBACK_EXECUTED string returns a transaction-object with state set to chargeback
TRANSACTION_CREATED string returns a transaction-object
TRANSACTION_SUCCEDED string returns a transaction-object
TRANSACTION_FAILED string returns a transaction-object
SUBSCRIPTION_CREATED string returns a subscription-object
SUBSCRIPTION_UPDATED string returns a subscription-object
SUBSCRIPTION_DELETED string returns a subscription-object
SUBSCRIPTION_SUCCEEDED string returns a subscription-object
SUBSCRIPTION_FAILED string returns a subscription-object
REFUND_CREATED string returns a refund-object
REFUND_SUCCEEDED string returns a refund-object
REFUND_FAILED string returns a refund-object
PAYOUT_TRANSFERRED string returns an invoice-object with the payout sum for the invoice period
INVOICE_AVAILABLE string returns an invoice-object with the fees sum for the invoice period
APP_MERCHANT_ACTIVATED string returns a merchant-object if a connected merchant was activated
APP_MERCHANT_DEACTIVATED string returns a merchant-object if a connected merchant was deactivated
APP_MERCHANT_REJECTED string returns a merchant-object if a connected merchant was rejected
Source:

app_id :string

App (ID) that created this webhook or null if created by yourself.
Type:
  • string
Source:

email :string

The email of the webhook. Either the email OR the url have to be set and will be returned
Type:
  • string
Source:

event_types :Array.<Webhook.EventType>

Event types.
Type:
Source:

id :string

Unique identifier of this webhook
Type:
  • string
Source:

livemode :boolean

you can create webhooks for livemode and testmode.
Type:
  • boolean
Source:

url :string

The url of the webhook. Either the email OR the url have to be set and will be returned
Type:
  • string
Source: