Add test money
curl --request POST \
--url https://api.agentcard.sh/api/v2/company_wallet/test_fund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount_cents": 5000000
}
'import requests
url = "https://api.agentcard.sh/api/v2/company_wallet/test_fund"
payload = { "amount_cents": 5000000 }
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_cents: 5000000})
};
fetch('https://api.agentcard.sh/api/v2/company_wallet/test_fund', 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.agentcard.sh/api/v2/company_wallet/test_fund",
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_cents' => 5000000
]),
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.agentcard.sh/api/v2/company_wallet/test_fund"
payload := strings.NewReader("{\n \"amount_cents\": 5000000\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.agentcard.sh/api/v2/company_wallet/test_fund")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount_cents\": 5000000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentcard.sh/api/v2/company_wallet/test_fund")
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_cents\": 5000000\n}"
response = http.request(request)
puts response.read_body{
"object": "company_wallet",
"livemode": true,
"balance_cents": 123,
"committed_cents": 123,
"available_cents": 123,
"flow_of_funds": "<string>",
"default_funds_source": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>",
"field_errors": {},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>",
"field_errors": {},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>",
"field_errors": {},
"warnings": [
"<string>"
]
}
}Company wallet
Add test money
Add mock money to your sandbox company balance.
POST
/
api
/
v2
/
company_wallet
/
test_fund
Add test money
curl --request POST \
--url https://api.agentcard.sh/api/v2/company_wallet/test_fund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount_cents": 5000000
}
'import requests
url = "https://api.agentcard.sh/api/v2/company_wallet/test_fund"
payload = { "amount_cents": 5000000 }
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_cents: 5000000})
};
fetch('https://api.agentcard.sh/api/v2/company_wallet/test_fund', 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.agentcard.sh/api/v2/company_wallet/test_fund",
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_cents' => 5000000
]),
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.agentcard.sh/api/v2/company_wallet/test_fund"
payload := strings.NewReader("{\n \"amount_cents\": 5000000\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.agentcard.sh/api/v2/company_wallet/test_fund")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount_cents\": 5000000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentcard.sh/api/v2/company_wallet/test_fund")
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_cents\": 5000000\n}"
response = http.request(request)
puts response.read_body{
"object": "company_wallet",
"livemode": true,
"balance_cents": 123,
"committed_cents": 123,
"available_cents": 123,
"flow_of_funds": "<string>",
"default_funds_source": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>",
"field_errors": {},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>",
"field_errors": {},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>",
"field_errors": {},
"warnings": [
"<string>"
]
}
}Adds mock money to your sandbox company balance, so you can issue test cards.
A production credential is refused with
test_fund_live_mode.Authorizations
A platform access token. Get one on the Create an access token endpoint by exchanging your client_id + client_secret, then send it as Authorization: Bearer <token>. Tokens live one hour.
Body
application/json
What to add, in cents. Up to 10000000.
Required range:
1 <= x <= 10000000Response
The company wallet.
Always company_wallet.
Available options:
company_wallet false on a sandbox credential.
What's on the balance.
What open cards hold.
What's free for new cards.
user or company.
What your company's cards draw on. It applies to every card.