Simulate a sandbox payment
curl --request POST \
--url https://api.payracle.com/api/v1/checkout/sandbox/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference": "PAY-A1B2C3D4E5",
"status": "success"
}
'import requests
url = "https://api.payracle.com/api/v1/checkout/sandbox/simulate"
payload = {
"reference": "PAY-A1B2C3D4E5",
"status": "success"
}
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({reference: 'PAY-A1B2C3D4E5', status: 'success'})
};
fetch('https://api.payracle.com/api/v1/checkout/sandbox/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://api.payracle.com/api/v1/checkout/sandbox/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([
'reference' => 'PAY-A1B2C3D4E5',
'status' => 'success'
]),
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.payracle.com/api/v1/checkout/sandbox/simulate"
payload := strings.NewReader("{\n \"reference\": \"PAY-A1B2C3D4E5\",\n \"status\": \"success\"\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.payracle.com/api/v1/checkout/sandbox/simulate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reference\": \"PAY-A1B2C3D4E5\",\n \"status\": \"success\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payracle.com/api/v1/checkout/sandbox/simulate")
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 \"reference\": \"PAY-A1B2C3D4E5\",\n \"status\": \"success\"\n}"
response = http.request(request)
puts response.read_bodyCheckout & Dynamic Accounts
Sandbox Simulate
Mark a test checkout as paid without moving real money
POST
/
checkout
/
sandbox
/
simulate
Simulate a sandbox payment
curl --request POST \
--url https://api.payracle.com/api/v1/checkout/sandbox/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference": "PAY-A1B2C3D4E5",
"status": "success"
}
'import requests
url = "https://api.payracle.com/api/v1/checkout/sandbox/simulate"
payload = {
"reference": "PAY-A1B2C3D4E5",
"status": "success"
}
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({reference: 'PAY-A1B2C3D4E5', status: 'success'})
};
fetch('https://api.payracle.com/api/v1/checkout/sandbox/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://api.payracle.com/api/v1/checkout/sandbox/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([
'reference' => 'PAY-A1B2C3D4E5',
'status' => 'success'
]),
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.payracle.com/api/v1/checkout/sandbox/simulate"
payload := strings.NewReader("{\n \"reference\": \"PAY-A1B2C3D4E5\",\n \"status\": \"success\"\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.payracle.com/api/v1/checkout/sandbox/simulate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reference\": \"PAY-A1B2C3D4E5\",\n \"status\": \"success\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payracle.com/api/v1/checkout/sandbox/simulate")
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 \"reference\": \"PAY-A1B2C3D4E5\",\n \"status\": \"success\"\n}"
response = http.request(request)
puts response.read_bodyPOST /v1/checkout/sandbox/simulate
Test-mode only (sk_test_... / pk_test_...) — marks a test checkout as paid (or failed) without any real money moving, so you can test your integration end-to-end.
string
required
The
reference from a checkout initialized in test modestring
default:"success"
success or failedcurl -X POST "https://api.payracle.com/api/v1/checkout/sandbox/simulate" \
-H "Authorization: Bearer sk_test_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"reference": "PAY-A1B2C3D4E5", "status": "success"}'
403:
{ "status": false, "message": "Simulation is only available with sandbox (test) API keys." }