{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"46519d45-8085-4be7-b553-54345a09f1fa","name":"MP CONTPAQUi","description":"**`MP`** `stands for Mercado Pago`\n\n**Collection Description: MP CONTPAQi**\n\nThis Postman collection, named **MP CONTPAQi**, contains the endpoints required to interact with the Marketplace backend via the NopCommerce API. The collection is organized into main folders:\n\n1. **OAuth**: Includes endpoints for managing authentication and obtaining the access token required to make requests to Mercado Pago's services.\n    \n2. **Payments**: Contains endpoints related to managing payments through MercadoPago, allowing the URLcreation, payment's info retrieval, and updating URL preferences.\n    \n3. **Settings**: The folder has the request to get the current plugin setting values.\n    \n4. **Notifications**: Has the request that MP will use to send payment notifications.\n    \n\n---\n\n### **Environment Configuration**\n\nTo use this collection, you need to configure the following environment variables in Postman:\n\n- **`host`**: Defines the domain or IP of the environment you are working on, which can be either a local host (e.g., `http://localhost:5000`) or the published service domain.\n    \n- **`backendRoute`**: Should be set to `\"/api-backend/mercadopago\"` to correctly point to the backend service route.\n    \n\nSome of the values are automatically configured when the requests are sent thanks to Postman scripts included in the requests.\n\n---\n\n### **Example Environment Configuration:**\n\n``` plaintext\nhost: http://localhost:5000\nbackendRoute: /api-backend/mercadopago\n\n ```\n\n---\n\n### **Recommendations:**\n\n- **Token Renewal:** Make sure to update the `NopCommerce_Access_Token` whenever it expires to avoid authentication errors. This can be saved using the `Authenticate - GetToken` request using the Postman collection.\n    \n- **Testing in Different Environments:** Use Postman environments (local, testing, production) to easily manage variables like `host` and `NopCommerce_Access_Token`.\n    \n- **Response Validation:** Check the responses of the endpoints to ensure that the returned data matches the expected results, especially for payment methods. Tests are included in the requests.\n    \n\nThis setup will help you efficiently test and develop integrations with the Marketplace backend using the NopCommerce API and MercadoPago. Good luck with your testing! 🚀\n\n### Status Code Responses\n\nAll endpoints return standard HTTP status codes to indicate the outcome of a request. Below are the possible responses:\n\n- **200 OK** or **201 Created**\n    \n    The request was successfully processed.\n    \n    - **201 Created** is returned for successful `POST` requests.\n        \n    - **200 OK** is returned for all other request types (`GET`, `PUT`, etc.).\n        \n- **400 Bad Request**\n    \n    The request was malformed or contained invalid data.\n    \n    This may occur if:\n    \n    - A field contains an invalid value.\n        \n    - A numeric value is below or above the allowed threshold.\n        \n\n```\nCheck the response body for more details.\n- If it's a Marketplace-specific issue, the response will indicate the route where the problem occurred.\n- Otherwise, it's likely an internal error from the Marketplace platform.\n\n ```\n\nThe error body response is of JSON type.\n\n``` json\n{\n    \"message\": \"string\",\n    \"error\": \"string (Required)\",\n    \"status\": number,\n    \"cause\": []\n}\n\n ```\n\nThis is an example of how the body is returned:\n\n``` json\n{\n    \"message\": \"Error validating grant. Your authorization code or refresh token may be expired or it was already used\",\n    \"error\": \"invalid_grant\",\n    \"status\": 400,\n    \"cause\": []\n}\n\n ```\n\n``` json\n{\n    \"error\": \"error - Plugins/Nop.Plugin.Misc.WebApi.Backend/Services/MercadoPago/MercadoPagoService.cs/OAuth_Post_AccessToken() : 'code' required and different from null.\"\n}\n\n ```\n\n- **401 Unauthorized**\n    \n    The distributor MP access token saved in the database is no longer valid.\n    \n    This can happen for several reasons:\n    \n    - The distributor changed their MP account.\n        \n    - The token expired and was not refreshed in time.\n        \n    - Other authentication-related issues.\n        \n\n**CID in Requests**\n\nAll requests must include the `CID` as a query parameter. This identifies which MP Access Token to retrieve, allowing the system to use a single access token per company instead of storing one per user.\n\n```\nhttps://endpoint.com?CID=123\n\n ```\n\n## **Testing**\n\nWhen testing with a **Mercado Pago (MP) app created using a test account**, there is **no need to activate Test Mode**, as all accounts and credentials involved are already designated as test data by Mercado Pago.\n\nHowever, if the MP app is created using a **regular (non-test) Mercado Pago account**, then the **Test Mode must be manually activated** to safely simulate transactions without using real funds.\n\n### **Test Cards for Use**\n\nUse the following test cards provided by Mercado Pago to simulate payments. These cards are intended **only for testing purposes** and will not generate real transactions.\n\n- **Expiration Date:** `11/30`\n    \n- **CVV:** `123`\n    \n\n| Card Type | Card Number |\n| --- | --- |\n| Visa Credit | 4075 5957 1648 3764 |\n| MasterCard Credit | 5474 9254 3267 0366 |\n| Visa Debit | 4189 1412 2126 7633 |\n| MasterCard Debit | 5579 0534 6148 2647 |\n\n| **Cardholder Name** | **Payment Status Description** |\n| --- | --- |\n| APRO | Approved payment |\n| OTHE | Rejected due to general error |\n| CONT | Payment pending |\n| CALL | Rejected – authorization required (call needed) |\n| FUND | Rejected – insufficient funds |\n| SECU | Rejected – invalid security code (CVV) |\n| EXPI | Rejected – expired card |\n| FORM | Rejected – form error |\n\n> ✅ **Note:** The cardholder name affects the payment outcome. Use **\"APRO\"** to simulate approved transactions, and use any other name to simulate rejections.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"23705940","team":4738757,"collectionId":"46519d45-8085-4be7-b553-54345a09f1fa","publishedId":"2sAYkLmc5q","public":true,"publicUrl":"https://documentations.deapcomx.com","privateUrl":"https://go.postman.co/documentation/23705940-46519d45-8085-4be7-b553-54345a09f1fa","customColor":{"top-bar":"FF0000","right-sidebar":"303030","highlight":"FF0000"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":"CONTPAQUi MKT Mercado Pago Plugin"}],"appearance":{"default":"system_default","themes":[{"name":"dark","logo":"https://content.pstmn.io/a94b6684-c5dc-4129-a12a-b5154375b400/REVBUCBDbyBIaWdoIERlZmluaXRpb24gKDEpLnBuZw==","colors":{"top-bar":"5C5C5c","right-sidebar":"303030","highlight":"FF0000"}},{"name":"light","logo":"https://content.pstmn.io/e0ccd831-9d1f-4529-ba4c-ba3b06614b70/REVBUCBDbyBIaWdoIERlZmluaXRpb24gKDEpLnBuZw==","colors":{"top-bar":"FF0000","right-sidebar":"303030","highlight":"FF0000"}}]}},"version":"8.10.1","publishDate":"2025-03-26T23:34:27.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"CONTPAQUi MKT Mercado Pago Plugin","description":""},"logos":{"logoLight":"https://content.pstmn.io/e0ccd831-9d1f-4529-ba4c-ba3b06614b70/REVBUCBDbyBIaWdoIERlZmluaXRpb24gKDEpLnBuZw==","logoDark":"https://content.pstmn.io/a94b6684-c5dc-4129-a12a-b5154375b400/REVBUCBDbyBIaWdoIERlZmluaXRpb24gKDEpLnBuZw=="}},"statusCode":200},"environments":[{"name":"CONTPAQUi","id":"f2b9e8a2-cab1-4f09-ab52-7efe25701c77","owner":"23705940","values":[{"key":"token","value":"APP_USR-4574646639273132-021812-a423b4aea6a39e83bb9fddb009c9bf96-2249665167","enabled":true,"type":"secret"},{"key":"NopCommerce_Access_Token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOiIxNzQwNjExNzk5IiwiZXhwIjoiMTc0MTIxNjU5OSIsIkN1c3RvbWVySWQiOiIxMDQ1MDQiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6ImE4OGE1NDAwLThmNzgtNGNkOC1hY2ZiLThkOTM5ZGFmYjI0ZiIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6ImQuYW50b25pb0BkZWFwY29teC5jb20ifQ.y1bHaIYoBCeYiO15UPnoZkq_zAvkwKzW3E_I4FaPJI0","enabled":true,"type":"secret"},{"key":"host","value":"https://localhost:60080","enabled":true,"type":"default"},{"key":"backendRoute","value":"/api-backend/mercadopago","enabled":true,"type":"default"},{"key":"clientID","value":"APP_USR-4574646639273132-021812-a423b4aea6a39e83bb9fddb009c9bf96-2249665167","enabled":true,"type":"secret"},{"key":"clientSecret","value":"KeW0XJYckD1bbDEaIIJu7Uq8AQOg38aB","enabled":true,"type":"secret"},{"key":"refresh_token","value":"","enabled":true,"type":"any"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/02dd089b2426d2db994c6f125302db4b67ee9e1733401efe75459b47eeb3551c","favicon":"https://deapcomx.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"CONTPAQUi","value":"23705940-f2b9e8a2-cab1-4f09-ab52-7efe25701c77"}],"canonicalUrl":"https://documentations.deapcomx.com/view/metadata/2sAYkLmc5q"}