Webhooks
Create a webhook
API Reference
Accounts
Send Limits
Bank Accounts
Send Instructions
Webhooks
Create a webhook
Create a webhook using the values provided in the parameters. The webhook enables the recipient to receive notifications via email and callback url when selected events occur.
POST
/
webhooks
curl --request POST \
--url https://staging-api.chip-in.asia/api/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'checksum: <checksum>' \
--header 'epoch: <epoch>' \
--data '{
"name": "First Webhook",
"callback_url": "https://yourwebsite.com/route",
"email": "email@chip-in.asia",
"event_hooks": [
[
"budget_allocation_status",
"bank_account_status",
"send_instruction_status"
]
]
}'
[
{
"id": 1,
"name": "First Webhook",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA6gLlBKxCB5dxPJbinCzl\nhOfKSgQtOWQQBxmnWIkEVUbqhpnqr3xNYiAvDyMUxYUwuzN44eHO+mR9MZWcSx3c\nbXmKa3gsOzR6GdcOxMGaVxvfje+fujCAlCtO1BP+A9/FS3KcPgCYG1wtAPwA5IAf\nHylL3TsUVIJQFBgiBr6N4Bgapr9eloaFfeYIBRsXmxPKAMJivqxYpLh0V3N4ZFd5\nTGqSEAa4b1ULDr6p0sB2L3QikTdsF0zp03zNceKA6fXDOzD0xWtg9buXvyKwePK4\nM2kcnWBNfsWghrdg0fG3O9bmkaS1oEXydrmJfuiI8h6a64J/1nzooi2yLC9D6Ta0\nS63bbuAHymnQtiNuV7Ixp6IoTGFaS88aTiHaP8rdyWV8JTDFx0qeDzyaGWiYGwEF\nmj/buHCEcRhoajbGkPhYA4YEdn4jy1wZhEr2OMdBPM7mPPI0Hy3hcNJVMVVlrpHe\nIltQATpjlNaJMlRPjbcaiW7dsO3BuF9ZOMGksSOnyYm/AgMBAAE=\n-----END PUBLIC KEY-----",
"callback_url\"": "https://yourwebsite.com/route",
"email": "email@chip-in.asia",
"event_hooks": [
"bank_account_status",
"budget_allocation_status",
"send_instruction_status"
],
"created_at": 16197408,
"updated_at": 16197408
}
]
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Unix epoch timestamp
Example:
1619740800
Refer to checksum calculation
Body
application/json
This is webhook schema
Response
200
application/json
Successful response
This is webhook schema
curl --request POST \
--url https://staging-api.chip-in.asia/api/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'checksum: <checksum>' \
--header 'epoch: <epoch>' \
--data '{
"name": "First Webhook",
"callback_url": "https://yourwebsite.com/route",
"email": "email@chip-in.asia",
"event_hooks": [
[
"budget_allocation_status",
"bank_account_status",
"send_instruction_status"
]
]
}'
[
{
"id": 1,
"name": "First Webhook",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA6gLlBKxCB5dxPJbinCzl\nhOfKSgQtOWQQBxmnWIkEVUbqhpnqr3xNYiAvDyMUxYUwuzN44eHO+mR9MZWcSx3c\nbXmKa3gsOzR6GdcOxMGaVxvfje+fujCAlCtO1BP+A9/FS3KcPgCYG1wtAPwA5IAf\nHylL3TsUVIJQFBgiBr6N4Bgapr9eloaFfeYIBRsXmxPKAMJivqxYpLh0V3N4ZFd5\nTGqSEAa4b1ULDr6p0sB2L3QikTdsF0zp03zNceKA6fXDOzD0xWtg9buXvyKwePK4\nM2kcnWBNfsWghrdg0fG3O9bmkaS1oEXydrmJfuiI8h6a64J/1nzooi2yLC9D6Ta0\nS63bbuAHymnQtiNuV7Ixp6IoTGFaS88aTiHaP8rdyWV8JTDFx0qeDzyaGWiYGwEF\nmj/buHCEcRhoajbGkPhYA4YEdn4jy1wZhEr2OMdBPM7mPPI0Hy3hcNJVMVVlrpHe\nIltQATpjlNaJMlRPjbcaiW7dsO3BuF9ZOMGksSOnyYm/AgMBAAE=\n-----END PUBLIC KEY-----",
"callback_url\"": "https://yourwebsite.com/route",
"email": "email@chip-in.asia",
"event_hooks": [
"bank_account_status",
"budget_allocation_status",
"send_instruction_status"
],
"created_at": 16197408,
"updated_at": 16197408
}
]