https://github.com/plughacker/malga-node
Malga Node.js SDK
https://github.com/plughacker/malga-node
Last synced: 9 months ago
JSON representation
Malga Node.js SDK
- Host: GitHub
- URL: https://github.com/plughacker/malga-node
- Owner: plughacker
- License: mit
- Created: 2023-09-18T12:58:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-12T03:40:35.000Z (about 1 year ago)
- Last Synced: 2025-09-25T13:58:20.285Z (9 months ago)
- Language: TypeScript
- Size: 202 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Authors: AUTHORS
Awesome Lists containing this project
README
Malga Node.js SDK

Simple way to integrate with Malga
## Getting Started
Learn how to quickly integrate Malga into your project. For more details on integration, simply [click here](https://docs.malga.io/docs/api-sdks/intro).
1. First of all, you'll need to install our SDK into your project:
```bash
yarn add malga
# or
npm install malga
# or
pnpm add malga
```
2. Make your first charge in a simplified way
```ts
import { Malga } from 'malga'
const malga = new Malga({
apiKey: 'YOUR_API_KEY',
clientId: 'YOUR_CLIENT_ID',
options: { sandbox: true },
})
(async function () {
try {
const data = await malga.charges.create({
merchantId: 'YOUR_MERCHANT_ID',
amount: 100,
paymentMethod: {
type: 'credit',
installments: 1,
card: {
holderName: 'João da Silva',
number: '5453881028277600',
cvv: '170',
expirationDate: '10/2030',
},
},
})
console.log(data)
} catch (error) {
console.error(error)
}
})()
```
## Examples
If you have any doubts about the integration, you can [click here](https://github.com/plughacker/malga-node/tree/main/examples) to see some examples
## Contributing
Feel free to contribute to this project by submitting pull requests, creating documentation, or bringing ideas to make the project even better!