Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 1 addition & 26 deletions data/providers/hub2.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,5 @@
],
"website": "https://www.hub2.io",
"summary": "Payment infrastructure provider offering an API to collect and disburse funds through mobile money and other local methods.",
"sources": {
"umoa-ep-register-2026-08": {
"url": "https://www.bceao.int/sites/default/files/2026-10/LISTE_DES_ETABLISSEMENTS_DE_PAIEMENT_AGR%C3%89%C3%89S_DANS_L-UMOA_au_31_ao%C3%BBt_2026.pdf",
"kind": "regulator_register",
"observed_at": "2026-10-20",
"note": "UMOA list of licensed payment institutions, as of 2026-08-31."
},
"umoa-register-2026-06": {
"url": "https://www.cb-umoa.org/sites/default/files/Liste%20%20des%20EME%20ET%20EP%20de%20l%27UMOA%202026.pdf",
"kind": "regulator_register",
"observed_at": "2026-10-20",
"note": "UMOA list of e-money and payment institutions, as of 2026-06-29."
}
},
"not_found_in": [
{
"regulator": "bceao",
"checked_at": "2026-10-20",
"source": "umoa-ep-register-2026-08"
},
{
"regulator": "bceao",
"checked_at": "2026-10-20",
"source": "umoa-register-2026-06"
}
]
"sources": {}
}
2 changes: 2 additions & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ A provider belongs to one or more families:
- **integration**: public docs, test mode, webhook signature, official SDKs,
public pricing, status page.
- **onboarding**: individuals allowed, documents, delay, deposit.
- **operations**: amount limits per payment, recurring payments, e-commerce plugins, what a payout needs, activities
the terms refuse.
- **incidents**: dated and sourced outages, breaches, sanctions.

## Glossary
Expand Down
13 changes: 10 additions & 3 deletions src/components/provider/ProviderPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import SourceRef from '../SourceRef.astro';
import type { Locale } from '../../i18n/locales';
import { dataText, localePath, providerStrings } from '../../i18n/translate';
import type { Provider } from '../../schema/provider';
import { integrationFacts, onboardingFacts } from '../../lib/site-facts';
import { integrationFacts, onboardingFacts, operationsFacts } from '../../lib/site-facts';
import { flagUrl, formatDate, initial } from '../../lib/site-format';
import { disputedCountries, settlementFacts } from '../../lib/site-settlements';
import { sectionSourceKeys } from '../../lib/site-sources';
Expand Down Expand Up @@ -55,18 +55,20 @@ const regulators = ownRegulators(provider);
const hq = provider.headquarters;
const transparency = integrationFacts(provider, strings);
const onboarding = onboardingFacts(provider, strings);
const operations = operationsFacts(provider, strings);
const settlements = settlementFacts(provider, strings);
const disputes = disputedCountries(provider, strings).map((place) => (place === '' ? strings.settlements.noCountry : place));
const empty = {
coverage: provider.coverage.length + provider.capabilities.length === 0,
fees: provider.fees.length === 0,
settlements: settlements.length === 0,
onboarding: onboarding.every((fact) => fact.value === null),
operations: operations.every((fact) => fact.value === null),
integration: transparency.every((fact) => fact.value === null),
licences: provider.licences.length + provider.not_found_in.length === 0,
};
const sourceKeys = sectionSourceKeys(provider, onboarding, transparency);
const sections = (['coverage', 'fees', 'settlements', 'onboarding', 'integration', 'licences'] as const).map((id) => ({ id, title: strings.sections[id] }));
const sourceKeys = sectionSourceKeys(provider, onboarding, operations, transparency);
const sections = (['coverage', 'fees', 'settlements', 'onboarding', 'operations', 'integration', 'licences'] as const).map((id) => ({ id, title: strings.sections[id] }));
---

<Layout title={strings.title(provider.name)} structuredData={structuredData} description={providerDescription(locale, provider)}>
Expand Down Expand Up @@ -138,6 +140,11 @@ const sections = (['coverage', 'fees', 'settlements', 'onboarding', 'integration
{empty.onboarding ? <EmptySection locale={locale} providerName={provider.name} section={strings.sections.onboarding} /> : <FactList locale={locale} facts={onboarding} />}
<SourceRecap locale={locale} provider={provider} keys={sourceKeys.onboarding} />
</section>
<section id="operations" class="card">
<h2>{strings.sections.operations}</h2>
{empty.operations ? <EmptySection locale={locale} providerName={provider.name} section={strings.sections.operations} /> : <FactList locale={locale} facts={operations} />}
<SourceRecap locale={locale} provider={provider} keys={sourceKeys.operations} />
</section>
<section id="integration" class="card">
<h2>{strings.sections.integration}</h2>
{
Expand Down
8 changes: 7 additions & 1 deletion src/i18n/provider-en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const PROVIDER_EN: ProviderStrings = {
breadcrumbLabel: 'Breadcrumb',
providers: 'Providers',
sectionsLabel: 'Sections',
sections: { coverage: 'Coverage', fees: 'Fees', settlements: 'Settlement', integration: 'Integration', onboarding: 'Opening an account', licences: 'Licences' },
sections: { coverage: 'Coverage', fees: 'Fees', settlements: 'Settlement', integration: 'Integration', onboarding: 'Opening an account', operations: 'Operations', licences: 'Licences' },
integrationIntro: 'The six points of the transparency index: what the provider publishes and anyone can check.',
basedIn: (country) => `Based in ${country}`,
checkedOn: (date) => `Checked against its sources on ${date}`,
Expand All @@ -20,6 +20,7 @@ export const PROVIDER_EN: ProviderStrings = {
no: 'No',
none: 'None',
days: (min, max) => (min === max ? `${min} days` : `${min} to ${max} days`),
inCountry: (country, value) => `${country}: ${value}`,
facts: {
publicDocs: 'Public documentation',
testMode: 'Sandbox (test mode)',
Expand All @@ -32,6 +33,11 @@ export const PROVIDER_EN: ProviderStrings = {
documents: 'Documents asked',
timeToOpen: 'Time to open an account',
securityDeposit: 'Security deposit',
limits: 'Amount per payment',
recurring: 'Recurring payments',
plugins: 'E-commerce plugins',
payoutRequirements: 'Before sending money',
prohibited: 'Activities refused',
},
coverage: {
country: 'Country',
Expand Down
8 changes: 7 additions & 1 deletion src/i18n/provider-fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const PROVIDER_FR: ProviderStrings = {
breadcrumbLabel: 'Fil d’Ariane',
providers: 'Services',
sectionsLabel: 'Sections',
sections: { coverage: 'Couverture', fees: 'Frais', settlements: 'Reversement', integration: 'Intégration', onboarding: 'Ouverture de compte', licences: 'Licences' },
sections: { coverage: 'Couverture', fees: 'Frais', settlements: 'Reversement', integration: 'Intégration', onboarding: 'Ouverture de compte', operations: 'Fonctionnement', licences: 'Licences' },
integrationIntro: 'Les six points de l’indice de transparence : ce que le service publie et que chacun peut vérifier.',
basedIn: (country) => `Siège : ${country}`,
checkedOn: (date) => `Vérifié auprès de ses sources le ${date}`,
Expand All @@ -20,6 +20,7 @@ export const PROVIDER_FR: ProviderStrings = {
no: 'Non',
none: 'Aucun',
days: (min, max) => (min === max ? `${min} ${min > 1 ? 'jours' : 'jour'}` : `${min} à ${max} jours`),
inCountry: (country, value) => `${country} : ${value}`,
facts: {
publicDocs: 'Documentation publique',
testMode: 'Sandbox (mode test)',
Expand All @@ -32,6 +33,11 @@ export const PROVIDER_FR: ProviderStrings = {
documents: 'Documents demandés',
timeToOpen: 'Délai d’ouverture du compte',
securityDeposit: 'Dépôt de garantie',
limits: 'Montant par paiement',
recurring: 'Paiements récurrents',
plugins: 'Plugins e-commerce',
payoutRequirements: 'Avant d’envoyer de l’argent',
prohibited: 'Activités refusées',
},
coverage: {
country: 'Pays',
Expand Down
10 changes: 9 additions & 1 deletion src/i18n/provider-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export interface ProviderStrings {
readonly no: string;
readonly none: string;
readonly days: (min: number, max: number) => string;
/** A value that holds in one country only: `Ghana: up to 5,000 GHS`. */
readonly inCountry: (country: string, value: string) => string;
readonly facts: FactStrings;
readonly coverage: CoverageStrings;
/** The fold that hides a section's sources: `Sources (3)`. */
Expand All @@ -52,10 +54,11 @@ export interface SectionStrings {
readonly settlements: string;
readonly integration: string;
readonly onboarding: string;
readonly operations: string;
readonly licences: string;
}

/** Labels of the lines of the integration and onboarding sections. */
/** Labels of the lines of the integration, onboarding and operations sections. */
export interface FactStrings {
readonly publicDocs: string;
readonly testMode: string;
Expand All @@ -68,6 +71,11 @@ export interface FactStrings {
readonly documents: string;
readonly timeToOpen: string;
readonly securityDeposit: string;
readonly limits: string;
readonly recurring: string;
readonly plugins: string;
readonly payoutRequirements: string;
readonly prohibited: string;
}

export interface CoverageStrings {
Expand Down
11 changes: 11 additions & 0 deletions src/lib/check-references.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function checkReferences(provider: Provider, ctx: ReferenceContext): void
checkAbsenceReferences(provider, ctx);
checkFeeReferences(provider, ctx);
checkSettlementReferences(provider, ctx);
checkOperationsReferences(provider, ctx);
checkIncidentReferences(provider, ctx);
}

Expand Down Expand Up @@ -69,6 +70,16 @@ function checkSettlementReferences(provider: Provider, ctx: ReferenceContext): v
provider.settlements.forEach((delay, i) => requireCountry(ctx, delay.country, `settlements.${i}.country`));
}

function checkOperationsReferences(provider: Provider, ctx: ReferenceContext): void {
provider.operations.transaction_limits?.value.forEach((limit, i) => {
const path = `operations.transaction_limits.value.${i}`;

requireCountry(ctx, limit.country, `${path}.country`);
requireCurrency(ctx, limit.minimum?.currency, `${path}.minimum.currency`);
requireCurrency(ctx, limit.maximum?.currency, `${path}.maximum.currency`);
});
}

function checkIncidentReferences(provider: Provider, ctx: ReferenceContext): void {
provider.incidents.forEach((incident, i) => {
incident.countries.forEach((code, j) => requireCountry(ctx, code, `incidents.${i}.countries.${j}`));
Expand Down
8 changes: 6 additions & 2 deletions src/lib/data-texts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Provider } from '../schema/provider';

/** Free text of a provider that its sheet shows as is: summary, coverage notes, fee plans and notes, settlement notes, fact notes, onboarding documents. */
/** Free text of a provider that its sheet shows as is: summary, coverage notes, fee plans and notes, settlement notes, fact notes, onboarding documents, payout requirements and refused activities. */
export function displayedTexts(provider: Provider): string[] {
const texts: string[] = [];

Expand All @@ -19,18 +19,22 @@ export function displayedTexts(provider: Provider): string[] {
pushDefined(texts, delay.note);
}

const { integration, onboarding } = provider;
const { integration, onboarding, operations } = provider;
const facts = [
integration.public_docs, integration.sandbox, integration.webhook_signature, integration.official_sdks,
integration.public_pricing, integration.status_page,
onboarding.signup, onboarding.individuals_allowed, onboarding.documents, onboarding.days, onboarding.security_deposit,
operations.transaction_limits, operations.recurring_payments, operations.ecommerce_plugins,
operations.payout_requirements, operations.prohibited_activities,
];

for (const fact of facts) {
pushDefined(texts, fact?.note);
}

texts.push(...(onboarding.documents?.value ?? []));
texts.push(...(operations.payout_requirements?.value ?? []));
texts.push(...(operations.prohibited_activities?.value ?? []));

return [...new Set(texts)];
}
Expand Down
37 changes: 37 additions & 0 deletions src/lib/site-facts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import type { ProviderStrings } from '../i18n/provider-types';
import { countryName } from '../i18n/country-names';
import { dataText } from '../i18n/translate';
import type { Provider } from '../schema/provider';
import type { TransactionLimit } from '../schema/amount-types';
import { formatMoney } from './site-format';
import { transparency } from './transparency';
import type { PointLevel } from './transparency-types';
import { sourceLabel } from './site-sources';
Expand Down Expand Up @@ -53,6 +56,40 @@ export function onboardingFacts(provider: Provider, strings: ProviderStrings): F
];
}

export function operationsFacts(provider: Provider, strings: ProviderStrings): Fact[] {
const { operations } = provider;
const { facts } = strings;
const texts = (values: string[]): string => values.map((text) => dataText(strings.locale, text)).join(', ');

return [
fact(facts.limits, operations.transaction_limits, (limits) => limits.map((limit) => limitLine(limit, strings)).join(' · '), strings),
fact(facts.recurring, operations.recurring_payments, (value) => yesNo(value, strings), strings, operations.recurring_payments?.value === true ? 'good' : 'bad'),
fact(facts.plugins, operations.ecommerce_plugins, (value) => (value.length === 0 ? strings.none : value.join(', ')), strings, operations.ecommerce_plugins?.value.length === 0 ? 'bad' : undefined),
fact(facts.payoutRequirements, operations.payout_requirements, texts, strings),
fact(facts.prohibited, operations.prohibited_activities, texts, strings),
];
}

/** `200 XOF to 9,999,999 XOF`, prefixed with the country when the limit holds in one country only. */
function limitLine(limit: TransactionLimit, strings: ProviderStrings): string {
const amounts = limitAmounts(limit, strings);

return limit.country === undefined ? amounts : strings.inCountry(countryName(strings.locale, limit.country), amounts);
}

/** Smallest and largest amount as one phrase; the schema guarantees at least one bound. */
function limitAmounts({ minimum, maximum }: TransactionLimit, { locale, fees }: ProviderStrings): string {
if (maximum === undefined) {
return minimum === undefined ? '' : fees.from(formatMoney(minimum, locale));
}

if (minimum === undefined) {
return fees.upTo(formatMoney(maximum, locale));
}

return fees.range(formatMoney(minimum, locale), formatMoney(maximum, locale));
}

/** `pill` shows the value as a pill of that tone; without it the value is plain text. */
function fact<T>(label: string, sourced: Sourced<T> | undefined, show: (value: T) => string, strings: ProviderStrings, pill?: Pill): Fact {
if (sourced === undefined) {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/site-sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import type { Fact, RecapLink, SectionSources, SourceGroup } from './site-types'
const MAX_SEGMENTS = 2;

/** Source keys of each section of a sheet, in the order the section uses them. */
export function sectionSourceKeys(provider: Provider, onboarding: Fact[], integration: Fact[]): SectionSources {
export function sectionSourceKeys(provider: Provider, onboarding: Fact[], operations: Fact[], integration: Fact[]): SectionSources {
return {
coverage: [...provider.coverage.map((entry) => entry.source), ...provider.capabilities.map((capability) => capability.source)],
fees: provider.fees.map((fee) => fee.source),
settlements: provider.settlements.map((delay) => delay.source),
onboarding: factSources(onboarding),
operations: factSources(operations),
integration: factSources(integration),
licences: [...provider.licences.map((licence) => licence.source), ...provider.not_found_in.map((absence) => absence.source)],
};
Expand Down
2 changes: 1 addition & 1 deletion src/lib/site-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export interface RecapLink {
}

/** Source keys of each section of a sheet. */
export type SectionSources = Record<'coverage' | 'fees' | 'settlements' | 'onboarding' | 'integration' | 'licences', string[]>;
export type SectionSources = Record<'coverage' | 'fees' | 'settlements' | 'onboarding' | 'operations' | 'integration' | 'licences', string[]>;

/** A piece of a data note: plain text, or a link written as a short label. */
export type NotePart = { kind: 'text'; text: string } | { kind: 'link'; url: string; label: string };
11 changes: 11 additions & 0 deletions src/schema/amount-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ export interface AmountBand {
to?: Money | undefined;
}

/** Smallest and largest amount of one payment. */
export interface AmountLimits {
minimum?: Money | undefined;
maximum?: Money | undefined;
}

/** Payment limits, for every country or for the one named. */
export interface TransactionLimit extends AmountLimits {
country?: string | undefined;
}

/** A rule violation, located relative to the object the rule checked. */
export interface RuleProblem {
path: string[];
Expand Down
37 changes: 32 additions & 5 deletions src/schema/provider-parts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
WEBHOOK_SIGNATURES,
} from './constants';
import { countryCodeSchema as countryCode, currencyCodeSchema as currencyCode, isoDateSchema, slugSchema, webUrlSchema } from './primitives';
import { addRuleProblems, bandProblems, feeAmountProblems } from './rules';
import { addRuleProblems, bandProblems, feeAmountProblems, limitListProblems, limitProblems } from './rules';
import { sourceKeySchema } from './source';
import { sourcedFact } from './sourced-fact';

Expand Down Expand Up @@ -128,16 +128,43 @@ export const integrationSchema = z.strictObject({
docs_url: webUrlSchema.optional(),
});

/** A delay in days, from the shortest to the longest the source gives. */
export const dayRangeSchema = z
.strictObject({ min: z.number().int().nonnegative(), max: z.number().int().nonnegative() })
.refine((days) => days.min <= days.max, { message: '`min` must not exceed `max`', path: ['max'] });

export const onboardingSchema = z.strictObject({
signup: sourcedFact(z.enum(SIGNUP_ROUTES)).optional(),
individuals_allowed: sourcedFact(z.boolean()).optional(),
documents: sourcedFact(z.array(z.string().min(1))).optional(),
days: sourcedFact(
days: sourcedFact(dayRangeSchema).optional(),
security_deposit: sourcedFact(z.boolean()).optional(),
});

/** Smallest and largest amount of one payment, for one country when the source narrows it. */
export const transactionLimitSchema = z
.strictObject({
country: countryCode.optional(),
minimum: moneySchema.optional(),
maximum: moneySchema.optional(),
})
.superRefine((limit, ctx) => addRuleProblems(limitProblems(limit), ctx));

/** How an account works once open: limits, payout requirements, what it may sell. */
export const operationsSchema = z.strictObject({
transaction_limits: sourcedFact(
z
.strictObject({ min: z.number().int().nonnegative(), max: z.number().int().nonnegative() })
.refine((days) => days.min <= days.max, { message: 'Onboarding `min` must not exceed `max`', path: ['max'] }),
.array(transactionLimitSchema)
.min(1)
.superRefine((limits, ctx) => addRuleProblems(limitListProblems(limits), ctx)),
).optional(),
security_deposit: sourcedFact(z.boolean()).optional(),
recurring_payments: sourcedFact(z.boolean()).optional(),
/** E-commerce plugins the provider publishes. An empty list means none. */
ecommerce_plugins: sourcedFact(z.array(z.string().min(1))).optional(),
/** What a merchant must set up before sending money, such as an allowlisted server address. */
payout_requirements: sourcedFact(z.array(z.string().min(1)).min(1)).optional(),
/** Activities the terms refuse, in the provider's own words. */
prohibited_activities: sourcedFact(z.array(z.string().min(1)).min(1)).optional(),
});

export const incidentSchema = z.strictObject({
Expand Down
2 changes: 2 additions & 0 deletions src/schema/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
integrationSchema,
licenceSchema,
onboardingSchema,
operationsSchema,
registerAbsenceSchema,
settlementSchema,
} from './provider-parts';
Expand Down Expand Up @@ -48,6 +49,7 @@ export const providerSchema = z
settlements: z.array(settlementSchema).default([]),
integration: integrationSchema.default({}),
onboarding: onboardingSchema.default({}),
operations: operationsSchema.default({}),
incidents: z.array(incidentSchema).default([]),
})
.refine((provider) => provider.status === 'draft' || provider.verified_at !== undefined, {
Expand Down
Loading
Loading