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

Legacy Data & OCR

Upload historical payslips and tax documents for OCR parsing. Extract structured data from PDFs and images to build a complete financial picture for new users.

/api/v1/legacy

Endpoints

POST
/api/v1/legacy/payslip/uploadSoon

Upload a payslip image or PDF for OCR

GET
/api/v1/legacy/payslip/{doc_id}Soon

Get OCR parsing results

GET
/api/v1/legacy/tax-history/{user_id}Soon

Get extracted tax history summary

Parameters

ParameterTypeRequiredDescription
filefileRequiredPayslip PDF or image (max 5 MB, jpg/png/pdf)
user_idstringRequiredUser identifier for history association
document_typestringOptionalType hint: payslip, p60, p45 (improves OCR accuracy)

Example

Request
http
POST /api/v1/legacy/payslip/upload HTTP/1.1
Host: api.tpay365.com
Authorization: Bearer sk_live_abc123
Content-Type: multipart/form-data

[PDF or image file]
Response
json
{
  "doc_id": "doc_xyz789",
  "status": "parsed",
  "extracted": {
    "employer_name": "Acme Corp",
    "pay_period": "January 2026",
    "gross_pay": 285000,
    "net_pay": 221340,
    "tax_deducted": 47160,
    "ni_deducted": 16500,
    "pension_deducted": 0
  },
  "confidence": 0.94,
  "parsed_at": "2026-02-10T14:30:00Z"
}