Setup Webhook
Configure a webhook URL to receive event notifications.
Endpoint
POST /v1/webhooksAuthentication
Header
Value
Request body
Field
Type
Required
Description
Example request
curl -X POST https://ramp-api.ivorypay.io/api/v1/webhooks \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/ivorypay",
"environment": "LIVE",
"events": [
"onramp.success",
"onramp.failed",
"offramp.success",
"offramp.failed",
"buy.success",
"sell.success",
"deposit.received",
"settlement.success"
]
}'const response = await fetch("https://ramp-api.ivorypay.io/api/v1/webhooks", {
method: "POST",
headers: {
"x-api-key": "your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://yourapp.com/webhooks/ivorypay",
environment: "LIVE",
events: [
"onramp.success",
"onramp.failed",
"offramp.success",
"offramp.failed",
"buy.success",
"sell.success",
"deposit.received",
"settlement.success",
],
}),
});
const data = await response.json();
console.log(data);Example response
Error cases
Scenario
Description
Last updated