get https://mercury-uat.phonepe.com/v1/submerchant//
This API endpoint can be used by aggregators to fetch information about an already onboarded sub-merchant.
Note:
Regarding the “subMerchant” path parameter used in this API:
-
For newly onboarded sub-merchants, it should be PhonePe-generated sub-merchant-id (as received in response to Create Sub-merchant API)
-
For already onboarded sub-merchants, it should be the aggregator-generated sub-merchant-id.
Request Headers
Field Name | Value |
---|---|
X-Verify | SHA256 ("/v1/submerchant/{merchantId}/{subMerchantId}" + salt key) + ### + salt index |
Content-Type | “application/json” |
Response
Case | Response Code & Body |
---|---|
Success, if the request is valid & the requested sub-merchant-id is already onboarded. | HTTP Code: 200 { "success": true, "code": "SUCCESS", "message": , "data": { "merchantId": , "subMerchantId": , "fullName": , "displayName": , "mcc": , "websiteUrl": , "externalMerchantType": , "externalOnboardingType": , "phoneNumber": , "email": , "address": { "building": , "street": , "area": , "locality": , "city": , "state": , "country": , "pinCode": , "landmark": } } } |
Sub-merchant not found, if the requested sub-merchant-id is not already onboarded. | HTTP Code: 400 { "success": false, "code”: "SUBMID_NOT_ONBOARDED", "message”: "Sub-merchant is not onboarded." } |
Bad request if the X-Verify authorization header is missing or invalid. | HTTP Code: 400 { "success": false, "code”: "BAD_REQUEST", "message”: } |
Unauthorized, if the aggregator is not authorized to perform the operation. | HTTP Code: 401 { "success": false, "code”: "AUTHORIZATION_FAILED", "message”: } |