Affordability Pilot
Simulate whether a user can afford a purchase based on their current obligations, income, and financial health. Returns an affordability score with confidence interval.
/api/v1/engine/affordabilityEndpoints
POST
/api/v1/engine/affordability/simulateSoonSimulate affordability for a proposed purchase
GET
/api/v1/engine/affordability/score/{user_id}SoonGet current affordability score
GET
/api/v1/engine/affordability/history/{user_id}SoonList previous affordability checks
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Required | User identifier |
| proposed_amount | integer | Required | Proposed recurring amount in pence |
| frequency | string | Required | Payment frequency: WEEKLY, MONTHLY, QUARTERLY, ANNUAL |
| category | string | Optional | Obligation category for priority classification |
Example
Request
http
POST /api/v1/engine/affordability/simulate HTTP/1.1
Host: api.tpay365.com
Authorization: Bearer sk_live_abc123
Content-Type: application/json
{
"user_id": "usr_8821-9920",
"proposed_amount": 29999,
"frequency": "MONTHLY",
"category": "ENTERTAINMENT"
}Response
json
{
"affordable": true,
"score": 78,
"confidence": 0.92,
"impact": {
"safe_to_spend_before": 170450,
"safe_to_spend_after": 140451,
"reduction_percentage": 17.6
},
"recommendation": "Within budget. Safe-to-spend remains above minimum threshold."
}