You can create sub-accounts using two methods:
Via your dashboard: Best if you manually onboard each merchant.
Via API: Best if you want to automate your merchant onboarding.
How to create sub-accounts via dashboard
Go to the | |
If you select a Managed account, there are two different options to invite your merchants to sign up:
|
Creating sub-accounts via API
You can create sub-accounts via API and define its type in the request body. It is mandatory to provide the following parameters:
business_name
: To identify your sub-account. The business name you set will be the name shown to customers paying to your merchants using payment links.business_email
: The email address associated with the sub-account.You may reuse email addresses for Owned sub-accounts
Xendit sends an invitation email only for Managed sub-accounts. Owned sub-accounts still require email addresses but will not receive any emails upon creation.
curl --request POST \ --url https://api.xendit.co/v2/accounts \ --data '{"account_email":"user@example.com","type":"OWNED","public_profile":{"business_name":"Merchant1"}}'
Once your accounts have been created, you’ll be able to view them on the xenPlatform Accounts page.
Custom sub-account configurations
When creating your account via API, you can set different configurations below instead of choosing a type
.
Configuration | Description |
---|---|
has_dashboard | Determines whether dashboard access will be enabled. An invitation will be sent to the sub-account's email address to sign up and login. |
payment_settings_follow_platform | Determines whether the sub-account will use the Master account’s activated payment methods. If "true", the Xendit invoice and webhooks will be sent to the Platform, and the name of the business shown to the public will be the Platform's. |
has_withdrawal | Determines whether withdrawals will be enabled for the sub-account. This will require the account to complete activation upon login. |
Below are possible configurations depending on your needs:
Desired setup | Use case | Configurations |
---|---|---|
Owned sub-account + Withdrawal | Your merchants can start accepting payments right away. Business verification must be completed before your merchant can withdraw funds. |
|
Owned sub-account + Dashboard access invitation | Your merchants can start accepting payments right away. An invitation is sent to the business email to log in. |
|
Owned sub-account | This configuration is equal to the default Owned sub-account. |
|
Managed sub-account | This configuration is equal to the default Managed sub-account. |
|
Webhook configurations
Events in your sub-account are sent to different webhook URLs based on the sub-account’s type.
Owned: Sent to the master account’s webhook configurations. However, note that the webhook settings are only synchronized during the account creation. Any changes to the master account’s webhook configurations after a sub-account is created will not automatically apply to the Owned sub-accounts. Please contact us when you are updating webhook configurations so that we can synchronize the configurations for you.
Managed: Sent to the sub-account’s webhook configurations, which can be set in the sub-account’s dashboard or using the Set Webhook URL API.
Testing
Sub-accounts can be created while your master account is still in Test Mode. Test sub-accounts allow you to create mock transactions using your test API key and see the transactions appear on your dashboard in Test Mode. You can delete sub-accounts on your dashboard only in Test mode.