Fund a card
curl --request POST \
--url https://api.fyatu.com/api/v3.20/cards/{id}/fund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 50,
"reference": "order-001"
}
'import requests
url = "https://api.fyatu.com/api/v3.20/cards/{id}/fund"
payload = {
"amount": 50,
"reference": "order-001"
}
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: 50, reference: 'order-001'})
};
fetch('https://api.fyatu.com/api/v3.20/cards/{id}/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.fyatu.com/api/v3.20/cards/{id}/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' => 50,
'reference' => 'order-001'
]),
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.fyatu.com/api/v3.20/cards/{id}/fund"
payload := strings.NewReader("{\n \"amount\": 50,\n \"reference\": \"order-001\"\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.fyatu.com/api/v3.20/cards/{id}/fund")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 50,\n \"reference\": \"order-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fyatu.com/api/v3.20/cards/{id}/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\": 50,\n \"reference\": \"order-001\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "Card funded",
"data": {
"cardId": "crd_01HXYZ5555ABCDEF1111",
"amount": 50,
"currency": "USD",
"reference": "order-001",
"transactionId": "ltx_01HXYZ9999ABCDEF2222"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6a7b8c9d0e1f2",
"platform": "Fyatu CaaS",
"timestamp": "2026-05-26T10:00:00Z"
}
}Cards
Fund Card
Load funds from your program ledger onto a card. POST /cards//fund. Requires cards:write scope.
POST
/
cards
/
{id}
/
fund
Fund a card
curl --request POST \
--url https://api.fyatu.com/api/v3.20/cards/{id}/fund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 50,
"reference": "order-001"
}
'import requests
url = "https://api.fyatu.com/api/v3.20/cards/{id}/fund"
payload = {
"amount": 50,
"reference": "order-001"
}
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: 50, reference: 'order-001'})
};
fetch('https://api.fyatu.com/api/v3.20/cards/{id}/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.fyatu.com/api/v3.20/cards/{id}/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' => 50,
'reference' => 'order-001'
]),
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.fyatu.com/api/v3.20/cards/{id}/fund"
payload := strings.NewReader("{\n \"amount\": 50,\n \"reference\": \"order-001\"\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.fyatu.com/api/v3.20/cards/{id}/fund")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 50,\n \"reference\": \"order-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fyatu.com/api/v3.20/cards/{id}/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\": 50,\n \"reference\": \"order-001\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "Card funded",
"data": {
"cardId": "crd_01HXYZ5555ABCDEF1111",
"amount": 50,
"currency": "USD",
"reference": "order-001",
"transactionId": "ltx_01HXYZ9999ABCDEF2222"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6a7b8c9d0e1f2",
"platform": "Fyatu CaaS",
"timestamp": "2026-05-26T10:00:00Z"
}
}Overview
Transfers funds from your program ledger to a specific card. The program ledger balance decreases by the funded amount; the card becomes spendable once the provider confirms the fund. The card must beACTIVE — you cannot fund a FROZEN or TERMINATED card.
Funding is asynchronous. A successful (
2xx) response means the request was accepted and is pending confirmation from the card provider — the fund is not final and may still be rejected. The funding transaction stays PENDING until the provider confirms it. Use the CARD_FUNDED (confirmed — card credited) and CARD_FUND_FAILED (rejected — program ledger refunded) webhooks as the source of truth. Both echo the caller reference you supplied for reconciliation.Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The card ID (prefix crd_) |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount in full currency units (e.g. 50.00 = $50). Must be greater than 0. |
reference | string | No | Optional caller-supplied reference (order ID, batch ID, etc.) echoed back in the response and webhook |
Idempotency
Funding is idempotent on thereference field. If you retry a fund with the same
reference for the same card, the API returns the original result and does not debit
your program balance or fund the card again — a client retry or accidental double-submit can
never double-charge. Always send a stable, unique reference per logical fund.
Example
curl -X POST https://api.fyatu.com/api/v3.20/cards/crd_01HXYZ5555ABCDEF1111/fund \
-H "Authorization: Bearer $FYATU_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "amount": 50.00, "reference": "order-001" }'
const resp = await fetch(
'https://api.fyatu.com/api/v3.20/cards/crd_01HXYZ5555ABCDEF1111/fund',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.FYATU_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ amount: 50.00, reference: 'order-001' })
}
);
const body = await resp.json();
console.log('Loaded:', body.data.amount); // 50
console.log('Transaction:', body.data.transactionId);
import os, requests
resp = requests.post(
'https://api.fyatu.com/api/v3.20/cards/crd_01HXYZ5555ABCDEF1111/fund',
headers={'Authorization': f'Bearer {os.environ["FYATU_API_KEY"]}'},
json={'amount': 50.00, 'reference': 'order-001'}
)
data = resp.json()['data']
print('Loaded:', data['amount'])
print('Transaction:', data['transactionId'])
Success Response (200)
{
"success": true,
"status": 200,
"message": "Card funded",
"data": {
"cardId": "crd_01HXYZ5555ABCDEF1111",
"amount": 50.00,
"currency": "USD",
"reference": "order-001",
"transactionId": "ltx_01HXYZ9999ABCDEF2222"
},
"meta": {
"requestId": "req_01HXY123456ABCDEF",
"platform": "Fyatu CaaS",
"timestamp": "2026-05-26T10:00:00Z"
}
}
Webhook
ACARD_FUNDED event fires after a successful funding:
{
"event": "CARD_FUNDED",
"eventId": "evt_01HXY123456ABCDEF",
"businessId": "BUS1A2B3C4D5E6F",
"environment": "LIVE",
"timestamp": "2026-05-26T10:00:00Z",
"data": {
"cardId": "crd_01HXYZ5555ABCDEF1111",
"amount": 50.00,
"currency": "USD",
"reference": "order-001",
"transactionId": "ltx_01HXYZ9999ABCDEF2222",
"timestamp": "2026-05-26T10:00:00Z"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
CARD_NOT_FOUND | 404 | Card does not exist or belongs to another business/environment |
CARD_FROZEN_CANNOT_FUND | 422 | Card is frozen — unfreeze before funding |
CARD_ALREADY_TERMINATED | 422 | Card is already terminated |
INSUFFICIENT_PROGRAM_BALANCE | 422 | Program ledger balance is too low — top up your program balance |
INVALID_AMOUNT | 400 | Amount is zero, negative, or exceeds the program load cap |
PROVIDER_FUND_FAILED | 422 | The card provider rejected the funding for a specific, actionable reason (returned in error.detail, e.g. an amount cap) — ledger has been reverted |
CARD_FUNDING_UNAVAILABLE | 503 | Card funding is temporarily unavailable — either paused by Fyatu, or a transient processing issue on our side. Your program balance is not affected; retry later. |
INSUFFICIENT_SCOPE | 403 | Key lacks cards:write scope |
CARD_FUNDING_UNAVAILABLE is a transient condition, not a problem with your request or balance —
treat it as retryable (with backoff). It is distinct from INSUFFICIENT_PROGRAM_BALANCE, which means
your program balance is too low and requires a top-up.Authorizations
API key from the FYATU CaaS portal. Pass as Authorization: Bearer <key>.
Path Parameters
⌘I

