Viaro Developer Platform • API v1
Durable /v1 API contracts and official SDKs built for African rails.
Integrate POST /v1/payment-intents with our official Node.js (@viaro/node) and Python (viaro) SDKs. Every mutation is guarded by Idempotency-Key locks and backed by a double-entry ledger.
API Key Isolation & Naming Convention
Sandbox secret keys use sk_test_YOUR_SANDBOX_SECRET_KEY and route automatically to https://api.viarosandbox.com/v1. Publishable keys (pk_test_*) are rejected on server-side mutations.
npm install @viaro/nodePOST /v1/payment-intents
import { Viaro } from "@viaro/node";
const viaro = new Viaro(process.env.VIARO_SECRET_KEY!); // sk_test_YOUR_SANDBOX_SECRET_KEY
const intent = await viaro.payments.create(
{
amount: 25000,
currency: "XAF",
payment_method: "momo_mtn",
customer_phone: "+237670000000",
customer_email: "nadia@merchant.cm",
description: "Order #ORD-2026-0841",
metadata: {
order_id: "ord_2026_0841",
tax_regime: "CEMAC_TVA_19_25",
},
},
{
idempotencyKey: "idemp_ord_2026_0841_attempt_1",
}
);
console.log(intent.id, intent.status);Base URL: https://api.viarosandbox.com/v1Generate Sandbox Key
Event Integrity & Non-Repudiation
HMAC-SHA256 webhook verification with 300s replay protection.
Every webhook event dispatched by Viaro includes an X-Viaro-Signature header (t=timestamp,v1=hmac). Both @viaro/node and viaro Python verify the payload in constant time and reject stale timestamps.
Webhook Verification (whsec_YOUR_WEBHOOK_SIGNING_SECRET)Constant-Time HMAC-SHA256
import { Viaro } from "@viaro/node";
const viaro = new Viaro(process.env.VIARO_SECRET_KEY!);
export async function handleViaroWebhook(rawBody: string, signatureHeader: string) {
// Constant-time HMAC-SHA256 verification with 300s replay protection
const event = viaro.webhooks.constructEvent(
rawBody,
signatureHeader,
process.env.VIARO_WEBHOOK_SECRET! // whsec_YOUR_WEBHOOK_SIGNING_SECRET
);
if (event.type === "payment_intent.succeeded") {
const intent = event.data.object;
console.log("Verified ledger journal:", intent.id);
}
}GET /v1/corridors/health
Carrier Health & USSD Latency Telemetry
🇨🇲 MTN Mobile Money Cameroonoperational
1h Success Rate98.4%
Avg Latency1420 ms
Method: momo_mtn • Currencies: XAF
🇨🇲 Orange Money Cameroonoperational
1h Success Rate97.2%
Avg Latency1650 ms
Method: momo_orange • Currencies: XAF
🇨🇲 CEMAC Bank Transfers (Afriland, SGBC, UBA, BICEC)operational
1h Success Rate99.5%
Avg Latency420 ms
Method: bank_transfer • Currencies: XAF
🇬🇦 Airtel Money & MTN MoMo Congooperational
1h Success Rate96.8%
Avg Latency1790 ms
Method: momo_airtel • Currencies: XAF
🇨🇮 Orange Money, Wave & MTN MoMo UEMOAoperational
1h Success Rate98.1%
Avg Latency1180 ms
Method: wave_uemoa • Currencies: XOF
🇳🇬 NIP Instant Transfer, MTN Ghana & Safaricom M-Pesaoperational
1h Success Rate97.6%
Avg Latency1510 ms
Method: mpesa_nip • Currencies: NGN, GHS, KES
🌍 Visa, Mastercard & PayPal Globaloperational
1h Success Rate99.2%
Avg Latency680 ms
Method: card • Currencies: USD, EUR, GBP, XAF
Model Context Protocol (MCP) & Scoped Mandates
JSON-RPC 2.0 tool schemas and human-in-the-loop spend mandates.
Spend Mandate Policy Simulator
HITL Threshold: 250,000 XAF
Max Single Tx: 500,000 XAF
REQUIRES_HUMAN_APPROVAL (HITL)
Transaction exceeds hitl_threshold_xaf. Queued for merchant dashboard approval.
JSON-RPC 2.0 Request (create_payment_intent)
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_payment_intent",
"arguments": {
"amount": 25000,
"currency": "XAF",
"payment_method": "momo_mtn",
"customer_phone": "+237670000000",
"idempotency_key": "idemp_mcp_019318b2"
}
}
}JSON-RPC 2.0 Response
{
"id": "pi_019318b2_8291",
"object": "payment_intent",
"amount": 25000,
"currency": "XAF",
"status": "pending_customer_authorization",
"route": "mtn_cm_direct_stk"
}Canonical Fee Quote API • Identical to /pricing
Programmatic Fee & Net Settlement Preview
Gross Amount:100,000 XAF
Total Fee (2.50%):-2,500 XAF
Net Merchant Credit:97,500 XAF