Create a Pay Link Webhook
curl --request POST \
--url https://api.hel.io/v1/webhook/paylink/transaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": "CREATED",
"paylinkId": "<string>",
"targetUrl": "<string>"
}
'import requests
url = "https://api.hel.io/v1/webhook/paylink/transaction"
payload = {
"events": "CREATED",
"paylinkId": "<string>",
"targetUrl": "<string>"
}
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({events: 'CREATED', paylinkId: '<string>', targetUrl: '<string>'})
};
fetch('https://api.hel.io/v1/webhook/paylink/transaction', 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/paylink/transaction",
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([
'events' => 'CREATED',
'paylinkId' => '<string>',
'targetUrl' => '<string>'
]),
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/paylink/transaction"
payload := strings.NewReader("{\n \"events\": \"CREATED\",\n \"paylinkId\": \"<string>\",\n \"targetUrl\": \"<string>\"\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/paylink/transaction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": \"CREATED\",\n \"paylinkId\": \"<string>\",\n \"targetUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hel.io/v1/webhook/paylink/transaction")
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 \"events\": \"CREATED\",\n \"paylinkId\": \"<string>\",\n \"targetUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "6812aec64b14347beb071599",
"creator": "undefined",
"paylink": "67e548619967b38ac797d6ce",
"company": "667c1f9352919e407156128c",
"targetUrl": "https://webhook.site/68644b4f-f63c-4815-9b25-51487efbf13a",
"events": [
"CREATED"
],
"sharedToken": "vF5C1KZKiGE44mJ2NOYPPeGewkNfWE3JWSaa1EYAsh1tltpPE9BUtg+0GG8YMzLw3GTLIwsOWMajaHUO7bfLQ/hP9lg4q9Zo6Lv4zDqN8eUH5bBil2O6KFv6bdW+dXFv"
}{
"message": "Api key or token is invalid",
"code": 401
}Pay Links
Create a Pay Link Webhook
Create a webhook to listen for transaction events on a specific pay link.
POST
/
v1
/
webhook
/
paylink
/
transaction
Create a Pay Link Webhook
curl --request POST \
--url https://api.hel.io/v1/webhook/paylink/transaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": "CREATED",
"paylinkId": "<string>",
"targetUrl": "<string>"
}
'import requests
url = "https://api.hel.io/v1/webhook/paylink/transaction"
payload = {
"events": "CREATED",
"paylinkId": "<string>",
"targetUrl": "<string>"
}
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({events: 'CREATED', paylinkId: '<string>', targetUrl: '<string>'})
};
fetch('https://api.hel.io/v1/webhook/paylink/transaction', 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/paylink/transaction",
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([
'events' => 'CREATED',
'paylinkId' => '<string>',
'targetUrl' => '<string>'
]),
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/paylink/transaction"
payload := strings.NewReader("{\n \"events\": \"CREATED\",\n \"paylinkId\": \"<string>\",\n \"targetUrl\": \"<string>\"\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/paylink/transaction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": \"CREATED\",\n \"paylinkId\": \"<string>\",\n \"targetUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hel.io/v1/webhook/paylink/transaction")
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 \"events\": \"CREATED\",\n \"paylinkId\": \"<string>\",\n \"targetUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "6812aec64b14347beb071599",
"creator": "undefined",
"paylink": "67e548619967b38ac797d6ce",
"company": "667c1f9352919e407156128c",
"targetUrl": "https://webhook.site/68644b4f-f63c-4815-9b25-51487efbf13a",
"events": [
"CREATED"
],
"sharedToken": "vF5C1KZKiGE44mJ2NOYPPeGewkNfWE3JWSaa1EYAsh1tltpPE9BUtg+0GG8YMzLw3GTLIwsOWMajaHUO7bfLQ/hP9lg4q9Zo6Lv4zDqN8eUH5bBil2O6KFv6bdW+dXFv"
}{
"message": "Api key or token is invalid",
"code": 401
}NOTE: When using Helio on mainnet, set your Base URL to https://api.hel.io and generate your API keys from moonpay.hel.io . For testnet, use https://api.dev.hel.io and generate your API keys from moonpay.dev.hel.io.
Authorizations
Authentication using JWT token
Query Parameters
Your API key can be generated on the Helio Dashboard’s settings page.
Body
application/json
⌘I
