{"id":19149251,"url":"https://github.com/restuwahyu13/midtrans-node","last_synced_at":"2025-04-09T12:09:08.478Z","repository":{"id":37965511,"uuid":"328318679","full_name":"restuwahyu13/midtrans-node","owner":"restuwahyu13","description":"Unoffficial Midtrans Payment API Client for Node JS | Alternative for Midtrans Official Module | https://midtrans.com","archived":false,"fork":false,"pushed_at":"2025-03-29T07:43:37.000Z","size":808,"stargazers_count":34,"open_issues_count":11,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T08:11:24.133Z","etag":null,"topics":["javascript","midtrans","midtrans-node","midtrans-node-client","midtrans-nodejs","midtrans-sdk","node","node-module","nodejs","npm","npm-module","npm-package","payment-gateway","payment-integration","payment-module","payment-service","paymentmethods","rest-client","typescript"],"latest_commit_sha":null,"homepage":"https://midtrans-node.netlify.app","language":"TypeScript","has_issues":true,"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/restuwahyu13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2021-01-10T06:28:42.000Z","updated_at":"2025-03-05T16:09:29.000Z","dependencies_parsed_at":"2023-02-12T23:01:32.571Z","dependency_job_id":"8071d281-5db2-4c45-acf8-038eb5ae2a57","html_url":"https://github.com/restuwahyu13/midtrans-node","commit_stats":{"total_commits":239,"total_committers":4,"mean_commits":59.75,"dds":0.4518828451882845,"last_synced_commit":"8ad2a90102de64944a0dc87d98aad67ffcbebd99"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fmidtrans-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fmidtrans-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fmidtrans-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restuwahyu13%2Fmidtrans-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/restuwahyu13","download_url":"https://codeload.github.com/restuwahyu13/midtrans-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036067,"owners_count":21037092,"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":["javascript","midtrans","midtrans-node","midtrans-node-client","midtrans-nodejs","midtrans-sdk","node","node-module","nodejs","npm","npm-module","npm-package","payment-gateway","payment-integration","payment-module","payment-service","paymentmethods","rest-client","typescript"],"created_at":"2024-11-09T08:07:21.868Z","updated_at":"2025-04-09T12:09:08.457Z","avatar_url":"https://github.com/restuwahyu13.png","language":"TypeScript","readme":"# Midtrans Node\n\n[![Build Status](https://travis-ci.org/restuwahyu13/midtrans-node.svg?branch=main)](https://travis-ci.org/restuwahyu13/midtrans-node) [![Coverage Status](https://coveralls.io/repos/github/restuwahyu13/nodejs-midtrans-client/badge.svg?branch=main)](https://coveralls.io/github/restuwahyu13/nodejs-midtrans-client?branch=main) [![codebeat badge](https://codebeat.co/badges/dcceca7a-392d-4abc-888c-e915c11e7b41)](https://codebeat.co/projects/github-com-restuwahyu13-midtrans-node-main) [![CodeFactor](https://www.codefactor.io/repository/github/restuwahyu13/midtrans-node/badge)](https://www.codefactor.io/repository/github/restuwahyu13/midtrans-node) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/fb82e67ae34d4fc8819ee3949aad35f4)](https://www.codacy.com/gh/restuwahyu13/midtrans-node/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=restuwahyu13/midtrans-node\u0026amp;utm_campaign=Badge_Grade) ![node-current](https://img.shields.io/node/v/midtrans-node-client?style=flat-square) ![npm](https://img.shields.io/npm/dm/midtrans-node-client) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/restuwahyu13/midtrans-node/blob/main/CONTRIBUTING.md)\n\n- [Installation](#installation)\n- [API Documentation](#api-documentation)\n    + [Midtrans API Library Collections](#midtrans-api-library-collections)\n    + [Core API Documentation](#core-api-documentation)\n    + [Iris API Documentation](#iris-api-documentation)\n    + [Snap API Documentation](#snap-api-documentation)\n- [API Reference](#api-reference)\n  * [Core API Services](#core-api-services)\n    + [charge](#charge-parameter-object---promise)\n    + [capture](#capture-parameter-object---promise)\n    + [cardRegister](#cardregister-parameter-object---promise)\n    + [cardToken](#cardtoken-parameter-object---promise)\n    + [cardPointInquiry](#cardpointinquiry-tokenid-string---promise)\n  * [Iris API Services](#iris-api-services)\n    + [ping](#ping-promise)\n    + [createBeneficiaries](#createbeneficiaries-parameter-object--promise)\n    + [updateBeneficiaries](#updatebeneficiaries-aliasname-string-parameter-object--promise)\n    + [getBeneficiaries](#getbeneficiaries-promise)\n    + [createPayouts](#createpayouts-parameter-object--promise)\n    + [approvePayouts](#approvepayouts-parameter-object--promise)\n    + [rejectPayouts](#rejectpayouts-parameter-object--promise)\n    + [getPayoutDetails](#getpayoutdetails-referenceno-string--promise)\n    + [getTransactionHistory](#gettransactionhistory-parameter-string-promise)\n    + [getTopupChannels](#gettopupchannels-promise)\n    + [getBalance](#getbalance-promise)\n    + [getFacilitatorBankAccounts](#getfacilitatorbankaccounts-promise)\n    + [getFacilitatorBalance](#getfacilitatorbalance-bankaccountid-string--promise)\n    + [getBeneficiaryBanks](#getbeneficiarybanks-promise)\n    + [validateBankAccount](#validatebankaccount-parameter-object--promise)\n  * [Snap API Services](#snap-api-services)\n    + [createTransaction](#createtransaction-parameter-object--promise)\n    + [createTransactionToken](#createtransactiontoken-parameter-object--promise)\n    + [createTransactionRedirectUrl](#createtransactionredirecturl-parameter-object--promise)\n  * [Transaction API Services](#transaction-api-services)\n    + [status](#status-transactionid-string--promise)\n    + [statusb2b](#statusb2b-transactionid-string--promise)\n    + [approve](#approve-transactionid-string--promise)\n    + [deny](#deny-transactionid-string--promise)\n    + [cancel](#cancel-transactionid-string--promise)\n    + [expire](#expire-transactionid-string--promise)\n    + [refund](#refund-transactionid-string-parameter-object-promise)\n    + [refundDirect](#refunddirect-transactionid-string-parameter-object-promise)\n    + [notification](#notification-notification-object--promise)\n- [Custome Usage](#custome-usage)\n    + [charge](#charge-parameter-object---promise)\n    + [createTransaction](#createtransaction-parameter-object--promise)\n- [Custome Reference](#custome-reference)\n- [Testing](#testing)\n- [Bugs](#bugs)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\n```bash\nnpm install midtrans-node-client -S or yarn add midtrans-node-client -S\n```\n\n## API Documentation\n\n- #### Midtrans API Library Collections\n\n   follow this link for more package library exist for any language [Midtrans API Library](https://docs.midtrans.com/en/technical-reference/library-plugin) official or unofficial\n\n- #### Core API Documentation\n  \n  follow this link for more related information [Core Midtrans API Reference](https://api-docs.midtrans.com/) official\n  \n- #### Iris API Documentation\n\n  follow this link for more related information [Iris Midtrans API Reference](https://iris-docs.midtrans.com/) official\n\n- #### Snap API Documentation\n\n  follow this link for more related information [Snap Midtrans API Reference](https://snap-docs.midtrans.com/) official\n\n## API Reference\n\n### Core API Services\n\n  - #### charge( parameter: object ) : Promise\n  \n    | Method | Request | Description                                                            | \n    | ------ | ------- | ---------------------------------------------------------------------- |\n    | charge | *POST*  | Create transaction with various available payment methods and features |\n  \n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const core = new MidtransClient.CoreApi({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       core.charge({\n        \tpayment_type: 'bank_transfer',\n          bank_transfer: { bank: 'bca' },\n          transaction_details: {\n            order_id: uuidv4(),\n            gross_amount: 100000\n          },\n          item_details: [\n            {\n             id: uuidv4(),\n             name: 'ayam bakar sambal balado'\n             quantity: 2\n             price: 25000\n            },\n            {\n             id: uuidv4(),\n             name: 'sop iga bakar daging lunak'\n             quantity: 1\n             price: 30000\n            },\n            {\n             id: uuidv4(),\n             name: 'just alpuckat'\n             quantity: 2\n             price: 10000\n            }\n          ],\n          customer_details: {\n          \tfirst_name: 'restu wahyu',\n            last_name: ' saputra',\n            email: 'restuwahyu13@zetmail.com',\n            phone: '087820154350',\n            billing_address:  {\n            \taddress: 'jl.sibuta gua hantu no.120',\n              city: 'Depok',\n              postal_code: '16436'\n            }\n          }\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const core = new MidtransClient.CoreApi({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       core.charge({\n        \tpayment_type: 'bank_transfer',\n          bank_transfer: { bank: 'bca' },\n          transaction_details: {\n            order_id: uuidv4(),\n            gross_amount: 100000\n          },\n          item_details: [\n            {\n             id: uuidv4(),\n             name: 'ayam bakar sambal balado'\n             quantity: 2\n             price: 25000\n            },\n            {\n             id: uuidv4(),\n             name: 'sop iga bakar daging lunak'\n             quantity: 1\n             price: 30000\n            },\n            {\n             id: uuidv4(),\n             name: 'just alpuckat'\n             quantity: 2\n             price: 20000\n            }\n          ],\n          customer_details: {\n          \tfirst_name: 'restu wahyu',\n            last_name: ' saputra',\n            email: 'restuwahyu13@zetmail.com',\n            phone: '087820154350',\n            billing_address:  {\n            \taddress: 'jl.sibuta gua hantu no.120',\n              city: 'Depok',\n              postal_code: '16436'\n            }\n          }\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### capture( parameter: object ) : Promise\n\n    | Method  | Request | Description                                        |\n    | ------- | ------- | -------------------------------------------------- |\n    | capture | *POST*  | Capture an authorized transaction for card payment |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n               \n       const core = new MidtransClient.CoreApi({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       core.capture({\n          transaction_id: \"be4f3e44-d6ee-4355-8c64-c1d1dc7f4590\",\n          gross_amount: 100000\n        })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const core = new MidtransClient.CoreApi({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       core.capture({\n         transaction_id: \"be4f3e44-d6ee-4355-8c64-c1d1dc7f4590\",\n         gross_amount: 100000\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### cardRegister( parameter: object ) : Promise\n\n    | Method       | Request | Description                                                                                | \n    | ------------ | ------- | ------------------------------------------------------------------------------------------ |\n    | cardRegister | *GET*   | Register card information (card number and expiry) to be used for two clicks and one click |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const core = new MidtransClient.CoreApi({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       core.cardRegister({\n\t\t\t   card_number: '5421813858532415',\n\t\t\t   card_exp_month: '10',\n\t\t\t   card_exp_year: '2024',\n\t\t\t   card_cvv: '426',\n\t\t\t   client_key: core.apiConfig.get().clientKey\n\t\t   })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const core = new MidtransClient.CoreApi({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       core.cardRegister({\n\t\t\t   card_number: '5421813858532415',\n\t\t\t   card_exp_month: '10',\n\t\t\t   card_exp_year: '2024',\n\t\t\t   card_cvv: '426',\n\t\t\t   client_key: core.apiConfig.get().clientKey\n\t\t   })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### cardToken( parameter: object ) : Promise\n\n    | Method    | Request | Description                                           |\n    | --------- | ------- | ----------------------------------------------------- |\n    | cardToken | *GET*   | Tokenize Credit Card information before being charged |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const core = new MidtransClient.CoreApi({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       core.cardToken({\n\t\t\t  card_number: '5421813858532415',\n\t\t\t  card_exp_month: '10',\n\t\t\t  card_exp_year: '2024',\n\t\t\t  card_cvv: '426',\n\t\t\t  client_key: core.apiConfig.get().clientKey\n\t\t  })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const core = new MidtransClient.CoreApi({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       core.cardToken({\n\t\t\t  card_number: '5421813858532415',\n\t\t\t  card_exp_month: '10',\n\t\t\t  card_exp_year: '2024',\n\t\t\t  card_cvv: '426',\n\t\t\t  client_key: core.apiConfig.get().clientKey\n\t\t  })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### cardPointInquiry( tokenId: string ) : Promise\n\n    | Method           | Request | Description                                              |\n    | ---------------- | ------- | -------------------------------------------------------- |\n    | cardPointInquiry | *GET*   | Get the point balance of the card in denomination amount |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const core = new MidtransClient.CoreApi({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       core.cardPointInquiry(\"526422-4659-80f25158-71dd-4a87-aad2-3c37689e6bfd\")\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const core = new MidtransClient.CoreApi({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       core.cardPointInquiry(\"526422-4659-80f25158-71dd-4a87-aad2-3c37689e6bfd\")\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n### Iris API Services\n\n  + #### ping(): Promise\n\n    | Method | Request | Description                                 |\n    | ------ | ------- | ------------------------------------------- |\n    | ping   | *GET*   | Returns pong message for monitoring purpose |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.ping()\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.ping()\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### createBeneficiaries( parameter: object ): Promise \n\n    | Method              | Request | Description                                                                              |\n    | ------------------- | ------- | ---------------------------------------------------------------------------------------- |\n    | createBeneficiaries | *POST*  | create a new beneficiary information for quick access on the payout page in Iris Portal. |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.createBeneficiaries({\n\t\t\t\tname: 'Restu Wahyu Saputra',\n\t\t\t\taccount: '5432198760',\n\t\t\t\tbank: 'bca',\n\t\t\t\talias_name: 'restu',\n\t\t\t\temail: 'restuwahyu13@zetmail.com'\n\t\t\t})\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.createBeneficiaries({\n\t\t\t\t name: 'Restu Wahyu Saputra',\n\t\t\t\t account: '5432198760',\n\t\t\t\t bank: 'bca',\n\t\t\t\t alias_name: 'restu',\n\t\t\t\t email: 'restuwahyu13@zetmail.com'\n\t\t\t })\n        .then(console.log)\n        .catch(console.error)\n    ```\n\n  + #### updateBeneficiaries( aliasName: string, parameter: object ): Promise  \n\n    | Method              | Request | Description                                                 |\n    | ------------------- | ------- | ----------------------------------------------------------- |\n    | updateBeneficiaries | *PATCH* | Update an existing beneficiary identified by its alias_name |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.updateBeneficiaries('restu',{\n\t\t\t\tname: 'Restu Wahyu Saputra',\n\t\t\t\taccount: '5432198760',\n\t\t\t\tbank: 'bca',\n\t\t\t\talias_name: 'restu',\n\t\t\t\temail: 'restuwahyu13@zetmail.com'\n\t\t\t})\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.updateBeneficiaries('restu',{\n\t\t\t\t name: 'Restu Wahyu Saputra',\n\t\t\t\t account: '5432198760',\n\t\t\t\t bank: 'bca',\n\t\t\t\t alias_name: 'restu',\n\t\t\t\t email: 'restuwahyu13@zetmail.com'\n\t\t\t })\n        .then(console.log)\n        .catch(console.error)\n    ```\n\n  + #### getBeneficiaries(): Promise \n\n    | Method           | Request | Description                                          |\n    | ---------------- | ------- | ---------------------------------------------------- |\n    | getBeneficiaries | *GET*   | Fetch list of all beneficiaries saved in Iris Portal |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getBeneficiaries()\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getBeneficiaries()\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### createPayouts( parameter: object ): Promise\n\n    | Method        | Request | Description                                                                             |\n    | ------------- | ------- | --------------------------------------------------------------------------------------- |\n    | createPayouts | *POST*  | Creator to create a payout. It can be used for single payout and also multiple payouts. |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.createPayouts({\n        payouts: [\n           {\n             beneficiary_name: 'Restu Wahyu Saputra',\n             beneficiary_account: '5432198760',\n             beneficiary_bank: 'bca',\n             beneficiary_email: 'restuwahyu13@zetmail.com',\n             amount: '100000',\n             notes: 'Payout 31 January 2021'\n           }\n         ]\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.createPayouts({\n        payouts: [\n           {\n             beneficiary_name: 'Restu Wahyu Saputra',\n             beneficiary_account: '5432198760',\n             beneficiary_bank: 'bca',\n             beneficiary_email: 'restuwahyu13@zetmail.com',\n             amount: '100000',\n             notes: 'Payout 31 January 2021'\n           }\n         ]\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### approvePayouts( parameter: object ): Promise\n\n    | Method         | Request | Description                                  |\n    | -------------- | ------- | -------------------------------------------- |\n    | approvePayouts | *POST*  | Apporver to approve multiple payout request. |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.approvePayouts({\n\t\t\t\treference_nos: ['20543502291'],\n\t\t\t\totp: '335163'\n\t\t\t})\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.approvePayouts({\n\t\t\t\treference_nos: ['20543502291'],\n\t\t\t\totp: '335163'\n\t\t\t})\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### rejectPayouts( parameter: object ): Promise\n\n    | Method        | Request | Description                                 |\n    | ------------- | ------- | ------------------------------------------- |\n    | rejectPayouts | *POST*  | Apporver to reject multiple payout request. |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.rejectPayouts({\n\t\t\t  reference_nos: ['eyad5swd9b026c5kmr'],\n\t\t\t  reject_reason: 'Reason to reject payouts'\n\t\t  })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.rejectPayouts({\n\t\t\t  reference_nos: ['eyad5swd9b026c5kmr'],\n\t\t\t  reject_reason: 'Reason to reject payouts'\n\t\t  })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### getPayoutDetails( referenceNo: string ): Promise\n\n    | Method           | Request | Description                    |\n    | ---------------- | ------- | ------------------------------ |\n    | getPayoutDetails | *GET*   | Get details of a single payout |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.rejectPayouts({\n\t\t\t  reference_nos: ['eyad5swd9b026c5kmr'],\n\t\t\t  reject_reason: 'Reason to reject payouts'\n\t\t  })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.rejectPayouts({\n\t\t\t  reference_nos: ['eyad5swd9b026c5kmr'],\n\t\t\t  reject_reason: 'Reason to reject payouts'\n\t\t  })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### getTransactionHistory( parameter: string): Promise\n\n    | Method                | Request | Description                                |\n    | --------------------- | ------- | ------------------------------------------ |\n    | getTransactionHistory | *GET*   | List all transactions history for a month. |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getTransactionHistory({ from_date: \"2020-11-01\", to_date: \"2020-12-28\" })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getTransactionHistory({ from_date: \"2020-11-01\", to_date: \"2020-12-28\" })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### getTopupChannels(): Promise\n\n    | Method           | Request | Description                                               |\n    | ---------------- | ------- | --------------------------------------------------------- |\n    | getTopupChannels | *GET*   | Provide top up information channel for Aggregator Partner |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getTopupChannels()\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getTopupChannels()\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### getBalance(): Promise\n\n    | Method     | Request | Description         |\n    | ---------- | ------- | ------------------- |\n    | getBalance | *GET*   | get current balance |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getBalance()\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getBalance()\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### getFacilitatorBankAccounts(): Promise\n\n    | Method                     | Request | Description                                                   |\n    | -------------------------- | ------- | ------------------------------------------------------------- |\n    | getFacilitatorBankAccounts | *GET*   | Show list of registered bank accounts for facilitator partner |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getFacilitatorBankAccounts()\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getFacilitatorBankAccounts()\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### getFacilitatorBalance( bankAccountId: string ): Promise\n\n    | Method                | Request | Description                                                      |\n    | --------------------- | ------- | ---------------------------------------------------------------- |\n    | getFacilitatorBalance | *GET*   | Get current balance information of your registered bank account. |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getFacilitatorBalance('mandiri38fd1f0e')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getFacilitatorBalance('mandiri38fd1f0e')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### getBeneficiaryBanks(): Promise\n\n    | Method              | Request | Description                           |\n    | ------------------- | ------- | ------------------------------------- |\n    | getBeneficiaryBanks | *GET*   | Show list of supported banks in IRIS. |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getBeneficiaryBanks()\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.getBeneficiaryBanks()\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### validateBankAccount( parameter: object ): Promise\n\n    | Method              | Request | Description                                                        |\n    | ------------------- | ------- | ------------------------------------------------------------------ |\n    | validateBankAccount | *GET*   | Check if an account is valid, if valid return account information. |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.validateBankAccount({ bank: 'danamon', account: '000001137298' )\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       \n       const iris = new MidtransClient.Iris({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       iris.validateBankAccount({ bank: 'danamon', account: '000001137298' )\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n### Snap API Services\n\n  + #### createTransaction( parameter: object ): Promise\n\n    | Method            | Request | Description                                                       | \n    | ----------------- | ------- | ----------------------------------------------------------------- |\n    | createTransaction | *POST*  | create transaction payment using snap integaration payment method |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.createTransaction({\n        \tpayment_type: 'bank_transfer',\n          bank_transfer: { bank: 'bca' },\n          transaction_details: {\n            order_id: uuidv4(),\n            gross_amount: 100000\n          },\n          item_details: [\n            {\n             id: uuidv4(),\n             name: 'ayam bakar sambal balado'\n             quantity: 2\n             price: 25000\n            },\n            {\n             id: uuidv4(),\n             name: 'sop iga bakar daging lunak'\n             quantity: 1\n             price: 30000\n            },\n            {\n             id: uuidv4(),\n             name: 'just alpuckat'\n             quantity: 2\n             price: 10000\n            }\n          ],\n          customer_details: {\n          \tfirst_name: 'restu wahyu',\n            last_name: ' saputra',\n            email: 'restuwahyu13@zetmail.com',\n            phone: '087820154350',\n            billing_address:  {\n            \taddress: 'jl.sibuta gua hantu no.120',\n              city: 'Depok',\n              postal_code: '16436'\n            }\n          }\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.createTransaction({\n        \tpayment_type: 'bank_transfer',\n          bank_transfer: { bank: 'bca' },\n          transaction_details: {\n            order_id: uuidv4(),\n            gross_amount: 100000\n          },\n          item_details: [\n            {\n             id: uuidv4(),\n             name: 'ayam bakar sambal balado'\n             quantity: 2\n             price: 25000\n            },\n            {\n             id: uuidv4(),\n             name: 'sop iga bakar daging lunak'\n             quantity: 1\n             price: 30000\n            },\n            {\n             id: uuidv4(),\n             name: 'just alpuckat'\n             quantity: 2\n             price: 20000\n            }\n          ],\n          customer_details: {\n          \tfirst_name: 'restu wahyu',\n            last_name: ' saputra',\n            email: 'restuwahyu13@zetmail.com',\n            phone: '087820154350',\n            billing_address:  {\n            \taddress: 'jl.sibuta gua hantu no.120',\n              city: 'Depok',\n              postal_code: '16436'\n            }\n          }\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### createTransactionToken( parameter: object ): Promise\n\n    | Method                 | Request | Description                                                             |\n    | ---------------------- | ------- | ----------------------------------------------------------------------- |\n    | createTransactionToken | *POST*  | create transaction payment token using snap integaration payment method | \n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.createTransactionToken({\n        \tpayment_type: 'bank_transfer',\n          bank_transfer: { bank: 'bca' },\n          transaction_details: {\n            order_id: uuidv4(),\n            gross_amount: 100000\n          },\n          item_details: [\n            {\n             id: uuidv4(),\n             name: 'ayam bakar sambal balado'\n             quantity: 2\n             price: 25000\n            },\n            {\n             id: uuidv4(),\n             name: 'sop iga bakar daging lunak'\n             quantity: 1\n             price: 30000\n            },\n            {\n             id: uuidv4(),\n             name: 'just alpuckat'\n             quantity: 2\n             price: 10000\n            }\n          ],\n          customer_details: {\n          \tfirst_name: 'restu wahyu',\n            last_name: ' saputra',\n            email: 'restuwahyu13@zetmail.com',\n            phone: '087820154350',\n            billing_address:  {\n            \taddress: 'jl.sibuta gua hantu no.120',\n              city: 'Depok',\n              postal_code: '16436'\n            }\n          }\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.createTransactionToken({\n        \tpayment_type: 'bank_transfer',\n          bank_transfer: { bank: 'bca' },\n          transaction_details: {\n            order_id: uuidv4(),\n            gross_amount: 100000\n          },\n          item_details: [\n            {\n             id: uuidv4(),\n             name: 'ayam bakar sambal balado'\n             quantity: 2\n             price: 25000\n            },\n            {\n             id: uuidv4(),\n             name: 'sop iga bakar daging lunak'\n             quantity: 1\n             price: 30000\n            },\n            {\n             id: uuidv4(),\n             name: 'just alpuckat'\n             quantity: 2\n             price: 20000\n            }\n          ],\n          customer_details: {\n          \tfirst_name: 'restu wahyu',\n            last_name: ' saputra',\n            email: 'restuwahyu13@zetmail.com',\n            phone: '087820154350',\n            billing_address:  {\n            \taddress: 'jl.sibuta gua hantu no.120',\n              city: 'Depok',\n              postal_code: '16436'\n            }\n          }\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### createTransactionRedirectUrl( parameter: object ): Promise\n\n    | Method                       | Request | Description                                                                |\n    | ---------------------------- | ------- | -------------------------------------------------------------------------- |\n    | createTransactionRedirectUrl | *POST*  | create transaction payment redirect using snap integaration payment method | \n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.createTransactionRedirectUrl({\n        \tpayment_type: 'bank_transfer',\n          bank_transfer: { bank: 'bca' },\n          transaction_details: {\n            order_id: uuidv4(),\n            gross_amount: 100000\n          },\n          item_details: [\n            {\n             id: uuidv4(),\n             name: 'ayam bakar sambal balado'\n             quantity: 2\n             price: 25000\n            },\n            {\n             id: uuidv4(),\n             name: 'sop iga bakar daging lunak'\n             quantity: 1\n             price: 30000\n            },\n            {\n             id: uuidv4(),\n             name: 'just alpuckat'\n             quantity: 2\n             price: 10000\n            }\n          ],\n          customer_details: {\n          \tfirst_name: 'restu wahyu',\n            last_name: ' saputra',\n            email: 'restuwahyu13@zetmail.com',\n            phone: '087820154350',\n            billing_address:  {\n            \taddress: 'jl.sibuta gua hantu no.120',\n              city: 'Depok',\n              postal_code: '16436'\n            }\n          }\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.createTransactionRedirectUrl({\n        \tpayment_type: 'bank_transfer',\n          bank_transfer: { bank: 'bca' },\n          transaction_details: {\n            order_id: uuidv4(),\n            gross_amount: 100000\n          },\n          item_details: [\n            {\n             id: uuidv4(),\n             name: 'ayam bakar sambal balado'\n             quantity: 2\n             price: 25000\n            },\n            {\n             id: uuidv4(),\n             name: 'sop iga bakar daging lunak'\n             quantity: 1\n             price: 30000\n            },\n            {\n             id: uuidv4(),\n             name: 'just alpuckat'\n             quantity: 2\n             price: 20000\n            }\n          ],\n          customer_details: {\n          \tfirst_name: 'restu wahyu',\n            last_name: ' saputra',\n            email: 'restuwahyu13@zetmail.com',\n            phone: '087820154350',\n            billing_address:  {\n            \taddress: 'jl.sibuta gua hantu no.120',\n              city: 'Depok',\n              postal_code: '16436'\n            }\n          }\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n### Transaction API Services\n\n  + #### status( transactionId: string ): Promise\n\n    | Method | Request | Description                                                                     |\n    | ------ | ------- | ------------------------------------------------------------------------------- |\n    | status | *GET*   | Get information status of a transaction with certain order_id or transaction_id |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.status('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.status('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### statusb2b( transactionId: string ): Promise\n\n    | Method    | Request | Description                                                                                       |\n    | --------- | ------- | ------------------------------------------------------------------------------------------------- |\n    | statusb2b | *GET*   | Get information status of multiple B2B transactions related to certain order_id or transaction_id |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.status('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.statusb2b('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### approve( transactionId: string ): Promise\n\n    | Method  | Request | Description                                                                                                           |\n    | ------- | ------- | --------------------------------------------------------------------------------------------------------------------- |\n    | approve | *POST*  | Approve a transaction with certain order_id or transaction_id which gets challenge status from Fraud Detection System |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.approve('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.approve('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### deny( transactionId: string ): Promise\n\n    | Method | Request | Description                                                                                                        |\n    | ------ | ------- | ------------------------------------------------------------------------------------------------------------------ |\n    | deny   | *POST*  | Deny a transaction with certain order_id or transaction_id which gets challenge status from Fraud Detection System |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.deny('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.deny('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### cancel( transactionId: string ): Promise\n\n    | Method | Request | Description                                                                            |\n    | ------ | ------- | -------------------------------------------------------------------------------------- |\n    | cancel | *POST*  | Cancel a transaction with certain order_id or transaction_id before settlement process |\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.cancel('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.cancel('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### expire( transactionId: string ): Promise\n\n    | Method | Request | Description                                                         | \n    | ------ | ------- | ------------------------------------------------------------------- |\n    | expire | *POST*  | Update order_id or transaction_id with pending status to be expired |\n  \n      + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.expire('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.expire('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then(console.log)\n       .catch(console.error)\n    ```\n  \n  + #### refund( transactionId: string, parameter?: object): Promise\n\n    | Method | Request | Description                                                           |\n    | ------ | ------- | --------------------------------------------------------------------- |\n    | refund | *POST*  | Update order_id or transaction_id with settlement status to be refund |\n\n      + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.refund('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590', {\n         amount: 1000000, \n         reason: 'Reason to refund payouts'\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.refund('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590', {\n         amount: 1000000, \n         reason: 'Reason to refund payouts'\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### refundDirect( transactionId: string, parameter?: object): Promise\n\n    | Method       | Request | Description                                                                                                    |\n    | ------------ | ------- | -------------------------------------------------------------------------------------------------------------- |\n    | refundDirect | *POST*  | Attempt to send refund to bank or payment provider and update the transaction status to refund if it succeeded |\n\n      + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.refundDirect('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590', {\n         amount: 1000000, \n         reason: 'Reason to refund direct payouts'\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.refundDirect('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590', {\n         amount: 1000000, \n         reason: 'Reason to direct payouts'\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n  + #### notification( notification: object ): Promise\n\n    | Method       | Request     | Description                                                                                              |\n    | ------------ | ----------- | -------------------------------------------------------------------------------------------------------- |\n    | notification | *undefined* | additional mechanism we provide to verify the content and the origin of the notification is to challenge |\n\n      + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       let getResponse;\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n        snap.transaction.status('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then((res) =\u003e getResponse = res)\n       .catch(console.error)\n       \n       snap.transaction.notification(JSON.stringify(getResponse))\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       let getResponse;\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.transaction.status('be4f3e44-d6ee-4355-8c64-c1d1dc7f4590')\n       .then((res) =\u003e getResponse = res)\n       .catch(console.error)\n       \n       snap.transaction.notification(JSON.stringify(getResponse))\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n### Custome Usage\n  \n  For custom usage already using type definitions for ease of use and for all functions that use parameters all have type definitions.\n\n  - #### charge( parameter: object ) : Promise\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const core = new MidtransClient.CoreApi({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       core.charge({\n          chargeBankTransfer: {\n            payment_type: 'bank_transfer',\n            bank_transfer: { bank: 'bca' },\n            transaction_details: {\n              order_id: uuidv4(),\n              gross_amount: 100000\n            },\n            item_details: [\n              {\n               id: uuidv4(),\n               name: 'ayam bakar sambal balado'\n               quantity: 2\n               price: 25000\n              },\n              {\n               id: uuidv4(),\n               name: 'sop iga bakar daging lunak'\n               quantity: 1\n               price: 30000\n              },\n              {\n               id: uuidv4(),\n               name: 'just alpuckat'\n               quantity: 2\n               price: 10000\n              }\n            ],\n            customer_details: {\n              first_name: 'restu wahyu',\n              last_name: ' saputra',\n              email: 'restuwahyu13@zetmail.com',\n              phone: '087820154350',\n              billing_address:  {\n                address: 'jl.sibuta gua hantu no.120',\n                city: 'Depok',\n                postal_code: '16436'\n              }\n            }\n         }\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const core = new MidtransClient.CoreApi({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       core.charge({\n          chargeBankTransfer: {\n            payment_type: 'bank_transfer',\n            bank_transfer: { bank: 'bca' },\n            transaction_details: {\n              order_id: uuidv4(),\n              gross_amount: 100000\n            },\n            item_details: [\n              {\n               id: uuidv4(),\n               name: 'ayam bakar sambal balado'\n               quantity: 2\n               price: 25000\n              },\n              {\n               id: uuidv4(),\n               name: 'sop iga bakar daging lunak'\n               quantity: 1\n               price: 30000\n              },\n              {\n               id: uuidv4(),\n               name: 'just alpuckat'\n               quantity: 2\n               price: 10000\n              }\n            ],\n            customer_details: {\n              first_name: 'restu wahyu',\n              last_name: ' saputra',\n              email: 'restuwahyu13@zetmail.com',\n              phone: '087820154350',\n              billing_address:  {\n                address: 'jl.sibuta gua hantu no.120',\n                city: 'Depok',\n                postal_code: '16436'\n              }\n            }\n         }\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n  \n  - #### createTransaction( parameter: object ): Promise\n\n    + ##### Example Usage Using CommonJS\n  \n    ```javascript\n       const { MidtransClient } = require('midtrans-node-client')\n       const { v4: uuidv4 } = require('uuid')\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.createTransaction({\n          BcaVirtualAccount: {\n            payment_type: 'bank_transfer',\n            bank_transfer: { bank: 'bca' },\n            transaction_details: {\n              order_id: uuidv4(),\n              gross_amount: 100000\n            },\n            item_details: [\n              {\n               id: uuidv4(),\n               name: 'ayam bakar sambal balado'\n               quantity: 2\n               price: 25000\n              },\n              {\n               id: uuidv4(),\n               name: 'sop iga bakar daging lunak'\n               quantity: 1\n               price: 30000\n              },\n              {\n               id: uuidv4(),\n               name: 'just alpuckat'\n               quantity: 2\n               price: 20000\n              }\n            ],\n            customer_details: {\n              first_name: 'restu wahyu',\n              last_name: ' saputra',\n              email: 'restuwahyu13@zetmail.com',\n              phone: '087820154350',\n              billing_address:  {\n                address: 'jl.sibuta gua hantu no.120',\n                city: 'Depok',\n                postal_code: '16436'\n              }\n            }\n         }\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n\n    + ##### Example Usage Using ES6\n  \n    ```javascript\n       import { MidtransClient } from 'midtrans-node-client'\n       import { v4 as uuidv4 } from 'uuid'\n       \n       const snap = new MidtransClient.Snap({\n         isProduction: process.env.DEVELOPMENT,\n         serverKey: process.env.SERVER_KEY,\n         clientKey: process.env.CLIENT_KEY\n       })\n        \n       snap.createTransaction({\n          BcaVirtualAccount: {\n            payment_type: 'bank_transfer',\n            bank_transfer: { bank: 'bca' },\n            transaction_details: {\n              order_id: uuidv4(),\n              gross_amount: 100000\n            },\n            item_details: [\n              {\n               id: uuidv4(),\n               name: 'ayam bakar sambal balado'\n               quantity: 2\n               price: 25000\n              },\n              {\n               id: uuidv4(),\n               name: 'sop iga bakar daging lunak'\n               quantity: 1\n               price: 30000\n              },\n              {\n               id: uuidv4(),\n               name: 'just alpuckat'\n               quantity: 2\n               price: 20000\n              }\n            ],\n            customer_details: {\n              first_name: 'restu wahyu',\n              last_name: ' saputra',\n              email: 'restuwahyu13@zetmail.com',\n              phone: '087820154350',\n              billing_address:  {\n                address: 'jl.sibuta gua hantu no.120',\n                city: 'Depok',\n                postal_code: '16436'\n              }\n            }\n         }\n       })\n       .then(console.log)\n       .catch(console.error)\n    ```\n### Custome Reference\n\n- #### Custome Core API Service - charge Request\n\n  ```javascript\n  chargeBankTransfer?: ChargeBankTransfer\n\tchargeCreditCard?: ChargeCreditCard\n\tchargeNon3DS?: ChargeNon3DS\n\tcharge3DS?: Charge3DS\n\tchargePermata?: ChargePermataVirtualAccount\n\tchargeBca?: ChargeBcaVirtualAccount\n\tchargeMandiri?: ChargeMandiriVirtualAccount\n\tchargeBni?: ChargeBniVirtualAccount\n\tchargeBri?: ChargeBriVirtualAccount\n\tchargeBcaKlikPay?: ChargeBcaKlikpay\n\tchargeKlikBca?: ChargeKlikBca\n\tchargeBriEpay?: ChargeBriEpay\n\tchargeChimbClick?: ChargeCimbClick\n\tchargeDanamonOnline?: ChargeDanamonOnline\n\tchargeQris?: ChargeQris\n\tchargeGopay?: ChargeGopay\n\tchargeShopeePay?: ChargeShoopePay\n\tchargeIndomaret?: ChargeIndomaret\n\tchargeAlfamart?: ChargeAlfamart\n\tchargeAkuLaku?: ChargeAkuLaku\n  ```\n- #### Custome Snap Service - createTransaction Request\n\n  ```javascript\n \tsnapCreditCard?: SnapCreditCard\n\tsnapFull?: SnapFull\n\tsnapBca?: SnapBcaVirtualAccount\n\tsnapPermata?: SnapPermataVirtualAccount\n\tsnapBni?: SnapBniVirtualAccount\n\tsnapBri?: SnapBriVirtualAccount\n\tsnapMandiri?: SnapMandiriVirtualAccount\n\tsnapGopay?: SnapGopay\n\tsnapKlikBca?: SnapKlikBCA\n\tsnapBcaKlikPay?: SnapBcaKlikPay\n\tsnapCimbKlik?: SnapCimbKlik\n\tsnapDanamonOnline?: SnapDanamonOnlineBanking\n\tsnapBriEpay?: SnapBriEpay\n\tsnapIndomaret?: SnapIndomaret\n\tsnapAlfamart?: SnapAlfamart\n\tsnapAkuLaku?: SnapAkuLaku\n\tsnapShopePay?: SnapShopeePay\n  ```\n\n### Testing\n\n- Testing Via Local\n\n  ```sh\n  npm test or make test\n  ```\n\n- Testing Via Local And Build\n\n  ```sh\n  make build\n  ```\n\n- Testing Via Docker\n\n  ```sh\n  docker build -t midtrans-node or make dkb tag=midtrans-node\n  ```\n\n### Bugs\n\nFor information on bugs related to package libraries, please visit [here](https://github.com/restuwahyu13/midtrans-node/issues)\n\n### Contributing\n\nWant to make **Midtrans Node** more perfect ? Let's contribute and follow the [contribution guide.](https://github.com/restuwahyu13/midtrans-node/blob/main/CONTRIBUTING.md)\n\n### License\n\n- [MIT License](https://github.com/restuwahyu13/streambox-collection/blob/main/LICENSE.md)\n\n\u003cp align=\"right\" style=\"padding: 5px; border-radius: 100%; background-color: red; font-size: 2rem;\"\u003e\n  \u003cb\u003e\u003ca href=\"#midtrans-node\"\u003eBACK TO TOP\u003c/a\u003e\u003c/b\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestuwahyu13%2Fmidtrans-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frestuwahyu13%2Fmidtrans-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestuwahyu13%2Fmidtrans-node/lists"}