curl --request POST \
--url https://api.rigaly.com/api/v1/rewards/{id}/webhook/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://staging.example.com/rigaly/provision"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://staging.example.com/rigaly/provision'})
};
fetch('https://api.rigaly.com/api/v1/rewards/{id}/webhook/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/rewards/{id}/webhook/test"
payload = { "url": "https://staging.example.com/rigaly/provision" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rigaly.com/api/v1/rewards/{id}/webhook/test",
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([
'url' => 'https://staging.example.com/rigaly/provision'
]),
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;
}{
"success": true,
"message": "Endpoint responded correctly",
"data": {
"ok": true,
"http_status": 200,
"latency_ms": 148,
"asset": {
"type": "code",
"value": "TEST-XYZ123",
"expires_at": null
},
"error_code": null,
"error": null,
"request_preview": {
"event": "reward.provision",
"test": true,
"idempotency_key": "test_9f1c3a2e-5b7d-4e21-9a0c-1f2d3e4b5a67",
"redemption_id": null,
"reward_id": "3f2b1c9e-7d4a-4f1b-8c2e-9a0d1e2f3b4c",
"business_id": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
"user_id": null,
"asset_type": "code",
"requested_at": "2026-08-05T12:00:00.000Z"
}
}
}{
"success": false,
"error": {
"message": "REWARD_NOT_EXTERNALLY_SOURCED"
}
}{
"success": false,
"error": {
"message": "Reward not found"
}
}{
"success": false,
"error": {
"message": "DIGITAL_WEBHOOK_NOT_CONFIGURED"
}
}Test the provisioning endpoint
Dry-runs the external provisioning call against a reward whose
digital_asset_source is external. It creates no redemption, moves no
points and charges no fee — but it is a real signed request to your
endpoint, sent with test: true in the body, so return a throwaway
value rather than burning stock.
The response is HTTP 200 even when the test failed — ok is the real
result, with error_code / error explaining a failure and
request_preview showing the exact body that was signed. Pass a url to
try an endpoint you have not saved yet.
curl --request POST \
--url https://api.rigaly.com/api/v1/rewards/{id}/webhook/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://staging.example.com/rigaly/provision"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://staging.example.com/rigaly/provision'})
};
fetch('https://api.rigaly.com/api/v1/rewards/{id}/webhook/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/rewards/{id}/webhook/test"
payload = { "url": "https://staging.example.com/rigaly/provision" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rigaly.com/api/v1/rewards/{id}/webhook/test",
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([
'url' => 'https://staging.example.com/rigaly/provision'
]),
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;
}{
"success": true,
"message": "Endpoint responded correctly",
"data": {
"ok": true,
"http_status": 200,
"latency_ms": 148,
"asset": {
"type": "code",
"value": "TEST-XYZ123",
"expires_at": null
},
"error_code": null,
"error": null,
"request_preview": {
"event": "reward.provision",
"test": true,
"idempotency_key": "test_9f1c3a2e-5b7d-4e21-9a0c-1f2d3e4b5a67",
"redemption_id": null,
"reward_id": "3f2b1c9e-7d4a-4f1b-8c2e-9a0d1e2f3b4c",
"business_id": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
"user_id": null,
"asset_type": "code",
"requested_at": "2026-08-05T12:00:00.000Z"
}
}
}{
"success": false,
"error": {
"message": "REWARD_NOT_EXTERNALLY_SOURCED"
}
}{
"success": false,
"error": {
"message": "Reward not found"
}
}{
"success": false,
"error": {
"message": "DIGITAL_WEBHOOK_NOT_CONFIGURED"
}
}Authorizations
API key from the Rigaly dashboard: Authorization: Bearer rgly_sk_...
Path Parameters
Body
Optional override for the endpoint to test.
HTTPS URL to call instead of the reward's saved digital_webhook_url. Handy for testing a new endpoint before saving it. The reward's existing signing secret is used either way.
500"https://staging.example.com/rigaly/provision"
Response
Test completed — check ok, not the status code