---
page_title: Vendor Sub-Account Management
product: JUSPAY Unified Dashboard
page_source: https://juspay.io/in/docs/dashboard/docs/oauth-20-flow-for-dashboard-apis/vendor-subaccount-management
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fdashboard%2Fdocs%2Foauth-20-flow-for-dashboard-apis%2Fvendor-subaccount-management
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/dashboard/llms.txt
---

## API Version: default


# **Vendor Sub-Account Management via Oauth 2.0** 



Use this API to make a server-to-server call to onboard vendors for split settlement for a particular gateway configured on your account.

**Steps to Integrate:** 

1. Juspay will create and share an access token 

2. Merchant to pass this access token for authorization (as explained below)

3. The shared token can only be used to call this particular endpoint and would not work with any other endpoint, until explicitly whitelisted## Endpoints:
- Sandbox: https://sandbox.portal.juspay.in/ec/oauth/v2/merchantGatewayAccountSubInfo/vendors

- Production: https://portal.juspay.in/ec/oauth/v2/merchantGatewayAccountSubInfo/vendors

## Request Type: 
POST

## Content-Type: 
application/json

## Headers:

#### Authorization:
**Pass the token as a Bearer Token** 
- Value:  example: Bearer <token>
- Tags: String, Mandatory

#### Content-Type:
application/json
- Tags: String
## Sample Code Snippets:
### Sample Request:

#### Request Code Snippet:

```request
curl --location 'https://sandbox.portal.juspay.in/ec/oauth/v2/merchantGatewayAccountSubInfo/vendors'\
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
    "gatewayId": 23,
    "gatewayRefId": "test_23",
    "vendors": [
        {
            "juspaySubAccountId": "my_id_1",
            "gatewaySubAccountId": "gateway_id_1"
        },
        {
            "juspaySubAccountId": "my_id_2",
            "gatewaySubAccountId": "gateway_id_2"
        }
    ]
}'
```

### Sample Response:

#### Response:
```plaintext
"Success"
```

## Body Parameters:
### Basic Parameters:

#### gatewayId:
- Description: The unique identifier for the payment gateway.

Gateway ID mapping can be found [here](https://juspay.io/in/docs/resources/docs/dynamic-routing/dynamic-routing#Enforce-Gateway-Routing)
- Tags: Integer, Required

#### gatewayRefId:
- Description: The reference ID of the gateway assigned to the merchant account.
- Value: test_23
- Tags: String

#### vendors:
- Description: An array of vendor sub-account mappings.
- Value:
  - **JuspaySubAccountId**:
    - Description: The Juspay sub-account identifier for the vendor.
    - Tags: String, Required
  - **GatewaySubAccountId**:
    - Description: The corresponding sub-account identifier in the payment gateway system.
    - Tags: String, Required
- Tags: Array of Objects, Required
## API Responses:
### 200:

#### Response:
- Description: Success
- Tags: String
### 400:

#### status:
- Description: Bad Request
- Tags: string

#### error_code:
- Description: Details of keys missing
- Value: <p>Example:- <br> Mandatory fields are missing </p>
- Tags: string

#### error_message:
- Description: Further Details of keys missing
- Tags: string


---

## See Also

- [Monitoring Boards](https://juspay.io/in/docs/dashboard/docs/analytics/monitoring-boards)
- [Slack Notifications](https://juspay.io/in/docs/dashboard/docs/notifications/slack-notifications)
