Partner API SDK (REST)
Official client for the Fiatsend Partner API. Handles authentication, request formatting, and webhook signature verification.
npm install @fiatsend/sdk
# or
pip install fiatsend
This is the REST package published for Partner API integrators — not the on-chain contract SDK (see on-chain SDK).
Node.js
import Fiatsend from "@fiatsend/sdk";
const client = new Fiatsend({
apiKey: process.env.FIATSEND_API_KEY,
baseUrl: "https://sandbox.fiatsend.com/v1",
timeout: 30000,
});
const health = await client.health();
const rate = await client.getRate({
fromCurrency: "USDT",
toCurrency: "GHS",
amount: 50,
});
const withdrawal = await client.createWithdrawal({
amount: "50.00",
currency: "USDT",
recipientPhone: "+233501234567",
mobileNetwork: "MTN",
referenceId: "payout-001",
});
const done = await client.waitForCompletion(withdrawal.withdrawal_id, {
intervalMs: 2000,
timeoutMs: 120000,
});
Key methods
| Method | Description |
|---|---|
health() | API health |
getRate({ fromCurrency, toCurrency, amount }) | FX quote |
createWithdrawal(...) | Create payout |
getWithdrawal(id) | Payout status |
listTransactions({ page, perPage, status }) | History |
waitForCompletion(id, opts) | Poll until terminal |
createWebhook({ url, events, secret }) | Register webhook |
listWebhooks() | List endpoints |
deleteWebhook(id) | Remove endpoint |
Python
import os
import fiatsend
client = fiatsend.Fiatsend(
api_key=os.environ["FIATSEND_API_KEY"],
base_url="https://sandbox.fiatsend.com/v1",
)
rate = client.get_rate(from_currency="USDT", to_currency="GHS", amount=50)
withdrawal = client.create_withdrawal(
amount="50.00",
currency="USDT",
recipient_phone="+233501234567",
mobile_network="MTN",
reference_id="payout-001",
)
result = client.wait_for_completion(withdrawal["withdrawal_id"])
Webhook verification
Use the SDK's verifier with the raw request body and X-Fiatsend-Signature header. See Webhooks.