curl --request POST \
--url https://api.atoa.me/api/webhook/test \
--header 'Authorization: Bearer <sandbox-token>' \
--header 'Content-Type: application/json' \
--data '{
"eventType": "PAYMENTS_STATUS"
}'
curl --request POST \
--url https://api.atoa.me/api/webhook/test \
--header 'Authorization: Bearer <sandbox-token>' \
--header 'Content-Type: application/json' \
--data '{
"eventType": "PAYMENTS_STATUS",
"orderId": "test-order-001",
"amount": 10.05,
"paymentMethod": "CARD",
"status": "AUTHORIZED"
}'
curl --request POST \
--url https://api.atoa.me/api/webhook/test \
--header 'Authorization: Bearer <sandbox-token>' \
--header 'Content-Type: application/json' \
--data '{
"eventType": "POS_PAYMENT_STATUS",
"type": "PAYMENTS_STATUS",
"status": "COMPLETED",
"customFields": [{ "value": "CUST_001", "fieldName": "Customer ID" }]
}'
import requests
url = "https://api.atoa.me/api/webhook/test"
payload = {
"eventType": "PAYMENTS_STATUS",
"orderId": "test-order-001",
"amount": 10.05,
"paymentMethod": "CARD",
"status": "AUTHORIZED"
}
headers = {
"Authorization": "Bearer <sandbox-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch("https://api.atoa.me/api/webhook/test", {
method: "POST",
headers: {
Authorization: "Bearer <sandbox-token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
eventType: "PAYMENTS_STATUS",
orderId: "test-order-001",
amount: 10.05,
paymentMethod: "CARD",
status: "AUTHORIZED",
}),
});
const data = await response.json();
console.log(data);
{
"message": "Test webhook triggered successfully."
}
{
"name": "BAD_REQUEST",
"message": "Webhook test triggers are only supported for sandbox tokens.",
"status": 400
}
{
"name": "BAD_REQUEST",
"message": "status=\"AUTHORIZED\" is not valid for REFUND_STATUS. Valid: COMPLETED, CANCELLED, FAILED.",
"status": 400,
"errors": []
}
{
"name": "UNAUTHORIZED",
"message": "Unauthorized",
"status": 401,
"errors": []
}
{
"name": "NOT_FOUND",
"message": "No webhook subscription is configured for this merchant and event.",
"status": 404
}
Endpoints
Trigger test webhook event
Send a test 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
/
test
curl --request POST \
--url https://api.atoa.me/api/webhook/test \
--header 'Authorization: Bearer <sandbox-token>' \
--header 'Content-Type: application/json' \
--data '{
"eventType": "PAYMENTS_STATUS"
}'
curl --request POST \
--url https://api.atoa.me/api/webhook/test \
--header 'Authorization: Bearer <sandbox-token>' \
--header 'Content-Type: application/json' \
--data '{
"eventType": "PAYMENTS_STATUS",
"orderId": "test-order-001",
"amount": 10.05,
"paymentMethod": "CARD",
"status": "AUTHORIZED"
}'
curl --request POST \
--url https://api.atoa.me/api/webhook/test \
--header 'Authorization: Bearer <sandbox-token>' \
--header 'Content-Type: application/json' \
--data '{
"eventType": "POS_PAYMENT_STATUS",
"type": "PAYMENTS_STATUS",
"status": "COMPLETED",
"customFields": [{ "value": "CUST_001", "fieldName": "Customer ID" }]
}'
import requests
url = "https://api.atoa.me/api/webhook/test"
payload = {
"eventType": "PAYMENTS_STATUS",
"orderId": "test-order-001",
"amount": 10.05,
"paymentMethod": "CARD",
"status": "AUTHORIZED"
}
headers = {
"Authorization": "Bearer <sandbox-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch("https://api.atoa.me/api/webhook/test", {
method: "POST",
headers: {
Authorization: "Bearer <sandbox-token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
eventType: "PAYMENTS_STATUS",
orderId: "test-order-001",
amount: 10.05,
paymentMethod: "CARD",
status: "AUTHORIZED",
}),
});
const data = await response.json();
console.log(data);
{
"message": "Test webhook triggered successfully."
}
{
"name": "BAD_REQUEST",
"message": "Webhook test triggers are only supported for sandbox tokens.",
"status": 400
}
{
"name": "BAD_REQUEST",
"message": "status=\"AUTHORIZED\" is not valid for REFUND_STATUS. Valid: COMPLETED, CANCELLED, FAILED.",
"status": 400,
"errors": []
}
{
"name": "UNAUTHORIZED",
"message": "Unauthorized",
"status": 401,
"errors": []
}
{
"name": "NOT_FOUND",
"message": "No webhook subscription is configured for this merchant and event.",
"status": 404
}
Sends a test webhook to your sandbox URL. Body and signature match a production event — verify your endpoint without creating a real payment.
Rejected for non-POS events.
Response
Sandbox-only — production keys are rejected. Delivers to all sandbox endpoints subscribed to the specified
eventType.Authorization
Bearer<sandbox-token>
Request Body Schema
string
required
The webhook event to simulate.
Possible values
Possible values
PAYMENTS_STATUS— payment-status webhook (pay-by-bank or card)EXPIRED_STATUS— payment expired (customer didn’t pay in time)REFUND_STATUS— refund-status webhookPOS_PAYMENT_STATUS— POS event — choose which event to simulate viatype
string
Override the
orderId. Defaults to a generated test value.number
Override the
paidAmount in pounds (e.g. 10.05 for £10.05). Defaults to a test value.string
Override the
paymentMethod.Possible values
Possible values
CARDPAY_BY_BANK
string
Override the
status. Valid values depend on eventType:Allowed values per event
Allowed values per event
PAYMENTS_STATUS→COMPLETED|AUTHORIZED(CARD only) |FAILEDREFUND_STATUS→COMPLETED|CANCELLED|FAILEDEXPIRED_STATUS→ ignored (always emitsEXPIRED)POS_PAYMENT_STATUS→ depends ontype(see below)
string
POS_PAYMENT_STATUS only — selects which POS event to simulate.Possible values
Possible values
PAYMENTS_STATUS— a completed POS payment (default)REFUND_STATUS— a POS refundEXPIRED_STATUS— an expired POS payment
array
string
Confirmation that the test webhook was dispatched. Payload arrives at your registered URL asynchronously.
curl --request POST \
--url https://api.atoa.me/api/webhook/test \
--header 'Authorization: Bearer <sandbox-token>' \
--header 'Content-Type: application/json' \
--data '{
"eventType": "PAYMENTS_STATUS"
}'
curl --request POST \
--url https://api.atoa.me/api/webhook/test \
--header 'Authorization: Bearer <sandbox-token>' \
--header 'Content-Type: application/json' \
--data '{
"eventType": "PAYMENTS_STATUS",
"orderId": "test-order-001",
"amount": 10.05,
"paymentMethod": "CARD",
"status": "AUTHORIZED"
}'
curl --request POST \
--url https://api.atoa.me/api/webhook/test \
--header 'Authorization: Bearer <sandbox-token>' \
--header 'Content-Type: application/json' \
--data '{
"eventType": "POS_PAYMENT_STATUS",
"type": "PAYMENTS_STATUS",
"status": "COMPLETED",
"customFields": [{ "value": "CUST_001", "fieldName": "Customer ID" }]
}'
import requests
url = "https://api.atoa.me/api/webhook/test"
payload = {
"eventType": "PAYMENTS_STATUS",
"orderId": "test-order-001",
"amount": 10.05,
"paymentMethod": "CARD",
"status": "AUTHORIZED"
}
headers = {
"Authorization": "Bearer <sandbox-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch("https://api.atoa.me/api/webhook/test", {
method: "POST",
headers: {
Authorization: "Bearer <sandbox-token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
eventType: "PAYMENTS_STATUS",
orderId: "test-order-001",
amount: 10.05,
paymentMethod: "CARD",
status: "AUTHORIZED",
}),
});
const data = await response.json();
console.log(data);
{
"message": "Test webhook triggered successfully."
}
{
"name": "BAD_REQUEST",
"message": "Webhook test triggers are only supported for sandbox tokens.",
"status": 400
}
{
"name": "BAD_REQUEST",
"message": "status=\"AUTHORIZED\" is not valid for REFUND_STATUS. Valid: COMPLETED, CANCELLED, FAILED.",
"status": 400,
"errors": []
}
{
"name": "UNAUTHORIZED",
"message": "Unauthorized",
"status": 401,
"errors": []
}
{
"name": "NOT_FOUND",
"message": "No webhook subscription is configured for this merchant and event.",
"status": 404
}