# Merchant Participation API - Negative Scenarios source: https://developer.mastercard.com/unified-installments/documentation/testing/mastercard-installments-program-with-merchant-participation/merchant-participation-api-negativesc/index.md ## Prerequisites {#prerequisites} Refer to the [Merchant Participation](https://developer.mastercard.com/unified-installments/documentation/use-cases/mastercard-installments-program-with-merchant-participation/merchant-participation/index.md) use case: #### Test Case 1: POST Merchant Participation can be called only by the Acquirers (or) Acquirer - service providers but not Installments Payment Provider {#test-case-1-post-merchant-participation-can-be-called-only-by-the-acquirers-or-acquirer---service-providers-but-not-installments-payment-provider} **THEN**: The acquirer should get a 403 Forbidden request response with an appropriate error message from the POST merchants/participations API upfront. ##### Response {#response} response code : 403 Forbidden ##### Response of POST MP when called by IPP {#response-of-post-mp-when-called-by-ipp} * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "forbidden", "Description": "Access restricted. Only ACQ users are allowed to call the API.", "Recoverable": false, "Details": "" } ] } } ``` #### Test Case 2: Acquirer or Acquirer - service provider cannot post MID and MAID for the same merchant in the same request object in POST merchant participations {#test-case-2-acquirer-or-acquirer---service-provider-cannot-post-mid-and-maid-for-the-same-merchant-in-the-same-request-object-in-post-merchant-participations} **THEN**: The acquirer should get a 400 BAD request response with an appropriate error message from the POST merchants/participations API upfront. ##### Create participation MAID merchant only {#create-participation-maid-merchant-only} * JSON ```JSON [ { "merchantLegalName": "USA Merchant", "countryCode": "USA", "acquirerICA": "019246", "dbaNames": [ "ACME" ], "maid": "123479", "maidType": "EXT", "mids": [ "987123456789124", "123123456789124", "567123456789124" ], "optIn": "N", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "2353463562345 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "Main Street", "addressLine2": "near Costco", "addressLine3": "near mastercard", "city": "O Fallon", "state": "MO", "postalCode": "63368" } } ] ``` ##### Response of MP API {#response-of-mp-api} Response code : 400 GET response MP for above request * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid.data.input", "Description": "USA Merchant at index 0 for field maid, [0].maidType, and [0].mids - MAID and MID participation fields cannot be in the same object", "Recoverable": false, "Details": "" } ] } } ``` #### Test Case 3: In MID only market, Acquirer or Acquirer - service provider cannot post MAID merchant participation details in POST merchant participations {#test-case-3-in-mid-only-market-acquirer-or-acquirer---service-provider-cannot-post-maid-merchant-participation-details-in-post-merchant-participations} **THEN** : The acquirer should get a 400 BAD request response with an appropriate error message from the `POST merchants/participations` API upfront. ##### Create participation MID merchant only {#create-participation-mid-merchant-only} * JSON ```JSON [ { "merchantLegalName": "Example Mart", "countryCode": "AUS", "acquirerICA": "82809000001", "merchantGroup": "AP", "mids": [ "987123456789124", "123123456789124", "567123456789124" ], "maidType": "GRP", "maid": "DwzlK1", "dbaNames": [ "ACME" ], "optIn": "N", "nonMerchantNegotiatedCardProductsOptIn": "Y", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "600 WEST", "addressLine2": "SECTOR 5", "addressLine3": "SUITE 775", "city": "St Peters", "state": "QLD", "postalCode": "85001" } } ] ``` ##### Response of MP API {#response-of-mp-api-1} Response code : 400 GET response MP for above request * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid.data.input", "Description": "Example Mart at index 0 for field maid - MAID participation is not supported in this region", "Recoverable": false, "Details": "" } ] } } ``` #### Test Case 4: Acquirer or Acquirer - service provider cannot post unsupported region of MAID merchant participation details in POST merchant participations {#test-case-4-acquirer-or-acquirer---service-provider-cannot-post-unsupported-region-of-maid-merchant-participation-details-in-post-merchant-participations} **THEN** : The acquirer should get a 400 BAD request response with an appropriate error message from the `POST merchants/participations` API upfront. If the acquirer is posting `countryCode` as GBR for the USA region merchant, then response code is 400. ##### Create Merchant Participation with MAID GRP {#create-merchant-participation-with-maid-grp} * JSON ```JSON [ { "merchantLegalName": "USA Merchant", "countryCode": "GBR", "acquirerICA": "001662", "dbaNames": [ "ACME" ], "maid": "123479", "maidType": "EXT", "optIn": "N", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "2353463562345 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "Main Street", "addressLine2": "near Costco", "addressLine3": "near mastercard", "city": "O Fallon", "state": "MO", "postalCode": "63368" } } ] ``` ##### Response {#response-1} response code : 400 * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: countryCode", "Description": "USA Merchant at index 0 for field countryCode 'GBR' country code does not match the submitter country code", "Recoverable": false, "Details": "" } ] } } ``` #### Test Case 5: Acquirer or Acquirer - service provider cannot post invalid MAID merchant participation details in POST merchant participations {#test-case-5-acquirer-or-acquirer---service-provider-cannot-post-invalid-maid-merchant-participation-details-in-post-merchant-participations} **THEN** : The acquirer should get a 400 BAD request response with an appropriate error message from the `POST merchants/participations` API upfront. ##### Response {#response-2} Response code : 400 Response of POST MP * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: maid", "Description": "USA Merchant at index 0 for field maid value '123479L' must match \"^[A-Za-z0-9]{1,6}\"", "Recoverable": false, "Details": "" } ] } } ``` #### Test Case 6: Acquirer or Acquirer - service provider cannot post invalid MAID Type merchant participation details in POST merchant participations {#test-case-6-acquirer-or-acquirer---service-provider-cannot-post-invalid-maid-type-merchant-participation-details-in-post-merchant-participations} **THEN** : The acquirer should get a 400 BAD request response with an appropriate error message from the POST merchants/participations API upfront. `maidType` is an ENUM which can be either EXT or GRP. ##### Response {#response-3} Response code : 400 Response of POST MP * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: maidType", "Description": "For merchantLegalName USA Merchant C, field maidType must belong to [GRP, EXT]", "Recoverable": false, "Details": "" } ] } } ``` #### Test Case 7: Acquirer or Acquirer - service provider post only unique MAID for submitting a opt-out merchant participation details in POST merchant participations {#test-case-7-acquirer-or-acquirer---service-provider-post-only-unique-maid-for-submitting-a-opt-out-merchant-participation-details-in-post-merchant-participations} **THEN** : The acquirer should get a 400 BAD request response with an appropriate error message from the `POST merchants/participations` API upfront. ##### Request Body {#request-body} Create Merchant Participation with MAID GRP * JSON ```JSON [ { "merchantLegalName": "USA Merchant C", "countryCode": "USA", "acquirerICA": "019246", "dbaNames": [ "ACME" ], "maid": "123481", "maidType": "GRP", "optIn": "N", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "2353463562345 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "Main Street", "addressLine2": "near Costco", "addressLine3": "near mastercard", "city": "O Fallon", "state": "MO", "postalCode": "63368" } } ] ``` ##### Response {#response-4} response code : 400 Response of POST MP * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid.data.input", "Description": "USA Merchant C at index 1 for field optIn - Use only a unique MAID for submitting an opt-out merchant participation request", "Recoverable": false, "Details": "For further clarification, please contact the Product Operations team at installments.product.support@mastercard.com" } ] } } ``` #### Test Case 8: Acquirer or Acquirer - service provider cannot post Generic maid and EXT maid for the same merchant in POST merchant participations {#test-case-8-acquirer-or-acquirer---service-provider-cannot-post-generic-maid-and-ext-maid-for-the-same-merchant-in-post-merchant-participations} **THEN** : The acquirer should get a 400 BAD request response with an appropriate error message from the `POST merchants/participations` API upfront. ##### Request Body {#request-body-1} Create Merchant Participation with MAID GRP * JSON ```JSON [ { "merchantLegalName": "USA Merchant C", "countryCode": "USA", "acquirerICA": "019246", "dbaNames": [ "ACME" ], "maid": "123480", "maidType": "EXT", "optIn": "N", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "2353463562345 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "Main Street", "addressLine2": "near Costco", "addressLine3": "near mastercard", "city": "O Fallon", "state": "MO", "postalCode": "63368" } }, { "merchantLegalName": "USA Merchant C", "countryCode": "USA", "acquirerICA": "019246", "dbaNames": [ "ACME" ], "maid": "424153", "maidType": "EXT", "optIn": "N", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "2353463562345 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "Main Street", "addressLine2": "near Costco", "addressLine3": "near mastercard", "city": "O Fallon", "state": "MO", "postalCode": "63368" } } ] ``` ##### Response {#response-5} response code : 400 * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid.data.input", "Description": "For merchantLegalName USA Merchant C, request must have unique merchant records", "Recoverable": false, "Details": "" } ] } } ``` #### Test Case 9: Acquirer or Acquirer - service provider cannot update maid/maid Type for a merchant in POST merchant participations {#test-case-9-acquirer-or-acquirer---service-provider-cannot-update-maidmaid-type-for-a-merchant-in-post-merchant-participations} **THEN** : The acquirer should get a error from GET call. ACQ sends request with maid Type as EXT. Then updates to maid Type as GRP. First sends the request with maid type as EXT. ##### Request Body {#request-body-2} Create Merchant Participation with MAID EXT * JSON ```JSON [ { "merchantLegalName": "USA Merchant C", "countryCode": "USA", "acquirerICA": "019246", "dbaNames": [ "ACME" ], "maid": "123480", "maidType": "EXT", "optIn": "Y", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "2353463562345 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "Main Street", "addressLine2": "near Costco", "addressLine3": "near mastercard", "city": "O Fallon", "state": "MO", "postalCode": "63368" } } ] ``` **THEN** : Sends the request with maid Type as GRP. Create Merchant Participation with MAID GRP * JSON ```JSON [ { "merchantLegalName": "USA Merchant C", "countryCode": "USA", "acquirerICA": "019246", "dbaNames": [ "ACME" ], "maid": "123480", "maidType": "GRP", "optIn": "Y", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "2353463562345 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "Main Street", "addressLine2": "near Costco", "addressLine3": "near mastercard", "city": "O Fallon", "state": "MO", "postalCode": "63368" } } ] ``` ##### Response {#response-6} response code : 200 with errors Response of POST MP when updating `maidType` * JSON ```JSON [ { "requestEndpoint": "/merchants/participations", "requestId": 372135266816622600, "httpErrorStatusCode": 400, "errors": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data", "Description": "The 'maid/maidType' for USA Merchant C at index 0 cannot be updated for a unique merchant.", "Recoverable": false, "Details": "For further clarification, please contact the Product Operations team at installments.product.support@mastercard.com" } ] } ] ``` response code : 200 with errors Response of POST MP when updating maid value * JSON ```JSON [ { "requestEndpoint": "/merchants/participations", "requestId": 420214153542635500, "httpErrorStatusCode": 400, "errors": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: maid", "Description": "The MAID value for USA Merchant C at index 0 for unique merchant cannot be updated by you.", "Recoverable": false, "Details": "For further clarification, please contact the Product Operations team at installments.product.support@mastercard.com with reason for MAID update for the merchant." } ] } ] ``` #### Test Case 10: Acquirer or Acquirer - service provider customer Group Maid or Generic EXT merchant participation reversal is only allowed through OBO - Product Operations in POST merchant participations {#test-case-10-acquirer-or-acquirer---service-provider-customer-group-maid-or-generic-ext-merchant-participation-reversal-is-only-allowed-through-obo---product-operations-in-post-merchant-participations} **THEN** : The acquirer should get a error to contact support. Acquirer or Acquirer - service provider sends request to opt in with maid Type as GRP. Then sends another request to opt out the same GRP maid. Then ACQ/ACQ-SP will get error. First sends the request with maid type as GRP and opt in. ##### Create Merchant Participation with MAID GRP {#create-merchant-participation-with-maid-grp-1} * JSON ```JSON [ { "merchantLegalName": "USA Merchant ABC", "countryCode": "USA", "acquirerICA": "019246", "dbaNames": [ "ACME" ], "maid": "123421", "maidType": "GRP", "optIn": "Y", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "2353463562345 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "Main Street", "addressLine2": "near Costco", "addressLine3": "near mastercard", "city": "O Fallon", "state": "MO", "postalCode": "63368" } } ] ``` Then sends the request with maid Type as GRP as opt out. Create Merchant Participation with MAID GRP * JSON ```JSON [ { "merchantLegalName": "USA Merchant ABC", "countryCode": "USA", "acquirerICA": "019246", "dbaNames": [ "ACME" ], "maid": "123421", "maidType": "GRP", "optIn": "N", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "2353463562345 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "Main Street", "addressLine2": "near Costco", "addressLine3": "near mastercard", "city": "O Fallon", "state": "MO", "postalCode": "63368" } } ] ``` Only On Behalf of (OBO) user will be allowed to update the opt in/opt out for GRP maid or generic EXT maid. response code : 200 with below error * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid.data.input", "Description": "USA Merchant ABC at index 0 for field optIn - Use only a unique MAID for submitting an opt-out merchant participation request", "Recoverable": false, "Details": "For further clarification, please contact the Product Operations team at installments.product.support@mastercard.com" } ] } } ``` Note: Market Types: * Market Type: 1 - MID market - Australia * Market Type: 2 - MAID market - GBR/CAN/MYS * Market Type: 3 - MID/MAID market - USA/UGA #### Test Case 11: A submitting acquirer or IPP cannot search for merchants and their participation details through the /merchants/searches API by providing the invalid maid field {#test-case-11-a-submitting-acquirer-or-ipp-cannot-search-for-merchants-and-their-participation-details-through-the-merchantssearches-api-by-providing-the-invalid-maid-field} ##### Response (HTTP 400 Bad request) {#response-http-400-bad-request} POST merchant searches response with invalid maid * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: maid", "Description": "must match \"^[A-Za-z0-9]{1,6}\"", "Recoverable": false, "Details": "" } ] } } ``` #### Test Case 12: A submitting acquirer or IPP cannot search for merchants and their participation details through the /merchants/searches API by providing invalid country code field {#test-case-12-a-submitting-acquirer-or-ipp-cannot-search-for-merchants-and-their-participation-details-through-the-merchantssearches-api-by-providing-invalid-country-code-field} ##### Response (HTTP 400 Bad request) {#response-http-400-bad-request-1} POST merchant searches response with invalid country code * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: countryCode", "Description": "Should only contain alphabets (A-Z, a-z) and size must be between 3 and 3", "Recoverable": false, "Details": "" } ] } } ``` #### Test Case 13: A submitting acquirer or IPP cannot search for merchants and their participation details in another region through the /merchants/searches API {#test-case-13-a-submitting-acquirer-or-ipp-cannot-search-for-merchants-and-their-participation-details-in-another-region-through-the-merchantssearches-api} ##### Response (HTTP 400 Bad request): Not authorized to view country data other than the acquirer or IPP country. {#response-http-400-bad-request-not-authorized-to-view-country-data-other-than-the-acquirer-or-ipp-country} POST merchant searches response with invalid country code * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "forbidden", "Description": "Not authorized to view requested country data.", "Recoverable": false, "Details": "" } ] } } ``` #### Test Case 14: A submitting acquirer or IPP cannot search for merchants and their participation details through the /merchants/searches API by providing invalid acquirer Ica field {#test-case-14-a-submitting-acquirer-or-ipp-cannot-search-for-merchants-and-their-participation-details-through-the-merchantssearches-api-by-providing-invalid-acquirer-ica-field} ##### Response (HTTP 400 Bad request) {#response-http-400-bad-request-2} POST merchant searches response with invalid acquirer Ica * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: acquirerICA", "Description": "must match \"^(?:[0-9]{6}|[0-9]{9}|[0-9]{11})$\"", "Recoverable": false, "Details": "" } ] } } ``` #### Test Case 15: A submitting acquirer or IPP cannot search for merchants and their participation details through the /merchants/searches API by providing invalid status field {#test-case-15-a-submitting-acquirer-or-ipp-cannot-search-for-merchants-and-their-participation-details-through-the-merchantssearches-api-by-providing-invalid-status-field} ##### Response (HTTP 400 Bad request): Status needs to be PENDING or COMPLETED or ERROR. If not, below error is returned. {#response-http-400-bad-request-status-needs-to-be-pending-or-completed-or-error-if-not-below-error-is-returned} POST merchant searches response with invalid status * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: merchantParticipationStatus", "Description": "must match \"^(?:PENDING|COMPLETED|ERROR)$\"", "Recoverable": false, "Details": "" } ] } } ``` #### Test Case 16: Post Merchant MAID participation details through the POST API, while sending an acquirer ICA belonging to a different country other than the merchant's country {#test-case-16-post-merchant-maid-participation-details-through-the-post-api-while-sending-an-acquirer-ica-belonging-to-a-different-country-other-than-the-merchants-country} **THEN** : The acquirer should get the status response 200 from the `GET /merchants/participations` endpoint after a few hours (based on the quantum of bulk-load, Mastercard has parallelly received to process) for effectuating merchant participations. But with `httpErrorStatusCode` as 400. Then, the response code is 200. Request is `POST /merchants/participations` with invalid acquirer Ica for MAID merchant. Then we get 202 from this request. ##### POST merchant participations request {#post-merchant-participations-request} * JSON ```JSON [ { "merchantLegalName": "USA Merchant C", "countryCode": "USA", "acquirerICA": "005001", "dbaNames": [ "ACME" ], "maid": "123479", "maidType": "EXT", "optIn": "N", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "2353463562345 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "Main Street", "addressLine2": "near Costco", "addressLine3": "near mastercard", "city": "O Fallon", "state": "MO", "postalCode": "63368" } }, { "merchantLegalName": "Example Mart", "countryCode": "USA", "acquirerICA": "019246", "dbaNames": [ "ACME" ], "mids": [ "987123456789124", "123123456789124", "567123456789124" ], "optIn": "N", "nonMerchantNegotiatedCardProductsOptIn": "Y", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "600 WEST", "addressLine2": "SECTOR 5", "addressLine3": "SUITE 775", "city": "St Peters", "state": "QLD", "postalCode": "85001" } } ] ``` When `GET /merchant/participations` is called with the above request id then, you receive the following error: ##### GET merchants participations response {#get-merchants-participations-response} * JSON ```JSON [ { "requestEndpoint": "/merchants/participations", "requestId": 369938267413413900, "httpErrorStatusCode": 400, "errors": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: acquirerICA", "Description": "Country mismatch detected for USA Merchant C at index 0 for field 'acquirerICA'. The Acquirer's country does not match with the country of the merchant or submitting partner.", "Recoverable": false, "Details": "For further clarification, please contact the Product Operations team at installments.product.support@mastercard.com" } ] } ] ``` #### Test Case 17: Post Merchant MAID participation details through the POST API and then update the maid and POST maid participation again, while sending an same MAID field {#test-case-17-post-merchant-maid-participation-details-through-the-post-api-and-then-update-the-maid-and-post-maid-participation-again-while-sending-an-same-maid-field} **THEN** : Both the `POST merchants/participations` gives 200. But `GET merchants/participations` gives invalid data: maid with following error. `POST /merchants/participations` with invalid acquirer Ica for MAID merchant. Then we get 202 from this request. ##### POST merchant participations request {#post-merchant-participations-request-1} * JSON ```JSON [ { "merchantLegalName": "USA Merchant C", "countryCode": "USA", "acquirerICA": "019246", "dbaNames": [ "ACME" ], "maid": "123479", "maidType": "EXT", "optIn": "N", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "2353463562345 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "Main Street", "addressLine2": "near Costco", "addressLine3": "near mastercard", "city": "O Fallon", "state": "MO", "postalCode": "63368" } } ] ``` Update the MAID in the request and call POST merchants participations. ##### POST merchant participations request {#post-merchant-participations-request-2} * JSON ```JSON [ { "merchantLegalName": "USA Merchant C", "countryCode": "USA", "acquirerICA": "005001", "dbaNames": [ "ACME" ], "maid": "123480", "maidType": "EXT", "optIn": "N", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "2353463562345 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "Main Street", "addressLine2": "near Costco", "addressLine3": "near mastercard", "city": "O Fallon", "state": "MO", "postalCode": "63368" } } ] ``` Response from above is 202 Accepted. When `GET /merchant/participations` is called with the above request ID then, you receive the following error: ##### GET merchants participations response {#get-merchants-participations-response-1} * JSON ```JSON [ { "requestEndpoint": "/merchants/participations", "requestId": 369938267413413900, "httpErrorStatusCode": 400, "errors": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: acquirerICA", "Description": "Country mismatch detected for USA Merchant C at index 0 for field 'acquirerICA'. The Acquirer's country does not match with the country of the merchant or submitting partner.", "Recoverable": false, "Details": "For further clarification, please contact the Product Operations team at installments.product.support@mastercard.com" } ] } ] ``` #### Test Case 18: Submitting Acquirer is trying to submit Mid and Maid Merchants using POST /merchants/participations but with multiple incorrect inputs which should return bulk failure error during validation and should send all the field level failures in the response {#test-case-18-submitting-acquirer-is-trying-to-submit-mid-and-maid-merchants-using-post-merchantsparticipations-but-with-multiple-incorrect-inputs-which-should-return-bulk-failure-error-during-validation-and-should-send-all-the-field-level-failures-in-the-response} **THEN**: Error logs will denote which particular merchant has error along with the merchant index position. **POST** : `/merchants/participations` Response code : 400 ##### Request Body {#request-body-3} * JSON ```JSON [ { "merchantLegalName": "Example Mid Merchant 01", "countryCode": "USA", "acquirerICA": "019246", "dbaNames": [ "ACME" ], "mids": [ "8754127452026701111111111111111111111111111111111111111111" ], "optIn": "I", "duns": "879847426000000000000000000000000", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 0, "walletAcceptance": "Y", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" }, { "walletId": 2, "walletAcceptance": "Y", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" }, { "walletId": 3, "walletAcceptance": "Y", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "1001 WEST", "addressLine2": "SECTOR 5", "addressLine3": "SUITE 775", "city": "St Peters", "state": "QLD", "postalCode": "85001" } }, { "merchantLegalName": "Example Maid Merchant 02", "countryCode": "USA", "acquirerICA": "019246", "dbaNames": [ "ACME" ], "maid": "875412", "optIn": "N", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" }, { "walletId": 2, "walletAcceptance": "O", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" }, { "walletId": 3, "walletAcceptance": "Y", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "1001 WEST", "addressLine2": "SECTOR 5", "addressLine3": "SUITE 775", "city": "St Peters", "state": "QLD", "postalCode": "85001" } } ] ``` ##### Response {#response-7} * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: mids[0]", "Description": "Example Mid Merchant 01 at index 0 for field mids[0] value '8754127452026701111111111111111111111111111111111111111111' must match ^[A-Za-z0-9]{1,15}$", "Recoverable": false, "Details": "" }, { "Source": "merchant-participation-api", "ReasonCode": "invalid data: optIn", "Description": "Example Mid Merchant 01 at index 0 for field optIn value 'I' must match \"^(?:Y|N)$\"", "Recoverable": false, "Details": "" }, { "Source": "merchant-participation-api", "ReasonCode": "invalid data: duns", "Description": "Example Mid Merchant 01 at index 0 for field duns value '879847426000000000000000000000000' size must be between 1 and 9", "Recoverable": false, "Details": "" }, { "Source": "merchant-participation-api", "ReasonCode": "invalid data: wallets[0].walletId", "Description": "Example Mid Merchant 01 at index 0 for field wallets[0].walletId value '0' must be greater than or equal to 1", "Recoverable": false, "Details": "" }, { "Source": "merchant-participation-api", "ReasonCode": "invalid data: maidType", "Description": "Example Maid Merchant 02 at index 1 for field maidType - Please include MAID type", "Recoverable": false, "Details": "" }, { "Source": "merchant-participation-api", "ReasonCode": "invalid data: wallets[1].walletAcceptance", "Description": "Example Maid Merchant 02 at index 1 for field wallets[1].walletAcceptance value 'O' must match \"^(?:Y|N)$\"", "Recoverable": false, "Details": "" } ] } } ``` Note: The validation error will be caught by the MP API and shown in response. There are errors for fields such as `mids`\[0\], `optIn`, `duns`, wallets\[0\]. `walletId` at index 0 and field values of `maidType` and wallets\[1\]. `walletAcceptance` at index 1. Detailed errors are shown in the response itself. #### Test case 19: Submitting Acquirer is trying to submit multiple Mid and MAID merchants with incorrect AcquirerICA and dbaValues not present {#test-case-19-submitting-acquirer-is-trying-to-submit-multiple-mid-and-maid-merchants-with-incorrect-acquirerica-and-dbavalues-not-presentbr} **THEN** : After merchant processing, the Acquirer should get status response 400 from the `GET /merchants/participations` endpoint after few hours (based on the quantum of bulk load mastercard has parallelly received to process) for effectuating merchant participations. **POST** : `/merchants/participations` ##### Request Body {#request-body-4} * JSON ```JSON [ { "merchantLegalName": "Example Mid Merchant 01", "countryCode": "USA", "acquirerICA": "111111", "dbaNames": [ "ACME" ], "mids": [ "875412745202670" ], "optIn": "N", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" }, { "walletId": 2, "walletAcceptance": "Y", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" }, { "walletId": 3, "walletAcceptance": "Y", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "1001 WEST", "addressLine2": "SECTOR 5", "addressLine3": "SUITE 775", "city": "St Peters", "state": "QLD", "postalCode": "85001" } }, { "merchantLegalName": "Example Maid Merchant 02", "countryCode": "USA", "acquirerICA": "019246", "maid": "875412", "maidType": "EXT", "optIn": "N", "duns": "879847426", "websiteUrl": "https://www.example.com", "wallets": [ { "walletId": 1, "walletAcceptance": "Y", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" }, { "walletId": 2, "walletAcceptance": "N", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" }, { "walletId": 3, "walletAcceptance": "Y", "walletMerchantId": "235346356234 | 125346356236 | 125446356237" } ], "address": { "addressLine1": "1001 WEST", "addressLine2": "SECTOR 5", "addressLine3": "SUITE 775", "city": "St Peters", "state": "QLD", "postalCode": "85001" } } ] ``` **Response Code** : 202 `request_id` = 405013477384519680 After the Sync Processor is run at every 30 mins, the Processing status should be **FAILED** . Submitting Acquirer can make a `GET merchants/participations` call by `request_id` in the query parameter to get the Async processing status, then Acquirer should receive details of the merchants which are registered by acquirer that are associated with request ID. **GET** : `/merchants/participations` **Response Code** : 200 **Request Parameters** requestId = 405013477384519680 (available after calling `POST /merchants/participations`) limit(optional) = 500 offset(optional) = 0 Response Code from `GET/merchants/participations` Response Status : ERROR ##### Response {#response-8} * JSON ```JSON [ { "requestEndpoint": "/merchants/participations", "requestId": 405013477384519700, "httpErrorStatusCode": 400, "errors": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: acquirerICA", "Description": "Example Mid Merchant 01 at index 0 verification for field acquirerICA value as '111111' failed.", "Recoverable": false, "Details": "The Acquirer's Interbank Card Association (ICA) number you provided is either invalid or not recognized by Mastercard. For further clarification, please contact the Product Operations team at installments.product.support@mastercard.com" }, { "Source": "merchant-participation-api", "ReasonCode": "invalid data: dbaNames", "Description": "Example Maid Merchant 02 at 1 field dbaNames must not be null or empty.", "Recoverable": false, "Details": "For further clarification, please contact the Product Operations team at installments.product.support@mastercard.com" } ] } ] ``` Note: MPDP batch app is responsible to validate the fields and show exact field value errors along with details as a bulk response. ### **MID Search API endpoint** {#mid-search-api-endpoint} #### Test Case 1: when MIDs are not found for the provided input data {#test-case-1-when-mids-are-not-found-for-the-provided-input-data} ##### Request Body {#request-body-5} * JSON ```JSON { "merchantLegalName": "Example Mart 240225", "countryCode": "USA", "acquirerICA": "019246", "mid": "267123456789124", "status": "PENDING" } ``` ##### Response {#response-9} * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "not.found", "Description": "Mids are not found", "Recoverable": false } ] } } ``` #### Test Case 2: Invalid acquirer ICA {#test-case-2-invalid-acquirer-ica} ##### Request Body {#request-body-6} * JSON ```JSON { "merchantLegalName": "Example Mart 240225", "countryCode": "USA", "acquirerICA": "01924645454545545", "mid": "267123456789124", "status": "COMPLETED" } ``` ##### Response (HTTP 400 Bad request) {#response-http-400-bad-request-3} * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: acquirerICA", "Description": "must match \"^(?:[0-9]{6}|[0-9]{9}|[0-9]{11})$\"", "Recoverable": false } ] } } ``` #### Test Case 3: Invalid MID {#test-case-3-invalid-mid} ##### Request Body {#request-body-7} * JSON ```JSON { "merchantLegalName": "Example Mart 240225", "countryCode": "USA", "acquirerICA": "019246", "mid": "2671234567891240000000", "status": "COMPLETED" } ``` ##### Response (HTTP 400 Bad request) {#response-http-400-bad-request-4} * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: mid", "Description": "must match \"^[A-Za-z0-9]{1,15}\"", "Recoverable": false } ] } } ``` #### Test Case 4: Invalid status {#test-case-4-invalid-status} ##### Request Body {#request-body-8} * JSON ```JSON { "merchantLegalName": "Example Mart 240225", "countryCode": "USA", "acquirerICA": "019246", "mid": "267123456789124", "status": "COMPLETED" } ``` ##### Response (HTTP 400 Bad request) {#response-http-400-bad-request-5} * JSON ```JSON { "Errors": { "Error": [ { "Source": "merchant-participation-api", "ReasonCode": "invalid data: status", "Description": "must match \"^(?:PENDING|COMPLETED|ERROR)$\"", "Recoverable": false }, { "Source": "merchant-participation-api", "ReasonCode": "invalid data: status", "Description": "size must be between 1 and 10", "Recoverable": false } ] } } ```