一键导入
flutterwave-settlements
Fetch and reconcile settlement reports across currencies and subaccounts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fetch and reconcile settlement reports across currencies and subaccounts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Collect funds through bank transfer with account validation and asynchronous confirmation.
Maintain reusable payout recipients and senders for clean transfer orchestration.
Integrate airtime, data, and utility payments with validation and reconciliation checks.
Orchestrate batch dedicated-account creation and assignment workflows.
Handle direct card charges including PIN, OTP, and 3DS continuations in a deterministic flow.
Track and respond to dispute and chargeback cases with audit-ready evidence timelines.
| name | flutterwave-settlements |
| description | Fetch and reconcile settlement reports across currencies and subaccounts. |
Fetch and reconcile settlement reports across currencies and subaccounts.
const FLW_V3_BASE_URL = process.env.FLW_V3_BASE_URL ?? "https://api.flutterwave.com/v3";
const FLW_V4_BASE_URL = process.env.FLW_V4_BASE_URL ?? "https://developersandbox-api.flutterwave.com";
const FLW_SECRET_KEY = process.env.FLW_SECRET_KEY;
type FlwResponse<T> = {
status: "success" | "error";
message: string;
data: T;
};
class FlutterwaveApiError extends Error {
constructor(
message: string,
public readonly statusCode: number,
public readonly payload?: unknown,
) {
super(message);
this.name = "FlutterwaveApiError";
}
}
function getBaseUrl(version: "v3" | "v4") {
return version === "v3" ? FLW_V3_BASE_URL : FLW_V4_BASE_URL;
}
async function flwRequest<T>(
version: "v3" | "v4",
path: string,
init: RequestInit = {},
): Promise<FlwResponse<T>> {
if (!FLW_SECRET_KEY) {
throw new Error("Missing FLW_SECRET_KEY");
}
const response = await fetch(`${getBaseUrl(version)}${path}`, {
...init,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${FLW_SECRET_KEY}`,
...(init.headers ?? {}),
},
});
const body = (await response.json()) as FlwResponse<T>;
if (!response.ok || body.status === "error") {
throw new FlutterwaveApiError(
body.message || "Flutterwave API request failed",
response.status,
body,
);
}
return body;
}
| Version | Method | Route / Operation | Use Case | Reference |
|---|---|---|---|---|
| v3 | GET | /settlements | List settlements | https://developer.flutterwave.com/docs/settlements |
| v4 | GET | /settlement | List settlements | https://developer.flutterwave.com/reference/settlement_list |
| v4 | GET | /settlement/{id} | Retrieve settlement | https://developer.flutterwave.com/reference/settlement_get |
| v4 | GET | /fees | Join fee records for net settlement | https://developer.flutterwave.com/reference/fees_get |
| Market | Rail | Integration Notes |
|---|---|---|
| All | Daily settlement cut | Schedule nightly reconciliation. |
| All | Subaccount split settlement | Join split metadata at transaction level. |
| All | Multi-currency settlement | Report by currency and converted base view. |
export async function runSettlementsExample() {
return flwRequest<unknown>("v4", "/settlement", {
method: "GET",
});
}
v4 is resource-centric in the public reference. Keep route maps and payload types versioned in code so agent-generated integrations remain accurate.