This section describes how to create and onboard child merchants using the Create Child Merchant API as part of the Aggregator workflow.
HTTP Method: POST
Environment
Test Environment | https://uat-onepayuonboarding.payu.in |
Production Environment | https://onboarding.payu.in |
Base URL: create_child_merchant{{onboarding_base_url}}/api/v1/merchants
Request Parameters
Parameter | Description | Example |
---|---|---|
product mandatory | This parameter must be passed with the following value: "PayUBiz" | PayUBiz |
name mandatory | The display name of the child merchant | Harsh Agarwal |
email mandatory | The child merchant email. | [email protected] |
mobile mandatory | The mobile number of the child merchant | 995315***1 |
aggregator_parent_mid mandatory | The parent merchant MID is specified in this parameter. | 7210921 |
merchant_type mandatory | This parameter is used to specify the merchant type as aggregator. Note: The value for this parameter must be posted as aggregator. | aggregator |
business_entity_id mandatory | The business entity ID of the merchant. The business entity ID and corresponding business entity is listed in the Business Entity Mapping table of this section. | 2 |
pancard_number mandatory | The PAN card number of the child merchant. | DBZPK4951B |
pancard_name mandatory | The name of the child merchant as in the PAN card. | kapil kumar |
business_category_id mandatory | The business category ID of the merchant. | 16 |
business_sub_category_id mandatory | The business sub category ID of the merchant. | 128 |
gst_number optional | The GST number of the merchant registered with the Sales tax department. | 09ABQFA5416M1ZX |
monthly_expected_volume "mandatory | The monthly expected volume of the child merchant. | 60000 |
business_name mandatory | The business name of the merchant, similar to PAN. | Harsh Agarwal |
bank_detail mandatory | The details of bank account of the merchant is specified in the following JSON format. The details of the fields are described in the next table.{ "bank_account_number": "6633809947434", "holder_name”:”Harsh Agarwal”, "ifsc_code": "ICIC0000031" } |
Authorization:
This request is using Bearer Token from the collection. For more information, refer to Postman Collection. Merchant access token or client token with scope ‘refer_child_merchant’ from Hub.
The bank_detail parameter is in a JSON parameter, and the fields in this parameter are described in the following table:
Field | Description | Example |
---|---|---|
bank_account_number | The account number of the merchant is specified in this field. | 6633809947434 |
holder_name | The name of the merchant who holds the account is specified in this field. | Harsh Agarwal |
ifsc_code | The IFSC code of the bank branch where the merchant has the account. | ICIC0000031 |
Business Entity Mapping
The business entity ID (business_entity_id) and corresponding business entity mapping are:
Business Entity ID | Business Entity |
---|---|
1 | Association of Persons |
2 | Sole Proprietorship |
3 | Partnership |
4 | Private Limited |
5 | Public Limited |
6 | LLP |
7 | Trust |
8 | Society |
9 | Government |
10 | Hindu Undivided Family |
11 | Local Authority |
12 | Non Individual |
13 | Education |
14 | Individual |
15 | NGO |
16 | One Person Company |
17 | Artificial Juridical Person |
Sample request
Success Scenario
curl --location -g --request POST '{{onboarding_base_url}}/api/v1/merchants' \
--header 'Authorization: Bearer {{access_token}}
--data-raw '{
"merchant": {
"product": "PayUbiz",
"name": "child agg test",
"email": "[email protected]",
"mobile": "8447640850",
"aggregator_parent_mid": "8020009",
"merchant_type": "aggregator",
"pancard_number”:”Harsh “Agarwal,
"business_entity_id”:2,
"business_category_id": 37,
"business_sub_category_id": 313,
"gst_number": "09ABQFA5416M1ZX",
"monthly_expected_volume": 300000,
“business_name”:”Harsh Agarwal”
"bank_detail": {
"bank_account_number": "6633809947434",
"holder_name”:”Harsh Agarwal”,
"ifsc_code": "ICIC0000031"
}
}
}
Failure Scenario
- Token is invalid
curl --location -g --request POST '{{onboarding_base_url}}/api/v1/merchants' \
--header 'Authorization: Bearer {{access_token}}' \
--data-raw '{
"merchant": {
"product": "PayUbiz",
"email": "[email protected]",
"mobile": "8860890284",
"aggregator_parent_mid": "149726",
"merchant_type": "aggregator"
}
}'
- Token has expired
curl --location -g --request POST '{{onboarding_base_url}}/api/v1/merchants' \
--header 'Authorization: Bearer {{access_token}}' \
--data-raw '{
"merchant": {
"product": "PayUbiz", // Mandatory to pass
"email": "[email protected]", // child merchant email, mandatory
"mobile": "8860890284", // Child merchant user mobile, mandatory
"aggregator_parent_mid": "149726", // Parent merchant mid, mandatory
"merchant_type": "aggregator" // Mandatory field
}
}'
Sample Response
Success Scenario
Create Child Merchant Success Scenario
{
"merchant": {
"name": "Merchant",
"email": "[email protected]", // email
"registered_mobile": "8860890286",
"id": 13131,
"mid": 8006727, // MID of Child merchant
"test_mid": null,
"uuid": "11ec-29e1-9b1030da-a0b8-02053299b2da", // Child merchant uuid
"product": "PayUbiz",
"device": "Other",
"business_type": "LongTail",
"quality_score": null,
"display_name": "Merchant",
"account_id": null,
"business_entity_id": null,
"business_category_id": null,
"business_sub_category_id": null,
"business_name": null,
"pancard_name": null,
"pancard_number": null,
"website_url": null,
"android_url": null,
"ios_url": null,
"business_origin": "SMB-ENT",
"gst_number": null,
"integration_type": "Not Selected",
"routing_mid": null,
"average_delivery_time": null,
"downjones_check": null,
"aggregator_model": null,
"aggregator_type": null,
"monthly_expected_volume": null,
"sap_id": null,
"source_type": null,
"active": true,
"source_url": null,
"campaign_name": null,
"campaign_medium": null,
"campaign_source": null,
"campaign_term": null,
"partner_uuid": null,
"created_at": "2021-10-10T15:49:14.000Z",
"updated_at": "2021-10-10T15:49:14.000Z",
"admin_user_id": 10050,
"mobile": "8860890286",
"terms_and_condition_accepted_at": null,
"website_approval_status": null,
"sub_source": null,
"account_uuid": null,
"blocked": false,
"pan_verification_status": "Pending",
"website_remarks": null,
"settlement_status": null,
"source_details": null,
"merchant_vertical": null,
"notification_email": "[email protected]",
"bank_update_attempt_count": 0,
"partner_source": null,
"flag": 32,
"integration_status": "Not Integrated",
"merchant_type": "child_aggregator",
"gmv_amount": null,
"shop_number": null,
"area_code": null,
"bank_update_attempt_left": 11,
"business_entity_uuid": null,
"business_category_uuid": null,
"business_sub_category_uuid": null,
"first_name": "",
"last_name": "Merchant",
"is_service_agreement_accepted": false,
"is_service_agreement_esigned": false,
"is_authorisation_letter_required": true,
"acl_role_name": null,
"dashboard_preference": "one_dashboard",
"next_bank_update_time": "2021-10-10T21:19:14.916+05:30",
"business_pan_name_match": false,
"admin_user_uuid": "11ec-29e1-b00fb80c-9f40-02f413145cce",
"contact_details": [],
"migration_status": 0,
"saved_kyc_address": null,
"document_status": "Pending",
"kyc_status": {
"kyc_status": "LOCKED"
},
"service_intent": "default",
"revamp_merchant": true,
"is_cs_eligible": true,
"bank_detail": null,
"operating_address": null,
"registration_address": null,
"business_entity": null,
"merchant_statuses": [
{
"id": 28277,
"record_type": "Merchant",
"record_id": 13131,
"status_type": "WEBSITE",
"status_value": null,
"uuid": "11ec-29e1-9e9a998e-a0b8-02053299b2da",
"created_at": "2021-10-10T15:49:14.000Z",
"updated_at": "2021-10-10T15:49:14.000Z"
},
{
"id": 28278,
"record_type": "Merchant",
"record_id": 13131,
"status_type": "KYC_DOCUMENTS",
"status_value": "Pending",
"uuid": "11ec-29e1-9ea4fc94-a0b8-02053299b2da",
"created_at": "2021-10-10T15:49:14.000Z",
"updated_at": "2021-10-10T15:49:14.000Z"
},
{
"id": 28279,
"record_type": "Merchant",
"record_id": 13131,
"status_type": "Agreement",
"status_value": "Not Generated",
"uuid": "11ec-29e1-9eafdc2c-a0b8-02053299b2da",
"created_at": "2021-10-10T15:49:14.000Z",
"updated_at": "2021-10-10T15:49:14.000Z"
}
],
"account_statuses": [],
"website_detail": null,
"attached_configs": [],
"kyc_documents": [],
"cs_plan": null,
"website_pages": [],
"product_account_detail": null
}
}
Failure Scenarios
- The token is invalid or expired
{
"status": "Unauthorized"
}