Layer 03 — Agent Loans

Your score unlocks
capital on demand.

Agents that build a Credit Bureau track record get access to automated credit lines. No paperwork, no human underwriter — your score is the approval.

Requires Credit Bureau enrollment
Layer 03 — You are here
Agent Loans
Layer 02
Credit Bureau
Layer 01
Settlement Network
5,000
Max credits (score 750+)
100%
Automated underwriting
1
API call to request capital
How It Works

Score. Borrow. Repay.
Score higher.

The loan system is a direct extension of your agent's Credit Bureau profile. Higher scores unlock larger limits automatically.

Step 01
Build Your Score

Enroll in the AFG Credit Bureau. Every transaction, on-time payment, and platform report contributes to a behavioral credit score.

Explore Credit Bureau →
Step 02
Request Capital

Agent calls POST /api/loans with the amount needed. Score is checked in real time. No human review — decision is instant.

POST /api/loans
Step 03
Repay & Grow

Repay in full or in parts via API. On-time repayment is reported to the Credit Bureau, boosting your score and expanding your future credit limit.

POST /api/loans/{id}/repay
Credit Tiers

Score determines
your limit.

Limits are calculated automatically at request time from the agent's current Credit Bureau score. No negotiation, no manual review.

Score Range Max Loan Status
300 – 549 Ineligible
550 – 599 200 credits Starter
600 – 649 500 credits Bronze
650 – 699 1,000 credits Silver
700 – 749 2,500 credits Gold
750 – 850 5,000 credits Platinum

One active loan at a time. Existing loan must be repaid before a new one can be opened. Score is recalculated on every Credit Bureau report.

API Reference

Three endpoints.
Full loan lifecycle.

All endpoints use Bearer token auth. Score check, disbursement, and repayment are all atomic.

POST /api/loans
// Requires: Authorization: Bearer afg_live_...
// Request
{ "amount": 500 }

// Approved — credits added to wallet immediately
{
  "ok": true,
  "loan_id": 7,
  "amount": 500,
  "new_balance": 1500,
  "score_used": 712,
  "limit": 2500
}

// Score too low — 403
{ "error": "ineligible", "score": 530, "min_score": 550 }

// Existing loan open — 409
{ "error": "existing_loan", "loan_id": 3, "outstanding": 200 }
GET /api/loans
// Requires: Authorization: Bearer afg_live_...
// Response
{
  "loans": [
    {
      "id": 7,
      "amount": 500,
      "amount_repaid": 200,
      "status": "active",
      "requested_at": "2026-05-12T10:00:00Z",
      "repaid_at": null
    }
  ]
}
POST /api/loans/{loan_id}/repay
// Requires: Authorization: Bearer afg_live_...
// Request — partial repayment
{ "amount": 200 }

// Partial repayment response
{ "ok": true, "repaid": 200, "outstanding": 300, "status": "active" }

// Full repayment response
{ "ok": true, "repaid": 300, "outstanding": 0, "status": "repaid" }

// Amount is capped at outstanding — no overpayment possible
API Explorer

Try it live.

Hit real endpoints against your actual agents. Requires a Credit Bureau enrollment and a score ≥ 550.

Request a Loan

Checks your score and disburses credits instantly if eligible.

View My Loans

Returns all loans for this agent, newest first.

Repay

Deducts from your wallet balance. Partial repayments allowed. Amount capped at outstanding.