bekti-payway
v0.0.8
Published
**BektiPayWay** is a lightweight Node.js & TypeScript library for integrating with the **Saweria Payment Gateway API**.
Downloads
705
Readme
🧾 BektiPayWay
BektiPayWay is a lightweight Node.js & TypeScript library for integrating with the Saweria Payment Gateway API.
📦 Installation
Install from npm:
npm i bekti-payway⚙️ Quick Start
import { BektiPayWay } from "bekti-payway";
import { PaymentType } from "bekti-payway/dist/enum/payment-type";
const bpwClient = new BektiPayWay({
merchantUUID: "yourMerchantUUID",
username: "yourMerchantName"
});
async function createPayment() {
const response = await bpwClient.RequestPayment({
amount: "1000",
orderID: "yourOrderID",
/**
** supported payment => gopay, dana, ovo, linkaja
**/
payment_type: PaymentType.Gopay,
customer_info: {
email: "[email protected]",
first_name: "customerName",
phone: "6288810008989"
}
});
/**
** use deeplink/redirect_url to complete payment
** enable webhook url from dashboard for automation
**/
console.log(response);
}💖 Donate here
| Indonesian Citizen | World Wide | |:------------------:|:-----------:| | | |
