White-labelling a checkout from config · Sep 2025 – Jan 2026
Restyling a checkout from configuration, not code
A wallet partner’s customers paid through our hosted payment page, and the partner wanted it to feel like their own product: their colours, their corners, their logo. We could have built them a special version. Instead, the page reads a theme for that partner’s profile and restyles itself, and every change we needed became a setting rather than a branch.
- Role
- Frontend engineer
- When
- Sep 2025 – Jan 2026
- Where
- PayGlocal
- Stack
- ReactRedux ToolkitTypeScriptTailwindDesign tokens
The situation
Our hosted payment page served many merchants with one look and a little colour. This partner needed far more: a different page background, rounder corners on specific elements, a logo of a different size loaded from their side, and a header showing both brands. Every request was reasonable, and each one was easy to hard-code. The risk was ending up with a page full of “if this partner, then…” checks that nobody could safely change later.
What I built
- A theme for the partner’s merchant profile, delivered with the payment session, that the page reads at start-up.
- Theme settings for corner radius per element and for the page background (the “window background”), mapped to CSS variables, with a default in the base theme so every other merchant looks exactly as before.
- A remote logo, loaded from the partner’s session data, and a logo height that’s a setting rather than a special case.
- A co-branded header, plus app shell and footer adjustments for the partner’s flow.
- A small typography style the design needed, added to the shared component library so both checkout apps can use it.
- In a second pass, the partner’s brand colours, background and rounded buttons were folded into the page’s normal theme resolution, so they travel through the same mapping as every other theme instead of a separate path.
Secured by the payment platform
Decisions
From a partner flag to a setting
The logo first got a flag for this partner: shorter logo when it’s them. That works for one partner and fails for the next. It became a plain height setting with a sensible default, which any merchant can use.
Defaults live in the base theme
The new background setting first had its fallback scattered where it was used. Moving the default into the base theme means a merchant without the setting looks exactly as before, and there’s one place to change it.
One path for every theme
The second pass routed the partner’s look through the same theme-to-UI mapping every merchant uses. No partner-specific rendering code, so a fix to theming fixes it for them too.
Shared pieces in the shared library
The theme helpers and the new typography style went into the library both checkout apps install, so the next co-branded checkout starts with them already there.
Outcome
| What | Before | After | Detail |
|---|---|---|---|
| Partner-specific rendering code | none | theme-driven | |
| New theme settings | radius, background, logo height | reusable by any merchant | |
| Other merchants’ pages | unchanged | defaults in the base theme | |