amwal
v0.1.2
Published
<description>
Downloads
6
Readme
Amwal
This is the sdk for Tutoruu's main payment gateway - amwal.
Installation
npm i amwal #npm
pnpm i amwal #pnpm
yarn add amwal #yarn
Usage
import amwal from 'amwal';
Authentication
amwal.authenticate('<User Token>');
User
amwal.getUser();
Subscription Items
(No authentication required)
amwal.getSubscriptionItems();
amwal.getSubscriptionItem('<SubscriptionItemId>');
Subscriptions
amwal.getSubscriptions();
amwal.getSubscription('<SubscriptionId>');
amwal.subscribe('<SubscriptionItemId>');
amwal.unsubscribe('<SubscriptionId>');
Payments
amwal.getPayments();
amwal.getPayment('<PaymentId>');
Payment with Reference Number
amwal.payRefNum({
amount: 200.00,
description: "Two Sessions in ECON305",
items: [
{
itemId: "12",
quantity: 2,
price: 100.00
description: "Session in ECON305"
}
]
});
Direct Payment
amwal.pay({
amount: 200.00,
description: "Two Sessions in ECON305",
items: [
{
itemId: "12",
quantity: 2,
price: 100.00
description: "Session in ECON305"
}
],
cvv: 123
});
Auth Capture Method
amwal.authorizePayment({
amount: 200.00,
description: "Two Sessions in ECON305",
items: [
{
itemId: "12",
quantity: 2,
price: 100.00
description: "Session in ECON305"
}
],
cvv: 123
});
amwal.capturePayment("<PaymentId>")");
Cards
amwal.getCards();
amwal.getCard("<CardId>");
amwal.createCard({
cardNumber: 200020002000
cardAlias: "Hamada Yel3ab",
expiryYear: "24",
expiryMonth: "05",
cvv: 123
});
amwal.setDefaultCard("<CardId>");
amwal.removeCard("<CardId>")