curl --request POST \
--url https://testapi.kravata.co/api/webhooks/{clientId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://your-server.example.com/webhooks/kravata",
"process": "ramp"
}
'import requests
url = "https://testapi.kravata.co/api/webhooks/{clientId}"
payload = {
"url": "https://your-server.example.com/webhooks/kravata",
"process": "ramp"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://your-server.example.com/webhooks/kravata', process: 'ramp'})
};
fetch('https://testapi.kravata.co/api/webhooks/{clientId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "48899140-5567-4919-bc26-a0e93018c3ce",
"method": "POST",
"process": "ramp",
"status": true,
"url": "https://your-server.example.com/webhooks/kravata",
"userId": "20ec3cb9-497c-480f-9478-4d64c7b43064"
}Create Webhook
This endpoint allows you to create a new webhook for your account. By specifying the URL and the process you want to monitor, you can set up real-time notifications for specific events.
Request
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | Header | Yes | The access token, valid for 5 minutes, is used to authenticate requests to other endpoints. |
| clientID | URL | Yes | Include your assigned ID in the URL, obtainable through the Get infoClient endpoint. |
Request Body
The request body should be in JSON format and include the following fields:
| Field | Description |
|---|---|
| url | The URL where webhook notifications will be sent. This must be a valid and accessible space. |
| process | The process to monitor: ramp, compliance or wallet_transfer. |
Response
On success, the server returns the details of the newly created webhook, including its unique identifier, status, and configuration.
| Field | Description |
|---|---|
| Id | The unique identifier of the webhook. |
| method | The HTTP method used by the webhook (e.g., POST). |
| process | The process the webhook monitors (ramp, compliance or wallet_transfer). |
| status | Indicates whether the webhook is active (true) or inactive (false). |
| url | The destination URL where notifications are sent. |
| userId | The unique identifier of the user associated with the webhook. |
Webhook Payload
When an event occurs in the monitored process, the webhook will send a POST request to your specified URL containing the relevant information about the process and the specific changes or updates that triggered the notification.
Below is an example of a webhook payload for the ramp process. This is provided as a reference to illustrate the type of information that might be included, but the actual payload will vary depending on the specific process being monitored and the type of update that occurred.
{
"amountReceived": 2.29,
"amountSent": 10000.0,
"bankAccountId": "04637bb8-be4c-4fc7-8312-7b0541736d86",
"destinationUserId": "20ec3cb9-497c-480f-9478-4d64c7b43064",
"id": "de98e68a-1051-4803-a1e6-0fda74de333b",
"numberRamp": "0005277",
"operationCategory": "ramp",
"originUserId": "20ec3cb9-497c-480f-9478-4d64c7b43064",
"rampType": "on_ramp",
"registerDate": "2025-01-17 16:05:25.873917",
"status": "paidawaitingfunds",
"symbolTypeReceived": "USDC",
"symbolTypeSent": "COP",
"userId": "20ec3cb9-497c-480f-9478-4d64c7b43064",
"walletId": "0ed2aa92-da56-4774-847f-6352c8e8e177",
"rampDetails": {
"txid": "0x7281e10bc6db3684340b3d53d927cea34312dea3e6c4b8ab926d666d3ffbd46c"
}
}
In this example, if the webhook is monitoring a ramp process and there’s a status update (for example, from “pending” to “paidawaitingfunds”), the webhook will send a notification containing the complete updated information of the ramp operation.
| Field | Type | Description |
|---|---|---|
| amountReceived | number | The amount received in the destination currency |
| amountSent | number | The amount sent in the origin currency |
| bankAccountId | string | Unique identifier of the bank account used in the operation |
| destinationUserId | string | Identifier of the user receiving the funds |
| id | string | Unique identifier of the ramp operation |
| numberRamp | string | Sequential number assigned to the ramp operation |
| operationCategory | string | Category of the operation (always “ramp”) |
| originUserId | string | Identifier of the user sending the funds |
| rampType | string | Type of the ramp operation (“on_ramp” or “off_ramp”) |
| registerDate | string | Timestamp of when the operation was registered |
| status | string | Current status of the ramp operation |
| symbolTypeReceived | string | Symbol of the currency received |
| symbolTypeSent | string | Symbol of the currency sent |
| userId | string | Identifier of the user who initiated the operation |
| walletId | string | Identifier of the wallet associated with the operation |
| rampDetails | object | Specifies the details of the operation |
curl --request POST \
--url https://testapi.kravata.co/api/webhooks/{clientId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://your-server.example.com/webhooks/kravata",
"process": "ramp"
}
'import requests
url = "https://testapi.kravata.co/api/webhooks/{clientId}"
payload = {
"url": "https://your-server.example.com/webhooks/kravata",
"process": "ramp"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://your-server.example.com/webhooks/kravata', process: 'ramp'})
};
fetch('https://testapi.kravata.co/api/webhooks/{clientId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "48899140-5567-4919-bc26-a0e93018c3ce",
"method": "POST",
"process": "ramp",
"status": true,
"url": "https://your-server.example.com/webhooks/kravata",
"userId": "20ec3cb9-497c-480f-9478-4d64c7b43064"
}
