Paystack JS
Paystack's core javascript library.
It is composed of the following modules:
Installation
npm install paystack-js
Basic Usage
; const requestData = email: 'customer@email.com' amount: 100 // amount in kobo key: 'replace_with_your_public_key'; // Request a new transactionconst transaction = await Transaction; // Create a payment method instance that will be used e.g cardconst card = number: '4084084084084081' cvv: '408' month: '12' year: '20' ; // Payment method instances provide validation functions that// you can use to check for validaty before setting payment methodif card try transaction; catche console; // Charge the payment methodconst chargeResponse = await transaction; // Handle the charge responseif chargeResponsestatus === 'success' ; ## Transaction```Pending``` ## Payment Methods```Pending``` ## Charge responses```Pending``` ## Analytics```Pending```