Simulate a USD beneficiary outcome (sandbox only)
curl --request POST \
--url https://api.jenzy.com/v2/beneficiaries/{id}/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"outcome": "rejected"
}
'import requests
url = "https://api.jenzy.com/v2/beneficiaries/{id}/simulate"
payload = { "outcome": "rejected" }
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({outcome: 'rejected'})
};
fetch('https://api.jenzy.com/v2/beneficiaries/{id}/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/beneficiaries/{id}/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([
'outcome' => 'rejected'
]),
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/beneficiaries/{id}/simulate"
payload := strings.NewReader("{\n \"outcome\": \"rejected\"\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/beneficiaries/{id}/simulate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"outcome\": \"rejected\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jenzy.com/v2/beneficiaries/{id}/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 \"outcome\": \"rejected\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset": "USD",
"status": "pending",
"holder": {
"type": "business",
"name": "<string>",
"email": "<string>",
"phone": "<string>"
},
"holder_address": {
"street_line_1": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"country": "<string>"
},
"bank": {
"name": "<string>",
"account_number": "<string>",
"account_type": "checking",
"address": {
"street_line_1": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"country": "<string>"
}
},
"rail": "fedwire",
"routing_number": "<string>",
"intermediary_routing_number": "<string>",
"counter_party": "third_party",
"relationship": "supplier",
"purpose": "freight",
"failure": {
"code": "recipient_account_invalid",
"message": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}Sandbox
Simulate a USD beneficiary outcome (sandbox only)
Sandbox only. Make the check of a USD beneficiary give an outcome now, to test your handling of it. You get the same beneficiary.* webhook as for a real outcome. With no call, a pending beneficiary becomes active about 10 seconds after you register it. In any other environment this route answers 403 sandbox_only.
POST
/
beneficiaries
/
{id}
/
simulate
Simulate a USD beneficiary outcome (sandbox only)
curl --request POST \
--url https://api.jenzy.com/v2/beneficiaries/{id}/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"outcome": "rejected"
}
'import requests
url = "https://api.jenzy.com/v2/beneficiaries/{id}/simulate"
payload = { "outcome": "rejected" }
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({outcome: 'rejected'})
};
fetch('https://api.jenzy.com/v2/beneficiaries/{id}/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/beneficiaries/{id}/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([
'outcome' => 'rejected'
]),
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/beneficiaries/{id}/simulate"
payload := strings.NewReader("{\n \"outcome\": \"rejected\"\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/beneficiaries/{id}/simulate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"outcome\": \"rejected\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jenzy.com/v2/beneficiaries/{id}/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 \"outcome\": \"rejected\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset": "USD",
"status": "pending",
"holder": {
"type": "business",
"name": "<string>",
"email": "<string>",
"phone": "<string>"
},
"holder_address": {
"street_line_1": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"country": "<string>"
},
"bank": {
"name": "<string>",
"account_number": "<string>",
"account_type": "checking",
"address": {
"street_line_1": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"country": "<string>"
}
},
"rail": "fedwire",
"routing_number": "<string>",
"intermediary_routing_number": "<string>",
"counter_party": "third_party",
"relationship": "supplier",
"purpose": "freight",
"failure": {
"code": "recipient_account_invalid",
"message": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>"
}
}Headers
Body
application/json
Response
The USD beneficiary, with its new status.