Disbursement refers to the act of paying out money, typically from a fund or account. ZaloPay offers disbursement feature that enables merchant transfer money to user. For example, the earned money from a campaign can be rewarded to participants, or company payout the employee's salary, etc . . .
This repository includes examples of integrations for online payments with ZaloPay Disbursement APIs. Within this Disbursify demo app, you'll find a simplified version of payroll application, complete with commented code to highlight key features and concepts of Disbursement's APIs.
Node.js 12+
- Clone this repo:
git clone https://github.com/zalopay-samples/quickstart-node-disbursement.git
- Navigate to the root directory and install dependencies:
npm install
- For quickstart, we provide pre-created account that without having to register a new merchant account, all configuration keys are placed in the
./.env
file. If you have other keys, please change them as follows
REACT_APP_APP_ID="your_APP_ID_here"
REACT_APP_PAYMENT_ID="your_PAYMENT_ID_here"
REACT_APP_KEY1="your_KEY1_here"
REACT_APP_PRIVATE_KEY="your_PRIVATE_KEY_here"
If you want a mock server, set REACT_APP_IS_MOCK=1
- Start the backend
npm run backend
- Start the frontend
npm run frontend
Visit http://localhost:3000/ to make a payroll request that pay via ZaloPay using Disbursement APIs.
To try out payment you need install and register ZaloPay Sanbox , see Test App.
This project was bootstrapped with Create React App, using the Redux and Redux Toolkit template.