Add configurable Terms & Conditions at financial product level
5 days ago by ReadMe API
Changes
This update introduces the ability to configure Terms & Conditions (T&Cs) documents at the financial product level, allowing different T&Cs per product within a single tenant.
Updated endpoints
GET /onboarding/{onboarding_id}/terms-and-conditions?lang={locale}: The endpoint now first checks if any linked financial product has T&Cs documents configured. It uses a matching and fallback logic (matching language and country, then country only, then language only, then default) to return the appropriate T&C document URL. If no financial product level T&Cs are found, it falls back to the existing tenant-level T&Cs.
Other Changes
- Added
tcs_documentsproperty (array of T&C document objects) to theFinancialProductconfiguration JSON schema. - Defined new
FinancialProductTcsDocumentobject schema with fields:document_url(string, required)language(string, nullable)country(string, nullable, enum of country codes)is_default(boolean, default false)
No database migration is required as tcs_documents is added as an optional field within an existing JSONB configuration column.
