Simulate Webhook
curl --request POST \
--url https://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"Token": "eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..."
}
}
'import requests
url = "https://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate"
payload = { "request": { "Token": "eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..." } }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({request: {Token: 'eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0...'}})
};
fetch('https://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate', 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://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate",
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([
'request' => [
'Token' => 'eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0...'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate"
payload := strings.NewReader("{\n \"request\": {\n \"Token\": \"eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0...\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"Token\": \"eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0...\"\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Basic <encoded-value>");
request.AddJsonBody("{\n \"request\": {\n \"Token\": \"eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0...\"\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "20000003",
"error": "<string>",
"referenceNumber": "<string>"
}{
"code": "20000003",
"error": "<string>",
"referenceNumber": "<string>"
}Webhooks API
Simulate Webhook
Trigger a simulated QR Ph webhook (sandbox only)
POST
/
v1
/
webhooks
/
qrph
/
simulate
Simulate Webhook
curl --request POST \
--url https://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"Token": "eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..."
}
}
'import requests
url = "https://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate"
payload = { "request": { "Token": "eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..." } }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({request: {Token: 'eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0...'}})
};
fetch('https://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate', 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://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate",
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([
'request' => [
'Token' => 'eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0...'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate"
payload := strings.NewReader("{\n \"request\": {\n \"Token\": \"eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0...\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"Token\": \"eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0...\"\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://webhooks.sbx.moduluslabs.io/v1/webhooks/qrph/simulate");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Basic <encoded-value>");
request.AddJsonBody("{\n \"request\": {\n \"Token\": \"eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0...\"\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "20000003",
"error": "<string>",
"referenceNumber": "<string>"
}{
"code": "20000003",
"error": "<string>",
"referenceNumber": "<string>"
}Sandbox only. The decrypted request contains
qrBody (1 to 255 characters) and useCase (SUCCESS, MISSING_DESTINATION_ACCOUNT, MISSING_PARTNER_REVENUE_ACCOUNT, or UNSUPPORTED_TRANSFER_TYPE). The response is an encrypted {Token} envelope; the decrypted body is { "id": "<uuid>" }.Authorizations
HTTP Basic Authentication using your Secret Key as the username and an empty password
Body
application/json
Show child attributes
Show child attributes
Response
Webhook simulation sent successfully
The unique identifier of the original transaction (i.e., the id returned from the Create Dynamic QR Ph response).
Was this page helpful?