payed-terminal
v0.0.6
Published
Payed terminal js sdk
Downloads
54
Readme
How to install
npm install --save payed-terminal
How to use
- Import the library
import { PayedTerminal } from "payed-terminal"
- Create an instance using your application id
const appId = "your-app-id" //gotten from the payed web portal
const terminalInstance = new PayedTerminal(appId);
- Initiate a transaction
const transactionReference = "your-unique-transaction-reference"
const totalPrice = 120 //your price in Naira
//optionally call this endpoint to append lines to the printout
terminalInstance.appendToPrintOutOnSuccess({
"Customer": "09064082341"
})
terminalInstance.initiatePayment(transactionReference, totalPrice)
- You can retrieve the terminal id
const terminalId = terminalInstance.getTerminalId()