Skip to content
Developer docs

The credit API your engineers will actually want to integrate.

REST endpoint, synchronous response, predictable error schema. SDK in Node, Python, Ruby. Sandbox with synthetic population for full integration test before you touch production.

Three steps to your first decision

01

Install the SDK

Add the Lendforge client to your project via npm, pip, or gem. The SDK wraps authentication, request serialization, and response parsing. You call one method; it returns a typed decision object.

02

Authenticate with your sandbox key

Pass your sandbox key in the Authorization: Bearer header. Sandbox keys are issued immediately on access request. Production keys are issued after Lendforge confirms your integration is passing compliance output checks.

03

POST /v1/decisions

Submit an application payload with applicant_id, platform_id, and event_window. The synchronous response returns decision status, score, offer (amount and APR range when approved), and an ordered list of reason codes. The full round-trip runs under 200ms at P99.

curl https://api.lendforgeco.com/v1/decisions \
  -H "Authorization: Bearer sk_sand_..." \
  -H "Content-Type: application/json" \
  -d '{"applicant_id":"usr_4Xk29mN","platform_id":"plat_m3rkt","event_window":90}'

// 197ms response
{
  "decision":      "approved",
  "score":        74,
  "offer": {
    "amount":     8500,
    "apr_range":  "14.9-22.9%"
  },
  "reason_codes": ["PLATFORM_TENURE_POS","GMV_90D_POS"]
}

Endpoint reference

Method Endpoint Description
POST /v1/decisions Submit a credit application payload. Returns decision (approved, countered, declined), score, offer, and ECOA reason codes in a single synchronous response.
GET /v1/decisions/{id} Retrieve a prior decision by ID. Returns full payload including feature attributions, model version, and policy snapshot active at decision time.
POST /v1/events Stream platform events for model feature generation. Accepts transaction records, user lifecycle events, and product category data.
GET /v1/policy Retrieve the current active credit policy configuration: cutoff thresholds, product tier definitions, and eligibility constraints.
PUT /v1/policy Update credit policy rules. Changes are applied to new decisions immediately. Requires admin key. Prior decisions are not retroactively affected.
GET /v1/audit-log Pull the decision audit log. Supports date-range filtering and applicant ID lookup. Returns 25 months of retained decision history.

SDKs for your stack

Node.js

npm install @lendforge/node

View on GitHub

Python

pip install lendforge

View on GitHub

Ruby

gem install lendforge

View on GitHub

Test with a synthetic population before your first real application.

The Lendforge sandbox includes a pre-built cohort of 10,000 synthetic applicant profiles spanning a realistic credit spectrum: clean bureau files with thin platform history, strong platform history with credit blemishes, high-velocity short-tenure sellers, and long-tenure low-volume buyers. Run your integration end-to-end, trigger all three decision outcomes, validate adverse action reason codes, and confirm your policy rules behave as configured, before you request production access.