Build carbon-negative cross-border payments in one API call.
Keep whatever payment provider you already use. Point a payment intent at the AfriCredit corridor API and SynapticChain resolves the optimal route, settles atomically in under a second, and retires carbon on-chain — returning a verifiable certificate with every transaction.
Introduction
AfriCredit is the settlement layer for African stablecoins, running on SynapticChain. A single REST endpoint turns a payment intent into an atomic on-chain settlement: mint, route through the aUSD hub or a direct pair, off-ramp, and retire carbon — all in one transaction that finalizes in well under a second.
0.01% levy buys and burns tCC credits atomically and returns a certificate you can surface to your users.Quickstart
Send your first cross-border settlement in three steps. The example moves 150,000 NGN to a Kenyan recipient in KES.
- 1Grab a secret key from the dashboard. Test keys are prefixed
sk_test_afc. - 2POST a payment intent to the corridor endpoint.
- 3Read the settlement + carbon certificate from the response.
curl -X POST https://api.synapticchain.xyz/settle \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"source": "NGN",
"destination": "KES",
"amount": 150000,
"recipient": "syn1q9recipient…",
"provider": "flutterwave"
}'import { AfriCredit } from '@africredit/sdk'
const afc = new AfriCredit({ apiKey: process.env.SYNAPTICCHAIN_API_KEY })
const settlement = await afc.corridors.settle({
source: 'NGN',
destination: 'KES',
amount: 150_000,
recipient: 'syn1q9recipient…',
provider: 'flutterwave',
})
console.log(settlement.certificate.certificateId)
// -> tCC-9F2A-C7B1 (carbon retired atomically)Authentication
Authenticate every request with a bearer token in the Authorization header. Keys are environment-scoped — never ship a live key to a browser or mobile client.
X-API-Key: your_api_key_hereThe RPC endpoint at api.synapticchain.xyz/rpc uses the same X-API-Key header. The public /health endpoint requires no key.
Simulated corridors and certificates. No real value moves.
Production settlements against live vaults and oracles on mainnet-beta.
Corridor API
/settleResolve the best route between two markets and settle atomically. Source and destination accept either a fiat code (NGN) or its stablecoin (cNGN).
Body parameters
sourcestringrequireddestinationstringrequiredamountnumberrequiredrecipientstringoptionalproviderstringoptionalResponse
Returns the resolved route, the amount that lands, timing, and an embedded carbon certificate.
{
"ok": true,
"settlementId": "scs_8fk2p1az",
"txHash": "0x7c3f…e91a",
"corridor": "NGN→KES",
"path": "hub",
"amountIn": 150000,
"currencyIn": "NGN",
"amountOut": 12184.55,
"currencyOut": "KES",
"effectiveRate": 0.0812,
"feePct": 0.01,
"finalityMs": 397,
"youGainPct": 7.9,
"hops": ["NGN", "cNGN", "aUSD", "cKES", "KES"],
"carbon": {
"carbonFeeUsd": 0.0094,
"tccRetired": 0.0947,
"co2Tonnes": 0.000947,
"co2Kg": 0.947
},
"certificate": {
"certificateId": "tCC-9F2A-C7B1",
"retirementHash": "0x1b8c…",
"gescoStatus": "pending-quarterly-audit",
"ncmcStandard": "NCMC-CA-2026 · national carbon accounting"
},
"explorer": "https://explorer.synapticchain.xyz/tx/0x7c3f…e91a"
}Webhooks
Rather than polling, subscribe to settlement lifecycle events. AfriCredit POSTs a signed JSON payload to your endpoint as each stage completes — the same event stream you see in the live demo.
| Event | Fires when |
|---|---|
settlement.created | Payment intent accepted and route solved. |
settlement.routed | Corridor path locked against oracle marks. |
settlement.retired | tCC purchased and burned; certificate minted. |
settlement.settled | Funds landed in the recipient wallet. |
settlement.failed | Route became unfillable; funds unwound atomically. |
Example payload
// POST from AfriCredit -> your endpoint
{
"event": "settlement.retired",
"settlementId": "scs_8fk2p1az",
"corridor": "NGN→KES",
"amountOut": 12184.55,
"currencyOut": "KES",
"certificate": {
"certificateId": "tCC-9F2A-C7B1",
"co2Kg": 0.947,
"gescoStatus": "pending-quarterly-audit"
},
"signature": "t=1751760000,v1=8d5f…"
}Verifying signatures
Every request carries an AfriCredit-Signature header. Compute an HMAC-SHA256 over `${timestamp}.${body}` and compare in constant time.
import crypto from 'node:crypto'
export function verify(payload: string, header: string) {
const [t, v1] = header.split(',').map((p) => p.split('=')[1])
const signed = `${t}.${payload}`
const digest = crypto
.createHmac('sha256', process.env.AFC_WEBHOOK_SECRET!)
.update(signed)
.digest('hex')
return crypto.timingSafeEqual(Buffer.from(digest), Buffer.from(v1))
}Errors
Errors return a non-2xx status with { ok: false, error, message }. The error field is a stable machine code.
| Code | Status | Meaning |
|---|---|---|
invalid_json | 400 | Request body was not valid JSON. |
unauthorized | 401 | Missing or invalid API key. |
unroutable | 422 | Source/destination are equal, unknown, or amount ≤ 0. |
insufficient_depth | 409 | Vault depth too shallow for the notional. |
rate_limited | 429 | Too many requests — back off and retry. |
Carbon & certificates
Carbon retirement is constitutional to the protocol. The carbon and certificate objects on every settlement are your ESG audit trail: certificate ID, retirement hash, tCC burned, CO₂ offset, and GESCO verification status against the NCMC-CA-2026 standard.
Supported corridors
12 live markets, each with an on-chain stablecoin and an over-collateralized vault. Any pair is routable — directly or through the aUSD hub.
| Market | Fiat | Stablecoin | Vault depth |
|---|---|---|---|
| Nigeriahub | NGN | cNGN | $214M |
| Kenyahub | KES | cKES | $168M |
| South Africahub | ZAR | cZAR | $231M |
| Tanzania | TZS | cTZS | $96M |
| Ghana | GHS | cGHS | $84M |
| Egypthub | EGP | cEGP | $142M |
| Zambia | ZMW | cZMW | $41M |
| Uganda | UGX | cUGX | $52M |
| Morocco | MAD | cMAD | $73M |
| Senegal | XOF | cXOF | $58M |
| Rwanda | RWF | cRWF | $33M |
| Ethiopia | ETB | cETB | $47M |