Platform tenancy
A platform never becomes a member of its customers. It reaches each one through a link, and only for a fixed set of actions.
The link
When a customer joins your platform, by your invitation, your enrollment link or your own create call, Payezy records a link between your platform and the customer's organization. Every platform call about a customer checks that an active link exists. Without one the answer is not_found, the same as for a stranger.
This has consequences you will design around:
- Platform A can never list, open, restrict or see the transactions of platform B's customers.
- Your platform's own key cannot call a customer's routes. Calling
/v1/orgs/{customerId}/accountswith it returnsnot_found. Mint a customer key instead. - Customers keep their own team, roles and approval policy. You cannot change them, even when acting as one of their members (
customer_action_required).
Three ways to add customers
| Way | Call | Who enters the details | Use it when |
|---|---|---|---|
| Create | POSTCreate a platform customer | You | You already collected KYC/KYB in your product |
| Invite | POSTInvite a customer | The customer | You want the customer to verify on their own |
| Enrollment link | /join/{slug} on your profile |
The customer | Open sign-up from your website |
Creating a customer opens the organization at once with the owner as a member. The KYC/KYB application stays a draft until you upload the documents and submit it. See create a customer and file KYB.
What you can do to a linked customer
| Action | Needs |
|---|---|
| See name, type, status, balances, members, accounts and recent payments | platform:view |
| List the customer's payments on your transactions list | platform:view |
| Create, invite, resend and revoke invitations | platform:customers_add, platform active |
| Fill, document and submit the customer's verification | platform:customers_add |
Restrict and reinstate, set external_ref |
platform:customers_manage, platform active |
| Mint, roll and revoke customer API keys | platform:customer_keys |
| Open a view-as session as a customer member | platform:view_as (people only, never keys) |
| Approve KYC/KYB, change limits, suspend or close | Never. Payezy staff only. |
| Capability | Owner | Admin | Operator | Viewer |
|---|---|---|---|---|
| See customers, balances, transactions and the teamplatform:view, members:view | Yes | Yes | Yes | Yes |
| Add customers: invite, or create with their detailsplatform:customers_add | Yes | Yes | Yes | No |
| Restrict or reinstate a customer, set its referenceplatform:customers_manage | Yes | Yes | No | No |
| Mint, roll and revoke customer API keysplatform:customer_keys | Yes | Yes | No | No |
| View as a customer memberplatform:view_as | Yes | Yes | No | No |
| Invite teammatesmembers:invite | Yes | Yes | No | No |
| Change a teammate's role, disable or remove themmembers:manage, roles:assign | Yes | No | No | No |
| Edit the platform profilesettings:manage | Yes | Yes | No | No |
| Transfer ownershiporg:transfer_ownership | Yes | No | No | No |
Who did what
Every action on a customer's organization records its source:
| Source | Meaning |
|---|---|
customer_app |
A member signed in to the app |
customer_api |
A key the customer created |
platform_api |
A key your platform minted; your platform id is on the record, and a copy goes to your activity log |
platform_view_as |
One of your people inside a view-as session |
The customer's activity feed names your platform; yours names the customer and the key.