Register a webhook
Register your webhook to receive transaction notifications.
URI
POST
https://api.tryduplo.com/v1/merchants/businesses/webhook
Parameters
Header
Authorization
string
set value to Bearer SECRET_KEY
Body Param
webhook_url
string
required
Your webhook url, we would post transaction notifications to this url.
callback_url
string
Your callback url, this is optional.
verify_hash
string
required
Your encrypted key, we would send this along with our request and you would use this key to verify that the request to your webhook url is from Duplo.
business_id
string
required
Merchant business ID
Sample request
curl --location --request POST 'https://api.tryduplo.com/v1/merchants/businesses/webhook' \
--header 'Authorization: Bearer SECRET_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"webhook_url": "https://webhook.site/a1b47ab8-997a-4c2a-83ab-2614e7f",
"verify_hash": "6F4B941015BC08D44FUAMCAJ.948249SJHE",
"business_id": "8edfcc-1e1c-4ad1-9ed8-e870d654",
}'
Duplo Response
{
"data": {
"id": "7ec2ad3a-8d26-4f7f-9396-1cbb495546cd",
"webhook_url": "https://webhook.site/7ab8-997a-4c2a-83ab-2614e7f",
"Callback_url": "https://webhook.site/7ab8-997a-4c2a-83ab-2614e7f",
"verify_hash": "6F4B941015BC08D44FUAMCAJ.948249SJHE",
"services": [
"virtual-account"
],
"created_at": "2021-08-03T12:35:34.184Z",
"update_at": "2021-08-03T12:35:34.188Z",
"business_id": "8edfcc-1e1c-4ad1-9ed8-e870d654"
},
"errors": {},
"message": "Request successful"
}
Last updated
Was this helpful?