curl --request POST \
--url https://api.atoa.me/api/webhook/merchant \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://api/endpoint",
"event": "PAYMENTS_STATUS"
}'
import requests
url = "https://api.atoa.me/api/webhook/merchant"
payload = {
"url": "https://api/endpoint",
"event": "PAYMENTS_STATUS"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: '{"url":"https://api/endpoint","event":"PAYMENTS_STATUS"}'
};
fetch('https://api.atoa.me/api/webhook/merchant', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atoa.me/api/webhook/merchant",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n \"url\": \"https://api/endpoint\",\n \"event\": \"PAYMENTS_STATUS\"\n }",
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.atoa.me/api/webhook/merchant"
payload := strings.NewReader("{\n \"url\": \"https://api/endpoint\",\n \"event\": \"PAYMENTS_STATUS\"\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(res)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.atoa.me/api/webhook/merchant")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://api/endpoint\",\n \"event\": \"PAYMENTS_STATUS\"\n}")
.asString();
{
"webhookId": "4a124f25-fe8d-47a0-92c8-16d94cbfe24c",
"url": "https://example.com",
"event": "PAYMENTS_STATUS"
}
{
"name": "AJV_VALIDATION_ERROR",
"message": "Bad request on parameter request.body.WebhookDataModel must have required property 'url'. Given value: undefined",
"status": 400,
"errors": [
{
"instancePath": "",
"schemaPath": "required",
"keyword": "required",
"params": {
"missingProperty": "url"
},
"message": "must have required property 'url' ",
"modelName": "WebhookDataModel",
"dataPath": ""
}
]
}
{
"name": "BAD_REQUEST",
"message": "POS Payment Status requires V2 signing. Please generate a signing secret from the dashboard to proceed.",
"status": 400
}
{
"name": "UNAUTHORIZED",
"message": "Unauthorized",
"status": 401,
"errors": "[]"
}
{
"name": "NOT_FOUND",
"message": "Webhook not found",
"status": 404,
"errors": "[]"
}
Legacy Endpoints
Create webhook event
Create webhook event via the Atoa Webhooks API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.
POST
/
api
/
webhook
/
merchant
curl --request POST \
--url https://api.atoa.me/api/webhook/merchant \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://api/endpoint",
"event": "PAYMENTS_STATUS"
}'
import requests
url = "https://api.atoa.me/api/webhook/merchant"
payload = {
"url": "https://api/endpoint",
"event": "PAYMENTS_STATUS"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: '{"url":"https://api/endpoint","event":"PAYMENTS_STATUS"}'
};
fetch('https://api.atoa.me/api/webhook/merchant', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atoa.me/api/webhook/merchant",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n \"url\": \"https://api/endpoint\",\n \"event\": \"PAYMENTS_STATUS\"\n }",
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.atoa.me/api/webhook/merchant"
payload := strings.NewReader("{\n \"url\": \"https://api/endpoint\",\n \"event\": \"PAYMENTS_STATUS\"\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(res)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.atoa.me/api/webhook/merchant")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://api/endpoint\",\n \"event\": \"PAYMENTS_STATUS\"\n}")
.asString();
{
"webhookId": "4a124f25-fe8d-47a0-92c8-16d94cbfe24c",
"url": "https://example.com",
"event": "PAYMENTS_STATUS"
}
{
"name": "AJV_VALIDATION_ERROR",
"message": "Bad request on parameter request.body.WebhookDataModel must have required property 'url'. Given value: undefined",
"status": 400,
"errors": [
{
"instancePath": "",
"schemaPath": "required",
"keyword": "required",
"params": {
"missingProperty": "url"
},
"message": "must have required property 'url' ",
"modelName": "WebhookDataModel",
"dataPath": ""
}
]
}
{
"name": "BAD_REQUEST",
"message": "POS Payment Status requires V2 signing. Please generate a signing secret from the dashboard to proceed.",
"status": 400
}
{
"name": "UNAUTHORIZED",
"message": "Unauthorized",
"status": 401,
"errors": "[]"
}
{
"name": "NOT_FOUND",
"message": "Webhook not found",
"status": 404,
"errors": "[]"
}
v1 Legacy API — This endpoint registers a single event type per call. Authentication configuration is not supported in v1 — use the v2 Create Endpoint to configure authentication, subscribe to multiple events per endpoint, and manage endpoints with full CRUD.
Authorization
Bearer<token>
Request Body Schema
string
required
The endpoint URL that will receive webhook notifications. Must return HTTP 200 on success — failed deliveries are retried with exponential back-off.
string
required
The event type to subscribe to:
PAYMENTS_STATUS, EXPIRED_STATUS, REFUND_STATUS, or POS_PAYMENT_STATUS.string
Unique identifier for this webhook subscription. Use this value to delete the subscription via
DELETE /api/webhook/{webhookId}/merchant.string
The registered webhook URL.
string
The subscribed event type.
curl --request POST \
--url https://api.atoa.me/api/webhook/merchant \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://api/endpoint",
"event": "PAYMENTS_STATUS"
}'
import requests
url = "https://api.atoa.me/api/webhook/merchant"
payload = {
"url": "https://api/endpoint",
"event": "PAYMENTS_STATUS"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: '{"url":"https://api/endpoint","event":"PAYMENTS_STATUS"}'
};
fetch('https://api.atoa.me/api/webhook/merchant', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atoa.me/api/webhook/merchant",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n \"url\": \"https://api/endpoint\",\n \"event\": \"PAYMENTS_STATUS\"\n }",
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.atoa.me/api/webhook/merchant"
payload := strings.NewReader("{\n \"url\": \"https://api/endpoint\",\n \"event\": \"PAYMENTS_STATUS\"\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(res)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.atoa.me/api/webhook/merchant")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://api/endpoint\",\n \"event\": \"PAYMENTS_STATUS\"\n}")
.asString();
{
"webhookId": "4a124f25-fe8d-47a0-92c8-16d94cbfe24c",
"url": "https://example.com",
"event": "PAYMENTS_STATUS"
}
{
"name": "AJV_VALIDATION_ERROR",
"message": "Bad request on parameter request.body.WebhookDataModel must have required property 'url'. Given value: undefined",
"status": 400,
"errors": [
{
"instancePath": "",
"schemaPath": "required",
"keyword": "required",
"params": {
"missingProperty": "url"
},
"message": "must have required property 'url' ",
"modelName": "WebhookDataModel",
"dataPath": ""
}
]
}
{
"name": "BAD_REQUEST",
"message": "POS Payment Status requires V2 signing. Please generate a signing secret from the dashboard to proceed.",
"status": 400
}
{
"name": "UNAUTHORIZED",
"message": "Unauthorized",
"status": 401,
"errors": "[]"
}
{
"name": "NOT_FOUND",
"message": "Webhook not found",
"status": 404,
"errors": "[]"
}
⌘I