BetaYou're exploring an early version of tPay365. Features and content may change as we refine the experience.

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/affordability

Endpoints

POST
/api/v1/engine/affordability/simulateSoon

Simulate affordability for a proposed purchase

GET
/api/v1/engine/affordability/score/{user_id}Soon

Get current affordability score

GET
/api/v1/engine/affordability/history/{user_id}Soon

List previous affordability checks

Parameters

ParameterTypeRequiredDescription
user_idstringRequiredUser identifier
proposed_amountintegerRequiredProposed recurring amount in pence
frequencystringRequiredPayment frequency: WEEKLY, MONTHLY, QUARTERLY, ANNUAL
categorystringOptionalObligation 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."
}