curl --request POST \
--url https://api.jenzy.com/v2/collections/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "250000.00",
"asset": "KES"
}
'import requests
url = "https://api.jenzy.com/v2/collections/simulate"
payload = {
"amount": "250000.00",
"asset": "KES"
}
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({amount: '250000.00', asset: 'KES'})
};
fetch('https://api.jenzy.com/v2/collections/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.jenzy.com/v2/collections/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([
'amount' => '250000.00',
'asset' => 'KES'
]),
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.jenzy.com/v2/collections/simulate"
payload := strings.NewReader("{\n \"amount\": \"250000.00\",\n \"asset\": \"KES\"\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.jenzy.com/v2/collections/simulate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"250000.00\",\n \"asset\": \"KES\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jenzy.com/v2/collections/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 \"amount\": \"250000.00\",\n \"asset\": \"KES\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"asset": "KES",
"amount": "1000.00",
"status": "processing"
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}Simulate a collection (sandbox only)
Sandbox only: asks the custodian’s sandbox to land amount of asset on your balance. Answers 202 at once; the money credits in about a minute through the ordinary collection path, so poll GET /v2/collections for it. No Idempotency-Key: a duplicate is just more test money. In every other environment this route answers 403 sandbox_only.
curl --request POST \
--url https://api.jenzy.com/v2/collections/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "250000.00",
"asset": "KES"
}
'import requests
url = "https://api.jenzy.com/v2/collections/simulate"
payload = {
"amount": "250000.00",
"asset": "KES"
}
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({amount: '250000.00', asset: 'KES'})
};
fetch('https://api.jenzy.com/v2/collections/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.jenzy.com/v2/collections/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([
'amount' => '250000.00',
'asset' => 'KES'
]),
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.jenzy.com/v2/collections/simulate"
payload := strings.NewReader("{\n \"amount\": \"250000.00\",\n \"asset\": \"KES\"\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.jenzy.com/v2/collections/simulate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"250000.00\",\n \"asset\": \"KES\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jenzy.com/v2/collections/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 \"amount\": \"250000.00\",\n \"asset\": \"KES\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"asset": "KES",
"amount": "1000.00",
"status": "processing"
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}Authorizations
Your Jenzy API key: Authorization: Bearer jz_live_…
Body
An exact decimal string in the asset’s major unit, with at most the asset’s decimals ("250000.00", "12.5"), or a JSON integer of whole units. Fractional JSON numbers are rejected — send a string. Parse with a decimal library, never a float.
"250000.00"
An asset code as GET /v2/assets lists it — uppercase, never compound (KES, USDT; never USDT-TRON). Network and rail live on the payment object.
1"KES"
Response
Accepted, not yet credited. id is null (and status is pending) when the sandbox’s answer was lost — the deposit may still land, so poll rather than retry.
The sandbox deposit id, or null when the request reached the sandbox but its answer was lost — the deposit may still land. Do NOT retry on null; poll GET /v2/collections.
An asset code as GET /v2/assets lists it — uppercase, never compound (KES, USDT; never USDT-TRON). Network and rail live on the payment object.
1"KES"
"1000.00"
processing at accept, or pending when the answer was lost; either way the credit appears in GET /v2/collections within about a minute.
"processing"