UQPAY uses a master account and subaccounts model. Your master account holds the API credentials, and all subaccounts under it share those same credentials. This page explains how to list connected subaccounts and make API requests on their behalf.Documentation Index
Fetch the complete documentation index at: https://uqpay-ecc4f4d8.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Account architecture
| Account type | Role |
|---|---|
| Master account | Top-level account that holds API credentials and webhook configuration |
| Subaccount | An individual or company entity (merchant, customer, or subsidiary) operating under the master account |
List connected accounts
Call the List Connected Accounts API to retrieve all subaccounts linked to your master account.account_id field — you’ll use this value when making requests on behalf of that subaccount.
Acting on behalf of a subaccount
To scope an API request to a specific subaccount, include thex-on-behalf-of header set to the subaccount’s account_id.
If you omit
x-on-behalf-of, the request is treated as initiated by the master account by default.x-on-behalf-of header ensures that operations are scoped to the correct account.
When NOT to send x-on-behalf-of
The header is intended for endpoints that operate on subaccount-scoped resources. Do not include it on master-account-level operations — for example, listing connected accounts or minting an access token. If a request does not target a subaccount-scoped resource, omit x-on-behalf-of.
Error handling
If thex-on-behalf-of value is invalid or the subaccount is deactivated, the API returns:
account_id is correct and that the target subaccount is active.

