Payezydevelopers
Sandbox

API reference / Customer keys and view-as

Start a view-as session

POST/v1/platforms/{orgId}/customers/{customerId}/view-as

Opens a view-as session as an active member of one of the platform's own customers, view-only by default. With scope "write" the session can also send payments and withdrawals, manage recipients and own bank accounts, and fill, document, and submit that customer's verification, all on the customer's behalf. Money movement needs the platform user's own two-factor step-up. Every action is recorded on both the customer's and the platform's trail with the platform user as actor. The customer's team, approvals and settings stay with the customer. The verification application is only available inside a session for that linked customer. Needs platform:view_as on an active platform. The returned URL opens the customer app in a new tab; the token rides in the URL fragment.

When to use it

A person on your team needs to see or act in a customer's app, for support. Not available to API keys.

Before you call it

  • Organizationplatform (active)
  • Permissionplatform:view_as
  • NoteSigned-in session; write scope needs AAL2.

Parameters

ParameterWhat it does
orgIdpath, uuidrequiredThe organization the call acts on. For platform calls, your platform's id; for customer calls, the customer's organization id. Get them from getMe or the customer list.
customerIdpath, uuidrequiredA customer organization linked to your platform.

Request body

FieldWhat it does
user_idstring (uuid)requiredThe customer member to view as
reasonstringrequiredNo description in the spec yet.
scopeenumwrite also lets the platform user act on the customer's behalf (payments, withdrawals, recipients, own accounts, and the verification application: fill it, upload documents, and send it for review). The customer's team, approvals and settings stay with the customer.

One of read write

Default "read"

Response 201

Session opened

FieldWhat it does
sessionPlatformViewAsSessionrequiredNo description in the spec yet.
session.idstring (uuid)requiredNo description in the spec yet.
session.scopeenumrequiredNo description in the spec yet.

One of read write

session.customer_idstring (uuid)requiredNo description in the spec yet.
session.customer_namestringrequiredNo description in the spec yet.
session.user_idstring (uuid)requiredNo description in the spec yet.
session.user_emailstringrequiredNo description in the spec yet.
session.user_namestringrequiredNo description in the spec yet.
session.platform_user_idstring (uuid)requiredNo description in the spec yet.
session.platform_user_emailstringrequiredNo description in the spec yet.
session.platform_user_namestringrequiredNo description in the spec yet.
session.reasonstringrequiredNo description in the spec yet.
session.statusenumrequiredNo description in the spec yet.

One of active ended expired

session.end_reasonstringrequiredNo description in the spec yet.
session.expires_atstring (date-time)requiredNo description in the spec yet.
session.created_atstring (date-time)requiredNo description in the spec yet.
session.ended_atstring (date-time)No description in the spec yet.
urlstringrequiredOpens the customer app in view-as mode

Errors to handle

CodeWhat it means and what to do
membership_disabled403your access to this organization has been disabled
not_found404The resource does not exist, or you are not allowed to know it exists - another organization, another platform's customer, or a production-only route in the sandbox.

Check the ids came from your own getMe / list calls. Payezy returns the same response for "missing" and "not yours" on purpose.

Every error is a Problem document. Branch on code; quote request_id to support.