Webhook Resource

A Webhook resource primarily refers to a certain URL where we send events that are happening from your account. You can check the webhook section of our integration guide to find out some good use cases for webhooks.

❗️

You need to return with a 200 or 2xx response.

Once the twelve retries have been used up, your webhook ID will be disabled and you will need to enable it again.

A Webhook Resource

{
    "data": {
        "id": "hook_asgZnJ2LUPUzuuFpT5j66ton",
        "type": "webhook",
        "attributes": {
            "livemode": true,
            "secret_key": "whsk_Cq2e2jxvuen6SoJd9RPu4ccn",
            "status": "enabled",
            "url": "https://mywebsite:3000/webhooks",
            "events": [
                "source.chargeable",
                "payment.paid",
                "payment.failed"
            ],
            "created_at": 1586194939,
            "updated_at": 1586194939
        }
    }
}

id string
Unique ID of the resource.


type string
Represents the resource type. Value is always webhook.


livemode boolean
The value is true if the resource exists in live mode or the value is false if the resource exists in test mode.


secret_key string
Secret key is a string used to generate webhook signature in order to secure your webhook. For more information, please checkout webhooks section.


status string
Status of a Webhook. Possible values are enabled and disabled. enabled webhook means events will be sent while disabled will not.


url string
The destination URL of the events that happened from your account. Please make sure that the URL is publicly accessible in order for you to receive the event.


events array
The list of events to be sent to this webhook. Possible values in the meantime are:

source.chargeable, payment.paid, and payment.failed for transactions.

checkout_session.payment.paid for Checkout API transactions

payment.refunded and payment.refund.updated for refunds.

subscription.past_due, subscription.unpaid and subscription.updated for subscriptions.

subscription.invoice.created, subscription.invoice.finalized, subscription.invoice.paid, andsubscription.invoice.payment_failed for invoices.

link.payment.paid for PayMongo Links.


created_at timestamp
The timestamp when the webhook has been created.


updated_at timestamp
The timestamp when the webhook has been updated.