API reference

Integrate credit scoring into your platform

The AfriScore API accepts alternative data fields and returns a calibrated credit score, risk tier, and probability of default. A slower endpoint adds SHAP-based explainability on request.

01

Quickstart

Your first API call, illustrated below. Live keys are issued after pilot onboarding.

curl -X POST https://api.afriscore.africa/v1/score \
  -H "Content-Type: application/json" \
  -d '{
    "momo_txn_count_monthly": 38,
    "momo_txn_volume_monthly_xaf": 145000,
    "momo_account_age_months": 18,
    "momo_balance_volatility": 0.35,
    "momo_inflow_outflow_ratio": 1.12,
    "airtime_topup_freq_monthly": 6,
    "airtime_topup_regularity": 0.82,
    "airtime_avg_topup_xaf": 800,
    "device_age_months": 14,
    "device_os_updated": true,
    "device_instability_score": 0.2,
    "has_prior_mfi_loan": false,
    "prior_loan_repaid_on_time_ratio": 0
  }'
02

Endpoints

POST

/v1/score

Submit an application for scoring. Returns score, risk tier, and probability of default — fast, well under a second.

200 OK
{
  "score": 742,
  "risk_tier": "A",
  "probability_of_default": 0.0821
}
POST

/v1/explain

Same result as /v1/score, plus SHAP-based feature contributions explaining the decision. Significantly slower — roughly 15-25 seconds per request.

200 OK
{
  "score": 742,
  "risk_tier": "A",
  "probability_of_default": 0.0821,
  "top_factors": [
    {
      "feature": "momo_balance_volatility",
      "value": 0.35,
      "shap_contribution": -0.0421,
      "direction": "decreased"
    },
    {
      "feature": "prior_loan_repaid_on_time_ratio",
      "value": 0.0,
      "shap_contribution": 0.0198,
      "direction": "increased"
    }
  ]
}
GET

/v1/health

Check API status. No authentication required.

03

Try It

This calls the live AfriScore API directly from your browser. The model is trained on synthetic data — real institutional calibration happens during a pilot.

Request

Response

{ }

This calls the live pilot-stage API at https://api.afriscore.africa. The model is trained on synthetic data. Real institutional calibration happens during a pilot.

Full Documentation

Authentication, error codes, rate limits, webhooks, and self-hosting guides.

Everything you need to integrate AfriScore into your loan origination system, including the Docker deployment guide for institutions with data residency requirements.