Create a Withdrawal Webhook
curl --request POST \
--url https://api.hel.io/v1/webhook/withdrawal/api-key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"targetUrl": "<string>",
"events": []
}
'import requests
url = "https://api.hel.io/v1/webhook/withdrawal/api-key"
payload = {
"name": "<string>",
"targetUrl": "<string>",
"events": []
}
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({name: '<string>', targetUrl: '<string>', events: []})
};
fetch('https://api.hel.io/v1/webhook/withdrawal/api-key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hel.io/v1/webhook/withdrawal/api-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'targetUrl' => '<string>',
'events' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hel.io/v1/webhook/withdrawal/api-key"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"targetUrl\": \"<string>\",\n \"events\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hel.io/v1/webhook/withdrawal/api-key")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"targetUrl\": \"<string>\",\n \"events\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hel.io/v1/webhook/withdrawal/api-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"targetUrl\": \"<string>\",\n \"events\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"targetUrl": "<string>",
"events": [
"SUBMITTED"
],
"inactive": true,
"sharedToken": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}Withdrawals
Create a Withdrawal Webhook
Create a webhook to receive withdrawal lifecycle events. Requires an API key with the WEBHOOK_CREATE permission.
POST
/
v1
/
webhook
/
withdrawal
/
api-key
Create a Withdrawal Webhook
curl --request POST \
--url https://api.hel.io/v1/webhook/withdrawal/api-key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"targetUrl": "<string>",
"events": []
}
'import requests
url = "https://api.hel.io/v1/webhook/withdrawal/api-key"
payload = {
"name": "<string>",
"targetUrl": "<string>",
"events": []
}
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({name: '<string>', targetUrl: '<string>', events: []})
};
fetch('https://api.hel.io/v1/webhook/withdrawal/api-key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hel.io/v1/webhook/withdrawal/api-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'targetUrl' => '<string>',
'events' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hel.io/v1/webhook/withdrawal/api-key"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"targetUrl\": \"<string>\",\n \"events\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hel.io/v1/webhook/withdrawal/api-key")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"targetUrl\": \"<string>\",\n \"events\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hel.io/v1/webhook/withdrawal/api-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"targetUrl\": \"<string>\",\n \"events\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"targetUrl": "<string>",
"events": [
"SUBMITTED"
],
"inactive": true,
"sharedToken": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}Subscribe to
SUBMITTING, SUBMITTED, BRIDGING, COMPLETED, FAILED, FAILED_EXPIRED, and REFUNDED_BY_PROVIDER events. (CONFIRMED has been renamed to COMPLETED.) See Withdrawal webhooks for event details and Withdrawal payload reference for JSON shapes.Query Parameters
Body
application/json
