npm install plugexpresso
OR yarn add plugexpresso
import PlugExpresso from 'plugexpresso';
const expresso = new PlugExpresso(PLUGEXPRESSO_SECRET_KEY);
1. Verify Token
- Verify Instant Token
- Make Exact Amount Verification
2. Get Payout List (Successful Transaction)
3. Programmatically Buy Expresso Token (Coming Soon)
4. Programmatically Create Team and Schedule (Coming Soon)
import PlugExpresso from 'plugexpresso';
const expresso = new PlugExpresso(PLUGEXPRESSO_SECRET_KEY);
const verify_token = async () => {
try {
const payload = {
"email": <EMAIL_ASSOCIATED_TO_TOKEN>,
"token": <EXPRESSO_FOOD_TOKEN>
};
const response = await expresso.verify(payload);
console.log(response);
} catch (error) {
console.log(error);
}
};
import PlugExpresso from 'plugexpresso';
const expresso = new PlugExpresso(PLUGEXPRESSO_SECRET_KEY);
const verify_token = async () => {
try {
const payload = {
"email": <EMAIL_ASSOCIATED_TO_TOKEN>,
"token": <EXPRESSO_FOOD_TOKEN>
"exact_amount": 1000,
"exact_currency": 'ngn'
};
const response = await expresso.verify(payload);
console.log(response);
} catch (error) {
console.log(error);
}
};
Vendors can also get list of all successful verification
import PlugExpresso from 'plugexpresso';
const expresso = new PlugExpresso(PLUGEXPRESSO_SECRET_KEY);
const get_transaction_list = async () => {
try {
const response = await expresso.getPayoutList();
console.log(response);
} catch (error) {
console.log(error);
}
};
const verify_token = async () => {
try {
const config = {
headers: {
"content-type": "application/json",
"authorization": `Bearer ${PLUGEXPRESSO_SECRET_KEY}`,
}
};
const payload = {
"email": <EMAIL_ASSOCIATED_TO_TOKEN>,
"token": <EXPRESSO_FOOD_TOKEN>
};
const response = await axios.post(`${EXPRESSO_BASE_URL}/transaction/verify`, payload, config);
console.log(response);
} catch (error) {
console.log(error);
}
};
MUCH MORE SOON... Tokenizing Incentives like food and much more.