Domains and subdomains
A tenant's console is at /{slug}/console on the platform's address. Two more addresses are optional.
Tenant subdomains
{slug}.{tenant domain}, e.g. acme.paylink.example.com.
- In Admin → Platform settings → Tenant subdomains, set the tenant domain (
paylink.example.com). - Point wildcard DNS (
*.paylink.example.com) at PayLink and serve a wildcard TLS certificate. - Switch each tenant on its page (Admin → Tenants → tenant → Console address → Subdomain). The path address keeps working.
A tenant's own domain
A tenant can use a name of its own, such as pay.acme.in, for its console, payment links and checkout (Console → Your domain, or PUT /api/tenant/domain). Payers then see the tenant's domain, and the Payments API returns checkout_urls on it.
- The tenant enters the domain. PayLink shows a TXT record: name
_paylink-challenge.pay.acme.in, valuepaylink-verify={token}. - The tenant adds it, and points the domain at PayLink with a CNAME to the platform's host.
- Verify. Nothing changes until the TXT record is found.
Your reverse proxy needs a certificate for each such domain. With Caddy, issue them on demand and let PayLink say which names are verified:
{
on_demand_tls {
ask http://paylink:8080/.well-known/paylink/domain
}
}
https:// {
tls { on_demand }
reverse_proxy paylink:8080
}
GET /.well-known/paylink/domain?domain=pay.acme.in answers 200 only for a verified domain.
Sign-in callbacks
For either address PayLink adds the new sign-in callback to the tenant's console app in LoginLink, when it holds a management credential for the organization. Otherwise it says what to add.