{"id":15984227,"url":"https://github.com/mercadopago/sdk-nodejs","last_synced_at":"2026-05-21T06:06:51.274Z","repository":{"id":511934,"uuid":"76805059","full_name":"mercadopago/sdk-nodejs","owner":"mercadopago","description":"Mercado Pago's Official Node.js SDK","archived":false,"fork":false,"pushed_at":"2025-05-14T18:59:55.000Z","size":1984,"stargazers_count":406,"open_issues_count":23,"forks_count":120,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-05-14T19:47:38.787Z","etag":null,"topics":["backend-sdk","mercadopago","node","nodejs","sdk"],"latest_commit_sha":null,"homepage":"https://developers.mercadopago.com/","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mercadopago.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.MD","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-12-18T20:28:39.000Z","updated_at":"2025-05-14T18:55:11.000Z","dependencies_parsed_at":"2023-12-21T15:13:16.381Z","dependency_job_id":"96d8173f-b43b-40bd-8a45-323a9beb24b1","html_url":"https://github.com/mercadopago/sdk-nodejs","commit_stats":{"total_commits":255,"total_committers":25,"mean_commits":10.2,"dds":0.4274509803921569,"last_synced_commit":"c419924c0c5f6849308108b6181628f5107c3814"},"previous_names":["mercadopago/dx-nodejs"],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mercadopago%2Fsdk-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mercadopago%2Fsdk-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mercadopago%2Fsdk-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mercadopago%2Fsdk-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mercadopago","download_url":"https://codeload.github.com/mercadopago/sdk-nodejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254219281,"owners_count":22034380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend-sdk","mercadopago","node","nodejs","sdk"],"created_at":"2024-10-08T02:05:12.677Z","updated_at":"2026-05-21T06:06:51.269Z","avatar_url":"https://github.com/mercadopago.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![SDK Node Mercado Pago](https://github.com/lucmkz/sdk-nodejs/assets/31546923/84211022-6fc5-4db1-8772-117eca84f2d9)\n\n# Mercado Pago SDK for NodeJS\n\n[![NPM Version](https://img.shields.io/npm/v/mercadopago.svg)](http://npmjs.com/package/mercadopago)\n[![Downloads](https://img.shields.io/npm/dt/mercadopago.svg)](http://npmjs.com/package/mercadopago)\n\nThis library provides developers with a simple set of bindings to help you integrate Mercado Pago APIs to a website and start receiving payments.\n\n## 💡 Requirements\n\nThe SDK Supports NodeJS version 18 or higher.\n\n## 📲 Installation\n\nFirst time using Mercado Pago? Create your [Mercado Pago account](https://www.mercadopago.com), if you don’t have one already.\n\n1. Install NodeJS SDK for MercadoPago running in command line:\n\n```sh\n$ npm install --save mercadopago\n```\n\n2. Copy the access_token in the [credentials](https://www.mercadopago.com/developers/en/docs/your-integrations/credentials) section of the page and replace YOUR_ACCESS_TOKEN with it.\n\nThat's it! Mercado Pago SDK has been successfully installed.\n\n## 🌟 Getting Started\n\nSimple usage looks like:\n\n```javascript\n// Step 1: Import the parts of the module you want to use\nimport { MercadoPagoConfig, Order } from \"mercadopago\";\n\n// Step 2: Initialize the client object\nconst client = new MercadoPagoConfig({\n\taccessToken: \"\u003cACCESS_TOKEN\u003e\",\n\toptions: { timeout: 5000 },\n});\n\n// Step 3: Initialize the API object\nconst order = new Order(client);\n\n// Step 4: Create the request object\nconst body = {\n\ttype: \"online\",\n\tprocessing_mode: \"automatic\",\n\ttotal_amount: \"1000.00\",\n\texternal_reference: \"ext_ref_1234\",\n\tpayer: {\n\t\temail: \"\u003cPAYER_EMAIL\u003e\",\n\t},\n\ttransactions: {\n\t\tpayments: [\n\t\t\t{\n\t\t\t\tamount: \"1000.00\",\n\t\t\t\tpayment_method: {\n\t\t\t\t\tid: \"master\",\n\t\t\t\t\ttype: \"credit_card\",\n\t\t\t\t\ttoken: \"\u003cCARD_TOKEN\u003e\",\n\t\t\t\t\tinstallments: 1,\n\t\t\t\t\tstatement_descriptor: \"Store name\",\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n};\n\n// Step 5: Create request options object - Optional\nconst requestOptions = {\n\tidempotencyKey: \"\u003cIDEMPOTENCY_KEY\u003e\",\n};\n\n// Step 6: Make the request\norder.create({ body, requestOptions }).then(console.log).catch(console.error);\n```\n\n### Step 1: Import the parts of the module you want to use\n\nImport `MercadoPagoConfig` and API objects from the MercadoPago module.\n\n```javascript\nimport { MercadoPagoConfig, Order } from \"mercadopago\";\n```\n\n### Step 2: Initialize the client object\n\nInitialize the client object, passing the following:\n\n- `accessToken`: Application's private key.\n- `options`: These are optional fields,\n  - `timeout`: Are the timeout of requests\n  - `idempotencyKey`: [Idempotency](https://en.wikipedia.org/wiki/Idempotence) Is for retrying requests without accidentally performing the same operation twice\n\nFor example:\n\n```javascript\nconst client = new MercadoPagoConfig({\n\taccessToken: \"\u003cACCESS_TOKEN\u003e\",\n\toptions: { timeout: 5000, idempotencyKey: \"\u003cIDEMPOTENCY_KEY\u003e\" },\n});\n```\n\n### Step 3: Initialize the API object\n\nInitialize the API object you want to use, passing the `client` object from the previous step.\n\n```javascript\nconst order = new Order(client);\n```\n\n### Step 4: Create the request object\n\nCreate the request object. For example, for a request to the `/v1/orders` endpoint:\n\n```javascript\nconst body = {\n\ttype: \"online\",\n\tprocessing_mode: \"automatic\",\n\ttotal_amount: \"1000.00\",\n\texternal_reference: \"ext_ref_1234\",\n\tpayer: {\n\t\temail: \"\u003cPAYER_EMAIL\u003e\",\n\t},\n\ttransactions: {\n\t\tpayments: [\n\t\t\t{\n\t\t\t\tamount: \"1000.00\",\n\t\t\t\tpayment_method: {\n\t\t\t\t\tid: \"master\",\n\t\t\t\t\ttype: \"credit_card\",\n\t\t\t\t\ttoken: \"\u003cCARD_TOKEN\u003e\",\n\t\t\t\t\tinstallments: 1,\n\t\t\t\t\tstatement_descriptor: \"Store name\",\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n};\n```\n\n### Step 5: Make the request\n\nUse the API object's method to make the request. For example, to make a request to the `/v1/orders` endpoint using the `order` object:\n\n```javascript\norder.create({ body }).then(console.log).catch(console.error);\n```\n\n## 📚 Documentation\n\nVisit our Dev Site for further information regarding:\n\n- Order API: [Spanish](https://mercadopago.com/developers/es/docs/order/landing) / [Portuguese](https://mercadopago.com/developers/pt/docs/order/landing) / [English](https://mercadopago.com/developers/en/docs/order/landing)\n\n## 🤝 Contributing\n\nAll contributions are welcome, ranging from people wanting to triage issues, others wanting to write documentation, to people wanting to contribute with code.\n\nPlease read and follow our [contribution guidelines](CONTRIBUTING.md). Contributions not following these guidelines will be disregarded. The guidelines are in place to make all of our lives easier and make contribution a consistent process for everyone.\n\n### Patches to version 1.x.x\n\nSince the release of version 2.0.0, version 1 is deprecated and will not be receiving new features, only bug fixes. If you need to submit PRs for that version, please do so by using develop-v1 as your base branch.\n\n## ❤️ Support\n\nIf you require technical support, please contact our support team at our developers\nsite: [English](https://www.mercadopago.com/developers/en/support/center/contact)\n/ [Portuguese](https://www.mercadopago.com/developers/pt/support/center/contact)\n/ [Spanish](https://www.mercadopago.com/developers/es/support/center/contact)\n\n## 🏻 License\n\n```\nMIT license. Copyright (c) 2024 - Mercado Pago / Mercado Libre\nFor more information, see the LICENSE file.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmercadopago%2Fsdk-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmercadopago%2Fsdk-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmercadopago%2Fsdk-nodejs/lists"}