Overview
Miscellaneous
Clients
Invoices
Payments
Wallets
Products
A webhook allows your application to recieve updates when updates are made on your account on Payant. Webhook update notifications are sent as POST requests to a callback URL that you supply.
You can use the Payant Dashboard Settings to setup a webhook subscription. You will be required to specify:
You need to setup a webhook endpoint before you setup a subscription to it on Payant. Your endpoint must be HTTPs and must be able to receive both GET and POST requests.
If you need help setting up HTTPs on your endpoint, check out the Getting Started Guide from Let's Encrypt
We'll send a GET request while setting up your webhook. The request will include the following parameters appended to the end of your webhook URL.
type=subscribe
challenge
- A random stringverify_token
- a string that you supply to setup the webhookWhen your endpoint receives the verification request, it must:
verify_token
corresponds to the token your supplied when setting up your webhook.challenge
value.Whenever their are changes on your account, we will send a POST request to your webhook endpoint. The request will have a JSON payload as follows:
type
- Notification typedata
- An array containing the notification dataWe have created an example Node.js server for you to get started quickly.