diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a2c7cb4..cebe352 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -18,7 +18,7 @@ on: # The branches below must be a subset of the branches above branches: [ master ] schedule: - - cron: '33 0 * * 4' + - cron: '0 16 * * *' jobs: analyze: diff --git a/.gitignore b/.gitignore index ef397b6..a8ad81c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules db.json + +.DS_Store diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..f525ed1 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "semi": true, + "singleQuote": true, + "printWidth": 80, + "tabWidth": 2 +} diff --git a/cli.js b/cli.js index f4c6032..9d91322 100755 --- a/cli.js +++ b/cli.js @@ -1,21 +1,27 @@ #!/usr/bin/env node -global.vorpal = require('vorpal')(); -vorpal.isCommandArgKeyPairNormalized = false; -const shell = require('shelljs'); -global.db = require('./lib/db') + +import vorpal from 'vorpal'; +import shell from 'shelljs'; +import * as db from './lib/db.js'; + +globalThis.vorpal = new vorpal(); +globalThis.db = db; + +globalThis.vorpal.isCommandArgKeyPairNormalized = false; + if (!shell.which('git')) { shell.echo('Sorry, this script requires git'); shell.exit(1); } -vorpal - .delimiter('paystack $') - .show(); - +globalThis.vorpal.delimiter('paystack $').show(); - require('./commands/webhook')(); - require('./commands/api')(); - require('./commands/auth')(); - require('./commands/samples')(); - // module.exports = {vorpal, db, shell}; +import webhook from './commands/webhook.js'; +import api from './commands/api.js'; +import auth from './commands/auth.js'; +import samples from './commands/samples.js'; +webhook(); +api(); +auth(); +samples(); diff --git a/commands/api.js b/commands/api.js index fff13c4..469d72c 100644 --- a/commands/api.js +++ b/commands/api.js @@ -1,46 +1,52 @@ -const APIs = require('../lib/paystack/apis') -const helpers = require('../lib/helpers') - -let commands = Object.keys(APIs) -const init = () => { - commands.forEach((command) => { - let section = APIs[command]; - let vorp = vorpal.command(command + ' ', helpers.getDescription(section, command)) - .validate(function (args) { - let selected_integration = db.read('selected_integration.id'); - let user = db.read('user.id') - if (!selected_integration || !user) { - helpers.errorLog("You're not signed in, please run the `login` command before you begin"); - return false; - } - }) - .action(async function (args, callback) { - let schema = JSON.parse(JSON.stringify(helpers.findSchema(command, args))) - let [err, result] = await helpers.promiseWrapper(helpers.executeSchema(schema, args)) - if (err) { +import APIs from '../lib/paystack/apis.js'; +import * as helpers from '../lib/helpers.js'; - if (err.response) { - helpers.errorLog(err.response.data.message) - return; - } - helpers.errorLog(err) - return; - } - helpers.successLog(result.message) - helpers.jsonLog(result.data) - }) - vorp.option('--domain ', ' '); - let added_options = ['domain']; - section.forEach((f) => { - f.params.forEach((o) => { - if (added_options.indexOf(o.parameter) < 0) { - vorp.option('--' + o.parameter + ' ', ' ') - added_options.push(o.parameter) - } +let commands = Object.keys(APIs); - }) - }) - }) -} +const init = () => { + commands.forEach((command) => { + let section = APIs[command]; + let vorp = vorpal + .command(command + ' ', helpers.getDescription(section, command)) + .validate(function (args) { + let selected_integration = db.read('selected_integration')['id']; + let user = db.read('user')['id']; + if (!selected_integration || !user) { + helpers.errorLog( + "You're not signed in, please run the `login` command before you begin" + ); + return false; + } + }) + .action(async function (args, callback) { + let schema = JSON.parse( + JSON.stringify(helpers.findSchema(command, args)) + ); + let [err, result] = await helpers.promiseWrapper( + helpers.executeSchema(schema, args) + ); + if (err) { + if (err.response) { + helpers.errorLog(err.response.data.message); + return; + } + helpers.errorLog(err); + return; + } + helpers.successLog(result.message); + helpers.jsonLog(result.data); + }); + vorp.option('--domain ', ' '); + let added_options = ['domain']; + section.forEach((f) => { + f.params.forEach((o) => { + if (added_options.indexOf(o.parameter) < 0) { + vorp.option('--' + o.parameter + ' ', ' '); + added_options.push(o.parameter); + } + }); + }); + }); +}; -module.exports = init \ No newline at end of file +export default init; diff --git a/commands/auth.js b/commands/auth.js index 7d17278..ae8529f 100644 --- a/commands/auth.js +++ b/commands/auth.js @@ -1,61 +1,65 @@ -const helpers = require('../lib/helpers') -const Paystack = require('../lib/Paystack') -const init = function () { - vorpal.command('login', 'Sign in with your Paystack username and password').action(async function (args, callback) { - let token = '' - let expiry = parseInt(db.read('token_expiry')) * 1000; - let now = parseFloat(Date.now().toString()) - let user; - if (expiry > now) { - token = db.read('token'); - user = db.read('user'); - helpers.successLog("You're already logged in") - } - else { - var email = helpers.prompt('Email address\n') - let password = helpers.prompt('Password\n', true) - var [e, response] = await helpers.promiseWrapper(Paystack.signIn(email, password)) +import * as helpers from '../lib/helpers.js'; +import * as Paystack from '../lib/Paystack.js'; + +const init = () => { + vorpal + .command('login', 'Sign in with your Paystack username and password') + .action(async (_args, _callback) => { + let token, user; + let expiry = parseInt(db.read('token_expiry')) * 1000; + let now = parseFloat(Date.now().toString()); + if (expiry > now) { + token = db.read('token'); + user = db.read('user'); + helpers.successLog("You're already logged in"); + return; + } else { + const email = helpers.prompt('Email address\n'); + const password = helpers.prompt('Password\n', true); - if (response && !response.mfa_required) { - token = response.token; - user = response.user; - db.write('token', token) - db.write('user', user) - helpers.successLog('Login successful') - } else if (response && response.mfa_required) { - var totp = helpers.prompt('*MFA required* Enter 6-digit verification code\n') - var [e, response] = await helpers.promiseWrapper(Paystack.verifyMfa(totp, response.token)) - if (response) { - token = response.token - user = response.user - db.write('token', token) - db.write('user', user) - helpers.successLog('Login successful') - } - } else{ - helpers.errorLog('Login failed') - return; - } + const [e, response] = await helpers.promiseWrapper( + Paystack.signIn(email, password), + ); + + if (response && response.data) { + Paystack.storeLoginDetails(response); + token = response.data.token; + user = response.data.user; } - if (response || (token && user)) { - var [err, integration] = await helpers.promiseWrapper(Paystack.selectIntegration(user.integrations, token)) - if (err) { - helpers.errorLog(err); - } - db.write('selected_integration', integration); - let user_role = db.read('selected_integration.logged_in_user_role'); - var [err, integrationData] = await helpers.promiseWrapper(Paystack.getIntegration(integration.id, token)); - if (err) { - helpers.errorLog(err); - return - } - integrationData.logged_in_user_role = user_role; - db.write('selected_integration', integrationData); - helpers.infoLog('Logged in as ' + user.email + ' - ' + integration.business_name + ' (' + integration.id + ')'); + } + + if (token && user) { + const [err, integration] = await helpers.promiseWrapper( + Paystack.selectIntegration(user.integrations, token), + ); + if (err) { + helpers.errorLog(err); } else { - helpers.errorLog(' - - - - - - ') + db.write('selected_integration', integration); + let user_role = db.read('selected_integration').logged_in_user_role; + const [err, integrationData] = await helpers.promiseWrapper( + Paystack.getIntegration(integration.id, token), + ); + if (err) { + helpers.errorLog(err); + return; + } + integrationData.logged_in_user_role = user_role; + db.write('selected_integration', integrationData); + helpers.infoLog( + 'Logged in as ' + + user.email + + ' - ' + + integration.business_name + + ' (' + + integration.id + + ')', + ); } - }) -} + } else { + helpers.errorLog(' - - - - - - '); + } + }); +}; -module.exports = init +export default init; diff --git a/commands/samples.js b/commands/samples.js index 4fd6918..ddc5a4e 100644 --- a/commands/samples.js +++ b/commands/samples.js @@ -1,41 +1,48 @@ - -const helpers = require('../lib/helpers') -const shell = require('shelljs'); +import * as helpers from '../lib/helpers.js'; +import shell from 'shelljs'; if (!shell.which('git')) { shell.echo('Sorry, this script requires git'); shell.exit(1); } -let samples = require('../lib/samples') +import samples from '../lib/samples.js'; +const keys = Object.keys(samples); const init = () => { - let keys = Object.keys(samples) - vorpal.command('sample ', 'Get started quickly with a Paystack sample project. Available samples are '+ keys.toString() ) + vorpal + .command( + 'sample ', + 'Get started quickly with a Paystack sample project. Available samples are ' + + keys.toString(), + ) .validate(function (args) { - let selected_integration = db.read('selected_integration.id'); - let user = db.read('user.id') - if (!selected_integration || !user) { - helpers.errorLog("You're not signed in, please run the `login` command before you begin"); - return false; - } - }).action(async (args, callback) => { - - if(keys.indexOf(args.sample) < 0){ - helpers.errorLog("No sample app available with the name "+ args.sample); - helpers.infoLog("Available samples are " + keys.toString()) - callback() - return; - } - let sample = samples[args.sample]; - - shell.cd(args.filepath) - shell.exec('git clone '+ sample.git) - shell.cd(sample.name) - shell.exec('npm install'); - shell.exec('npm start') + let selected_integration = db.read('selected_integration').id; + let user = db.read('user').id; + if (!selected_integration || !user) { + helpers.errorLog( + "You're not signed in, please run the `login` command before you begin", + ); + return false; + } }) -} + .action(async (args, callback) => { + if (keys.indexOf(args.sample) < 0) { + helpers.errorLog( + 'No sample app available with the name ' + args.sample, + ); + helpers.infoLog('Available samples are ' + keys.toString()); + callback(); + return; + } + let sample = samples[args.sample]; + shell.cd(args.filepath); + shell.exec('git clone ' + sample.git); + shell.cd(sample.name); + shell.exec('npm install'); + shell.exec('npm start'); + }); +}; -module.exports = init \ No newline at end of file +export default init; diff --git a/commands/webhook.js b/commands/webhook.js index 9939dbd..5cc017e 100644 --- a/commands/webhook.js +++ b/commands/webhook.js @@ -1,94 +1,110 @@ -const ngrok = require('ngrok'); -const helpers = require('../lib/helpers') -const Paystack = require('../lib/Paystack') +import ngrok from 'ngrok'; +import * as helpers from '../lib/helpers.js'; +import * as Paystack from '../lib/Paystack.js'; -const init = () => { - vorpal - .command('webhook [local_route]', 'runs a webhook endpoint health check and listens for incoming webhooks".') - .option('--domain ', ' ') - .option('--event ', ' ') - .validate(function (args) { - let selected_integration = db.read('selected_integration.id'); - let user = db.read('user.id') - if (!selected_integration || !user) { - helpers.errorLog("You're not signed in, please run the `login` command before you begin"); - return false; - } - }) - .action(async function (args, callback) { - if (args.command == 'listen') { - let token = '' - let expiry = parseInt(db.read('token_expiry'))*1000; - let now =parseFloat( Date.now().toString() ) +const init = () => { + vorpal + .command( + 'webhook [local_route]', + 'runs a webhook endpoint health check and listens for incoming webhooks".', + ) + .option('--domain ', ' ') + .option('--event ', ' ') + .validate(function (args) { + let selected_integration = db.read('selected_integration').id; + let user = db.read('user').id; + if (!selected_integration || !user) { + helpers.errorLog( + "You're not signed in, please run the `login` command before you begin", + ); + return false; + } + }) + .action(async function (args, callback) { + if (args.command == 'listen') { + let token = ''; + let expiry = parseInt(db.read('token_expiry')) * 1000; + let now = parseFloat(Date.now().toString()); - if (expiry > now) { + if (expiry > now) { + token = db.read('token'); + } else { + let password = helpers.prompt( + "What's your paystack password:\n>", + true, + ); + var [err, result] = await helpers.promiseWrapper( + Paystack.signIn(db.read('user').email, password), + ); + if (!result) { + return; + } + token = result.token; + } - token = db.read('token') + if (!args.local_route) { + helpers.errorLog( + 'To listen to webhook events locally, you have to specify a local url to forward events to e.g localhost:3000/webhook', + ); + return; + } + let urlObject = helpers.parseURL(args.local_route); - } else { - let password = helpers.prompt("What's your paystack password:\n>", true) - var [err, result] = await helpers.promiseWrapper(Paystack.signIn(db.read('user.email'), password)); - if (!result) { - return - } - token = result.token - } + if (!urlObject.port) { + urlObject.port = 8080; + } + if (!urlObject.search || urlObject.search == '?') { + urlObject.search = ''; + } + try { + await ngrok.kill(); + } catch (e) { + //log error + } - if (!args.local_route) { - helpers.errorLog('To listen to webhook events locally, you have to specify a local url to forward events to e.g localhost:3000/webhook') - return - } - let urlObject = helpers.parseURL(args.local_route) - - if (!urlObject.port) { - urlObject.port = 8080 - } - if (!urlObject.search || urlObject.search == '?') { - urlObject.search = '' - } - try{ - await ngrok.kill(); - } - catch(e){ - //log error - } - - let ngrokHost = await ngrok.connect(urlObject.port); - - - - let ngrokURL = ngrokHost + urlObject.pathname + urlObject.search; - let domain = 'test'; - if (args.options.domain == 'live') { - domain = 'live' - } - helpers.infoLog('Tunelling webhook events to ' + args.local_route) - var [err, result] = await helpers.promiseWrapper(Paystack.setWebhook(ngrokURL, token, db.read('selected_integration.id'))) - if (err) { - this.log(err); - return - } else { - this.log('Webhook events would now be received at ' + args.local_route) - } - - } - else if(args.command == 'ping'){ - await helpers.promiseWrapper( Paystack.refreshIntegration(args)); - - var [e, response] = await helpers.promiseWrapper( Paystack.pingWebhook(args)); - helpers.infoLog('- - - - - WEBHOOK RESPONSE - - - - - -') - helpers.infoLog(response.code + ' - - ' + response.text) - if( helpers.isJson(response.data)){ - helpers.jsonLog(response.data) - }else{ - helpers.infoLog(response.data) - } - } - - callback(); + let ngrokHost = await ngrok.connect({ + addr: urlObject.port, + authtoken: process.env.NGROK_AUTH_TOKEN, }); + let ngrokURL = ngrokHost + urlObject.pathname + urlObject.search; + let domain = 'test'; + if (args.options.domain == 'live') { + domain = 'live'; + } + helpers.infoLog('Tunelling webhook events to ' + args.local_route); + var [err, result] = await helpers.promiseWrapper( + Paystack.setWebhook( + ngrokURL, + token, + db.read('selected_integration').id, + ), + ); + if (err) { + this.log(err); + return; + } else { + this.log( + 'Webhook events would now be received at ' + args.local_route, + ); + } + } else if (args.command == 'ping') { + await helpers.promiseWrapper(Paystack.refreshIntegration(args)); + + var [e, response] = await helpers.promiseWrapper( + Paystack.pingWebhook(args), + ); + helpers.infoLog('- - - - - WEBHOOK RESPONSE - - - - - -'); + helpers.infoLog(response.code + ' - - ' + response.text); + if (helpers.isJson(response.data)) { + helpers.jsonLog(response.data); + } else { + helpers.infoLog(response.data); + } + } -} + callback(); + }); +}; -module.exports = init \ No newline at end of file +export default init; diff --git a/lib/Paystack.js b/lib/Paystack.js index 1ebab3f..3196f18 100644 --- a/lib/Paystack.js +++ b/lib/Paystack.js @@ -1,254 +1,269 @@ +import axios from 'axios'; +import * as helpers from './helpers.js'; +import crypto from 'crypto'; +import webhookSamples from './paystack/webhooks.js'; -const axios = require('axios'); -const helpers = require('./helpers') -const crypto = require('crypto') -const webhookSamples = require('./paystack/webhooks') -function selectIntegration(integrations, token) { - return new Promise((resolve, reject) => { - console.log('Choose an integration - '); - let promptMessage = "" - - integrations.forEach((b, i) => { - promptMessage += i + 1 + ' - ' + b.business_name + ' (' + b.id + ')\n' - }) - let integration = helpers.prompt(promptMessage + '\nEnter the corresponding number - '); - - axios.post('https://api.paystack.co/user/switch_integration', { integration: integrations[parseInt(integration) - 1].id }, { headers: { 'Authorization': 'Bearer ' + token, 'jwt-auth': true } }).then((response) => { - - resolve(integrations[parseInt(integration) - 1]) - }).catch((err) => { - console.error(err.response.data) - reject(err) - }) +export function selectIntegration(integrations, token) { + return new Promise((resolve, reject) => { + console.log('Choose an integration - '); + let promptMessage = ''; - }) + integrations.forEach((b, i) => { + promptMessage += i + 1 + ' - ' + b.business_name + ' (' + b.id + ')\n'; + }); + let integration = helpers.prompt( + promptMessage + '\nEnter the corresponding number - ', + ); + axios + .post( + 'https://api.paystack.co/user/switch_integration', + { integration: integrations[parseInt(integration) - 1].id }, + { headers: { Authorization: 'Bearer ' + token, 'jwt-auth': true } }, + ) + .then((response) => { + resolve(integrations[parseInt(integration) - 1]); + }) + .catch((err) => { + console.error(err.response.data); + reject(err); + }); + }); } -async function refreshIntegration(){ - - let user_role = db.read('selected_integration.logged_in_user_role'); - let integration = db.read('selected_integration') - let token = '' - let expiry = parseInt(db.read('token_expiry'))*1000; - let now =parseFloat( Date.now().toString() ) +export async function refreshIntegration() { + const user_role = db.read('selected_integration').logged_in_user_role; + const integration = db.read('selected_integration'); + let token = ''; + const expiry = parseInt(db.read('token_expiry')) * 1000; + const now = parseFloat(Date.now().toString()); - if (expiry > now) { - - token = db.read('token') - return true; - } else { - let password = helpers.prompt("What's your password: ("+ db.read('user.email') +') '+"\n>", true) - var [err, result] = await helpers.promiseWrapper(signIn(db.read('user.email'), password)); - if (!result) { - return false - } - token = result.token - } - var [err, integrationData] = await helpers.promiseWrapper(getIntegration(integration.id, token)); - if (err) { - helpers.errorLog(err) - return false + if (expiry > now) { + token = db.read('token'); + return true; + } else { + const password = helpers.prompt( + "What's your password: (" + db.read('user').email + ') ' + '\n>', + true, + ); + const [err, result] = await helpers.promiseWrapper( + signIn(db.read('user').email, password), + ); + if (err || !result) { + return false; } - integrationData.logged_in_user_role = user_role; - db.write('selected_integration', integrationData); + token = result.data.token; + } -} + const [err, integrationData] = await helpers.promiseWrapper( + getIntegration(integration.id, token), + ); -function setWebhook(url, token, integration, domain = 'test') { - return new Promise((resolve, reject) => { - let data = {}; - data[domain + '_webhook_endpoint'] = url; - data['integration'] = integration - let headers = { - 'Authorization': 'Bearer ' + token, - 'jwt-auth': true - } - axios.put('https://api.paystack.co/integration/webhooks', data, { headers }).then((resp) => { - resolve(resp.data.message) - }).catch((err) => { - console.log(err.response.data) - reject(err) - }) - }) + if (err) { + helpers.errorLog(err); + return false; + } + integrationData.logged_in_user_role = user_role; + db.write('selected_integration', integrationData); } +export function setWebhook(url, token, integration, domain = 'test') { + return new Promise((resolve, reject) => { + let data = {}; + data[domain + '_webhook_endpoint'] = url; + data['integration'] = integration; + let headers = { + Authorization: 'Bearer ' + token, + 'jwt-auth': true, + }; + axios + .put('https://api.paystack.co/integration/webhooks', data, { headers }) + .then((resp) => { + resolve(resp.data.message); + }) + .catch((err) => { + console.log(err.response.data); + reject(err); + }); + }); +} -function getKeys(token, type = 'secret', domain = 'test') { - return new Promise((resolve, reject) => { - axios.get('https://api.paystack.co/integration/keys', { headers: { Authorization: 'Bearer ' + token, 'jwt-auth': true } }).then(response => { +export function getKeys(token, type = 'secret', domain = 'test') { + return new Promise((resolve, reject) => { + axios + .get('https://api.paystack.co/integration/keys', { + headers: { Authorization: 'Bearer ' + token, 'jwt-auth': true }, + }) + .then((response) => { let key = {}; let keys = response.data.data; if (keys.length) { for (let i = 0; i < keys.length; i++) { if (keys[i].domain === domain && keys[i].type === type) { - key = keys[i] - break + key = keys[i]; + break; } } } - resolve(key.key) - }).catch(error => { - if (error.response) { - reject(error.response.data.message) - return - } - reject(error) + resolve(key.key); }) - }) - } - -function pingWebhook(args) { - return new Promise(async (resolve, reject) => { - let canProceed; - try{ - canProceed = await refreshIntegration(); - }catch(e){ - console.error(e) - } - if(!canProceed){ - helpers.errorLog('- - - - - - - - Unable to ping webhook URL - - - - - - - -') - return - } - let domain = 'test'; - if (args.options.domain) { - domain = args.options.domain - } - let event = 'charge.success'; - if (args.options.event) { - event = args.options.event; - } - let eventObject = webhookSamples[event]; - if (eventObject) { - let token = db.read('token'); - let key = await getKeys(token, 'secret', domain); - var hash = crypto.createHmac('sha512', key).update(JSON.stringify(eventObject)).digest('hex'); - let uri = db.read('selected_integration.' + domain + '_webhook_endpoint'); - helpers.infoLog('- - - - - - - - - - - - - - - - - - - - - - - - - - - - '); - helpers.infoLog(`Sending sample ${event} event payload to ${uri}`); - axios.post(uri, eventObject, - { - headers: { - 'x-paystack-signature': hash - } - }, - - ).then((response) => { - resolve({ - code: response.status, - text: response.statusText, - data: response.data - }) - }).catch((e) => { - resolve({ - code: e.response.status, - text: e.response.statusText, - data: e.response.data - }) - }) - } else { - helpers.errorLog('Invalid event type - ' + event) - reject() + .catch((error) => { + if (error.response) { + reject(error.response.data.message); + return; } - }) + reject(error); + }); + }); +} +export function pingWebhook(args) { + return new Promise(async (resolve, reject) => { + let canProceed; + try { + canProceed = await refreshIntegration(); + } catch (e) { + console.error(e); + } + if (!canProceed) { + helpers.errorLog( + '- - - - - - - - Unable to ping webhook URL - - - - - - - -', + ); + return; + } + let domain = 'test'; + if (args.options.domain) { + domain = args.options.domain; + } + let event = 'charge.success'; + if (args.options.event) { + event = args.options.event; + } + let eventObject = webhookSamples[event]; + if (eventObject) { + let token = db.read('token'); + let key = await getKeys(token, 'secret', domain); + var hash = crypto + .createHmac('sha512', key) + .update(JSON.stringify(eventObject)) + .digest('hex'); + let uri = db.read('selected_integration')[domain + '_webhook_endpoint']; + helpers.infoLog( + '- - - - - - - - - - - - - - - - - - - - - - - - - - - - ', + ); + helpers.infoLog(`Sending sample ${event} event payload to ${uri}`); + axios + .post(uri, eventObject, { + headers: { + 'x-paystack-signature': hash, + }, + }) + .then((response) => { + resolve({ + code: response.status, + text: response.statusText, + data: response.data, + }); + }) + .catch((e) => { + resolve({ + code: e.response.status, + text: e.response.statusText, + data: e.response.data, + }); + }); + } else { + helpers.errorLog('Invalid event type - ' + event); + reject(); + } + }); } -function getIntegration(id, token) { - console.log('getting integration'); - return new Promise((resolve, reject) => { - axios.get('https://api.paystack.co/integration/' + id, - { - headers: { - 'Authorization': 'Bearer ' + token, - 'jwt-auth': true - } - }).then((response) => { - resolve(response.data.data) - }).catch((e) => { - console.error(e) - reject(e.response.data.message) - }) - }) +export function getIntegration(id, token) { + console.log('getting integration'); + return new Promise((resolve, reject) => { + axios + .get('https://api.paystack.co/integration/' + id, { + headers: { + Authorization: 'Bearer ' + token, + 'jwt-auth': true, + }, + }) + .then((response) => { + resolve(response.data.data); + }) + .catch((e) => { + console.error(e); + reject(e.response.data.message); + }); + }); } +export async function signIn(email, password) { + helpers.infoLog('Logging in'); + try { + const __response = await axios({ + url: 'https://api.paystack.co/login', + method: 'POST', + data: { email, password }, + }); -function signIn(email, password) { - return new Promise((resolve, reject) => { - let expiry = parseInt(db.read('token_expiry')); - let now = parseFloat(Date.now().toString()) - if (expiry > now) { - resolve({ - token: db.read('token'), - user: db.read('user'), - }) - return; - } - helpers.infoLog('Logging in'); - axios({ - url: 'https://api.paystack.co/login', - method: 'POST', - data: { email, password } - }).then(async (response) => { - response = response.data.data - if (response && !response.mfa_required) { - token = response.token; - user = response.user; - db.write('token', token) - db.write('user', user) - - helpers.successLog('Login successful') - resolve(response) - } else if (response && response.mfa_required) { - var totp = helpers.prompt('*MFA required* Enter 6-digit verification code\n') - var [e, response] = await helpers.promiseWrapper(verifyMfa(totp, response.token)) - if (response) { - token = response.token - user = response.user - db.write('token', token) - db.write('user', user) - - helpers.successLog('Login successful') - resolve(response) - } - } else{ - helpers.errorLog('Login failed') - return; - } - }).catch((e) => { - helpers.errorLog(e.response.data.message || 'Unable to sign in, please try again in a few minutes'); - reject('LOGIN ERROR: ' + e.response.data.message) - }) + const response = __response.data; - }) + if (response && response.data && !response.data.mfa_required) { + helpers.successLog('Login successful'); + return response; + } else if (response && response.data && response.data.mfa_required) { + const totp = helpers.prompt( + '*MFA required* Enter 6-digit verification code\n', + ); + + const [e, payload] = await helpers.promiseWrapper( + verifyMfa(totp, response.data.token), + ); + + if (payload) { + helpers.successLog('Login successful'); + return payload; + } + } else { + helpers.errorLog('Login failed'); + } + } catch (e) { + helpers.errorLog( + e.response?.data?.message || + 'Unable to sign in, please try again in a few minutes', + ); + } } -function verifyMfa(totp, token) { + +export function verifyMfa(totp, token) { return new Promise((resolve, reject) => { - helpers.infoLog('Verifying MFA...') - axios({ - url: 'https://api.paystack.co/verify-mfa', - method: 'POST', - headers: { - 'Authorization': `Bearer ${token}`, - 'jwt-auth': true - }, - data: { totp } - }).then((response) => { - storeLoginDetails(response.data) - resolve(response.data.data) - }).catch((e) => { - helpers.errorLog(e.response.data.message || 'Unable to verify MFA, please try again in a few minutes'); - reject('VERIFY MFA ERROR: ' + e.response.data.message) + helpers.infoLog('Verifying MFA...'); + axios({ + url: 'https://api.paystack.co/verify-mfa', + method: 'POST', + headers: { + Authorization: `Bearer ${token}`, + 'jwt-auth': true, + }, + data: { totp }, }) - }) -} - -function storeLoginDetails(payload) { - db.write('token', payload.data.token) - db.write('token_expiry', payload.data.expiry) - db.write('user', payload.data.user) + .then((response) => { + resolve(response.data); + }) + .catch((e) => { + helpers.errorLog( + e.response.data.message || + 'Unable to verify MFA, please try again in a few minutes', + ); + reject('VERIFY MFA ERROR: ' + e.response.data.message); + }); + }); } -module.exports = { - signIn, verifyMfa, getKeys, setWebhook, selectIntegration, getIntegration, pingWebhook, refreshIntegration +export function storeLoginDetails(payload) { + db.write('token', payload.data.token); + db.write('token_expiry', payload.data.expiry); + db.write('user', payload.data.user); } diff --git a/lib/Paystack/apis.js b/lib/Paystack/apis.js deleted file mode 100644 index 5a98602..0000000 --- a/lib/Paystack/apis.js +++ /dev/null @@ -1,2066 +0,0 @@ -#!/usr/bin/env node -module.exports = { - "subaccount": [ - { - "api": "update", - "endpoint": "https://api.paystack.co/subaccount", - "method": "PUT", - "params": [], - "description": null - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/subaccount/{ID}", - "method": "GET", - "params": [], - "description": null - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/subaccount", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" - }, - { - "api": "create", - "endpoint": "https://api.paystack.co/subaccount", - "method": "POST", - "params": [ - { - "parameter": "business_name", - "required": true, - "type": "String" - }, - { - "parameter": "settlement_bank", - "required": true, - "type": "String" - }, - { - "parameter": "account_number", - "required": true, - "type": "String" - }, - { - "parameter": "percentage_charge", - "required": true, - "type": "String" - }, - { - "parameter": "primary_contact_email", - "required": false, - "type": "String" - }, - { - "parameter": "primary_contact_name", - "required": false, - "type": "String" - }, - { - "parameter": "primary_contact_phone", - "required": false, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - }, - { - "parameter": "settlement_schedule", - "required": false, - "type": "String" - }, - { - "parameter": "eceive payments for the created subaccount by providing their code when doing a transaction. More details here: [Split Payments Overview](https://developers.paystack.co/v1.0/docs/splitpaymentsoverview", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **business_name** (_required_) - Name of business for subaccount\n- **settlement_bank** (_required_) - Name of Bank (see list of accepted names by calling [List Banks](https://developers.paystack.co/v1.0/docs/list-banks)\n- **account_number** (_required_) - NUBAN Bank Account Number\n- **percentage_charge** (_required_) - What is the default percentage charged when receiving on behalf of this subaccount?\n- **primary_contact_email** - A contact email for the subaccount\n- **primary_contact_name** - A name for the contact person for this subaccount\n- **primary_contact_phone** - A phone number to call for this subaccount\n- **metadata** - Stringified JSON object\n- **settlement_schedule** - Any of `auto`, `weekly`, `monthly`, `manual`. Auto means payout is T+1 and manual means payout to the subaccount should only be made when requested.\n\nReceive payments for the created subaccount by providing their code when doing a transaction. More details here: [Split Payments Overview](https://developers.paystack.co/v1.0/docs/split-payments-overview)" - } - ], - "page": [ - { - "api": "update", - "endpoint": "https://api.paystack.co/page/", - "method": "PUT", - "params": [ - { - "parameter": "name", - "required": false, - "type": "String" - }, - { - "parameter": "description", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "active", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **name** - Name of page\n- **description** - Short description of page\n- **amount** - Amount to be charged in kobo. Will override the amount for existing subscriptions.\n- **active** - Set to false to deactivate page url." - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/page/id_or_plan_code", - "method": "GET", - "params": [], - "description": null - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/page", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - }, - { - "parameter": "interval", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **interval** - Filter list by plans with specified interval\n- **amount** - Filter list by plans with specified amount (in kobo)" - }, - { - "api": "check", - "endpoint": "https://api.paystack.co/page/check_slug_availability/slug", - "method": "GET", - "params": [ - { - "parameter": "slug", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **slug** (_required_) - URL slug to be confirmed" - }, - { - "api": "create", - "endpoint": "https://api.paystack.co/page", - "method": "POST", - "params": [ - { - "parameter": "name", - "required": true, - "type": "String" - }, - { - "parameter": "description", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "slug", - "required": false, - "type": "String" - }, - { - "parameter": "redirect_url", - "required": false, - "type": "String" - }, - { - "parameter": "send_invoices", - "required": false, - "type": "String" - }, - { - "parameter": "custom_fields", - "required": false, - "type": "String" - }, - - { - "parameter": "end pages created to your customers by giving out a link in this format https://paystack.com/pay/:slug. For instance, a valid link for the page above would be https://paystack.com/pay/5nApBwZkv", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **name** (_required_) - Name of page\n- **description** - Short description of page\n- **amount** - Default amount you want to accept using this page. If none is set, customer is free to provide any amount of their choice. The latter scenario is useful for accepting donations\n- **slug** - URL slug you would like to be associated with this page. Page will be accessible at https://paystack.com/pay/[slug]\n- **redirect_url** - If you would like Paystack to redirect someplace upon successful payment, specify the URL here.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers\n- **custom_fields** - If you would like to accept custom fields, specify them here. See sample code for details.\n\nSend pages created to your customers by giving out a link in this format https://paystack.com/pay/:slug. For instance, a valid link for the page above would be https://paystack.com/pay/5nApBwZkvY" - } - ], - "transfer": [ - { - "api": "list", - "endpoint": "https://api.paystack.co/transfer", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" - }, - { - "api": "finalize", - "endpoint": "https://api.paystack.co/transfer/finalize_transfer", - "method": "POST", - "params": [ - { - "parameter": "transfer_code", - "required": true, - "type": "String" - }, - { - "parameter": "otp", - "required": true, - "type": "String" - } - ], - "description": "**Body Params**\n- **transfer_code** (_required_) - Transfer code\n- **otp** (_required_) - OTP sent to business phone to verify transfer." - }, - { - "api": "initiate", - "endpoint": "https://api.paystack.co/transfer", - "method": "POST", - "params": [ - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "source", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "reason", - "required": false, - "type": "String" - }, - { - "parameter": "recipient", - "required": true, - "type": "String" - }, - { - "parameter": "reference", - "required": false, - "type": "String" - } - ], - "description": "Status of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’.\n\n**Body Params**\n- **source** (_required_) - Where should we transfer from? Only balance for now\n- **amount** - Amount to transfer in kobo\n- **currency** - NGN\n- **reason**\n- **recipient** (_required_) - Code for transfer recipient\n- **reference** - If specified, the field should be a unique identifier (in lowercase) for the object. Only `-` `,` `_` and alphanumeric characters allowed." - }, - { - "api": "verify", - "endpoint": "https://api.paystack.co/transfer/{reference}", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "reference", - "required": true, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" - }, - { - "api": "disable", - "endpoint": "https://api.paystack.co/transfer/disable_otp", - "method": "POST", - "params": [ - - { - "parameter": "n the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. An OTP is sent to you on your business phone", - "required": true, - "type": "String" - } - ], - "description": "In the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. You will get an OTP.\n\nIn the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. An OTP is sent to you on your business phone." - }, - { - "api": "enable", - "endpoint": "https://api.paystack.co/transfer/enable_otp", - "method": "POST", - "params": [], - "description": "In the event that a customer wants to stop being able to complete transfers programmatically, this endpoint helps turn OTP requirement back on. No arguments required." - }, - { - "api": "initiate", - "endpoint": "https://api.paystack.co/transfer/bulk", - "method": "POST", - "params": [ - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "(no name)", - "required": false, - "type": "String" - }, - - { - "parameter": "tatus of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’", - "required": true, - "type": "String" - } - ], - "description": "You need to disable the Transfers OTP requirement to use this endpoint.\n\n**Body Params**\n- **(no name)**\n\nStatus of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’." - }, - { - "api": "finalize", - "endpoint": "https://api.paystack.co/transfer/disable_otp_finalize", - "method": "POST", - "params": [ - { - "parameter": "otp", - "required": true, - "type": "String" - }, - - ], - "description": "**Body Params**\n- **otp** (_required_) - OTP sent to business phone to verify disabling OTP requirement\n\n" - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/transfer/id", - "method": "GET", - "params": [ - { - "parameter": "id_or_code", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **id_or_code** (_required_) - An ID or code for the transfer whose details you want to retrieve." - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/transfer/id_or_code", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "This lists all bulk charge batches created by the integration. Statuses can be `active`, `paused`, or `complete`.\n\n**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" - }, - { - "api": "resend", - "endpoint": "https://api.paystack.co/transfer/resend_otp", - "method": "POST", - "params": [ - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "transfer_code", - "required": true, - "type": "String" - }, - { - "parameter": "reason", - "required": true, - "type": "String" - } - ], - "description": "Creates a new recipient. An duplicate account number will lead to the retrieval of the existing record.\n\n**Body Params**\n- **transfer_code** (_required_) - Transfer code\n- **reason** (_required_) - either `resend_otp` or `transfer`" - } - ], - "paymentrequest": [ - { - "api": "create", - "endpoint": "https://api.paystack.co/paymentrequest", - "method": "POST", - "params": [ - { - "parameter": "customer", - "required": true, - "type": "String" - }, - { - "parameter": "due_date", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": true, - "type": "Number" - }, - { - "parameter": "description", - "required": false, - "type": "String" - }, - { - "parameter": "line_items", - "required": false, - "type": "String" - }, - { - "parameter": "tax", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "send_notification", - "required": false, - "type": "String" - }, - { - "parameter": "draft", - "required": false, - "type": "String" - }, - { - "parameter": "send_notification", - "required": false, - "type": "String" - }, - { - "parameter": "has_invoice", - "required": false, - "type": "String" - }, - { - "parameter": "invoice_number", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **customer** (_required_) - Customer ID or code\n- **due_date** (_required_) - ISO 8601 representation of request due date\n- **amount** (_required_) - Invoice amount. Only useful if line items and tax values are ignored. endpoint will throw a friendly warning if neither is available.\n- **description**\n- **line_items** - Array of line items in the format `[{\"name\":\"item 1\", \"amount\":2000}]`\n- **tax** - Array of taxes to be charged in the format `[{\"name\":\"VAT\", \"amount\":2000}]`\n- **currency** - Defaults to Naira\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`.\n- **draft** - Indicate if request should be saved as draft. Defaults to `false` and overrides send_notification.\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`.\n- **has_invoice** - Set to `true` to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no `line_items` or `tax` passed.\n- **invoice_number** - Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point." - }, - { - "api": "finalize", - "endpoint": "https://api.paystack.co/paymentrequest/finalize/ID_OR_CODE", - "method": "POST", - "params": [ - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "send_notification", - "required": false, - "type": "String" - } - ], - "description": "Publishes invoice that is draft by sending customer the invoice via email\n\n**Body Params**\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`" - }, - { - "api": "send", - "endpoint": "https://api.paystack.co/paymentrequest/notify/ID_OR_CODE", - "method": "POST", - "params": [ - { - "parameter": "id", - "required": false, - "type": "String" - } - ], - "description": "**Path Params**\n- **id** - Invoice code for which you want to send a notification for" - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/paymentrequest", - "method": "GET", - "params": [ - { - "parameter": "customer", - "required": false, - "type": "String" - }, - { - "parameter": "status", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "paid", - "required": false, - "type": "String" - }, - { - "parameter": "include_archive", - "required": false, - "type": "String" - }, - { - "parameter": "payment_request", - "required": false, - "type": "String" - } - ], - "description": "**Query Params**\n- **customer** - Specify an ID for the customer whose requests you want to retrieve\n- **status** - Filter requests by status ('failed', 'success', 'abandoned')\n- **currency** - Filter requests sent in a particular currency.\n- **paid** - Filter requests that have been paid for \n- **include_archive** - Includes archived requests in the response\n- **payment_request** - Filter specific invoice by passing invoice code" - }, - { - "api": "view", - "endpoint": "https://api.paystack.co/paymentrequest/REQUEST_ID_OR_CODE", - "method": "GET", - "params": [ - { - "parameter": "id", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **id** _(required)_ - An ID for the Invoice" - }, - { - "api": "invoice", - "endpoint": "https://api.paystack.co/paymentrequest/totals", - "method": "GET", - "params": [], - "description": null - }, - { - "api": "update", - "endpoint": "https://api.paystack.co/paymentrequest/ID_OR_CODE", - "method": "PUT", - "params": [ - { - "parameter": "description", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "line_item", - "required": false, - "type": "String" - }, - { - "parameter": "tax", - "required": false, - "type": "String" - }, - { - "parameter": "due_date", - "required": false, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - }, - { - "parameter": "send_notification", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "customer", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **description**\n- **amount**\n- **line_item**\n- **tax**\n- **due_date**\n- **metadata**\n- **send_notification**\n- **currency** - only works in draft mode\n- **customer** - only works in draft mode" - }, - { - "api": "verify", - "endpoint": "https://api.paystack.co/paymentrequest/verify/{ID}", - "method": "GET", - "params": [ - { - "parameter": "ID", - "required": false, - "type": "String" - }, - - { - "parameter": "ote that a key is added called `pending_amount` when you fetch an invoice. This is because when paying for an invoice, you can choose to pay part but not all. Whenever a successful transaction is made, the key updates to reveal what’s left of the invoice to pay", - "required": false, - "type": "String" - } - ], - "description": "**Path Params**\n- **ID** - The invoice code for the Payment Request to be verified\n\nNote that a key is added called `pending_amount` when you fetch an invoice. This is because when paying for an invoice, you can choose to pay part but not all. Whenever a successful transaction is made, the key updates to reveal what’s left of the invoice to pay." - } - ], - "transferrecipient": [ - { - "api": "create", - "endpoint": "https://api.paystack.co/transferrecipient", - "method": "POST", - "params": [ - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "type", - "required": true, - "type": "String" - }, - { - "parameter": "name", - "required": true, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - }, - { - "parameter": "bank_code", - "required": true, - "type": "String" - }, - { - "parameter": "account_number", - "required": true, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "description", - "required": false, - "type": "String" - } - ], - "description": "Creates a new recipient. An duplicate account number will lead to the retrieval of the existing record.\n\n**Body Params**\n- **type** (_required_) - Recipient Type (Only nuban at this time)\n- **name** (_required_) - A name for the recipient\n- **metadata** - Store additional information about your recipient in a structured format. JSON\n- **bank_code** (_required_) - Required if type is nuban. You can find a list of bank codes at [api.paystack.co/bank](https://api.paystack.co/bank)\n- **account_number** (_required_) - Required if type is `nuban`\n- **currency** - Currency for the account receiving the transfer.\n- **description**" - }, - { - "api": "delete", - "endpoint": "https://api.paystack.co/transferrecipient", - "method": "DELETE", - "params": [], - "description": null - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/transferrecipient", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" - }, - { - "api": "update", - "endpoint": "{recipient_code_or_id}", - "method": "PUT", - "params": [], - "description": null - } - ], - "subscription": [ - { - "api": "disable", - "endpoint": "https://api.paystack.co/subscription/disable", - "method": "POST", - "params": [ - { - "parameter": "code", - "required": true, - "type": "String" - }, - { - "parameter": "token", - "required": true, - "type": "String" - } - ], - "description": "**Body Params**\n- **code** (_required_) - Subscription code\n- **token** (_required_) - Email token" - }, - { - "api": "fetch", - "endpoint": ":id_or_subscription_code", - "method": "GET", - "params": [], - "description": null - }, - { - "api": "create", - "endpoint": "https://api.paystack.co/subscription", - "method": "POST", - "params": [ - { - "parameter": "customer", - "required": true, - "type": "String" - }, - { - "parameter": "plan", - "required": true, - "type": "String" - }, - { - "parameter": "authorization", - "required": false, - "type": "String" - }, - { - "parameter": "start_date", - "required": false, - "type": "String" - }, - - { - "parameter": "ote the `email_token` attribute for the subscription object. We create one on each subscription so customers can cancel their subscriptions from within the invoices sent to their mailboxes. Since they are not authorized, the email tokens are what we use to authenticate the requests over the API", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **customer** (_required_) - Customer's email address or customer code\n- **plan** (_required_) - Plan code\n- **authorization** - If customer has multiple authorizations, you can set the desired authorization you wish to use for this subscription here. If this is not supplied, the customer's most recent authorization would be used\n- **start_date** - Set the date for the first debit. (ISO 8601 format)\n\nNote the `email_token` attribute for the subscription object. We create one on each subscription so customers can cancel their subscriptions from within the invoices sent to their mailboxes. Since they are not authorized, the email tokens are what we use to authenticate the requests over the API." - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/subscription", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - }, - { - "parameter": "customer", - "required": false, - "type": "String" - }, - { - "parameter": "plan", - "required": false, - "type": "String" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **customer** - Filter by Customer ID\n- **plan** - Filter by Plan ID" - }, - { - "api": "enable", - "endpoint": "https://api.paystack.co/subscription/enable", - "method": "POST", - "params": [ - { - "parameter": "code", - "required": true, - "type": "String" - }, - { - "parameter": "token", - "required": true, - "type": "String" - } - ], - "description": "**Body Params**\n- **code** (_required_) - Subscription code\n- **token** (_required_) - Email token" - } - ], - "bulkcharge": [ - { - "api": "fetch", - "endpoint": "https://api.paystack.co/bulkcharge/id_or_code", - "method": "GET", - "params": [ - - { - "parameter": "Path Params", - "required": false, - "type": "String" - }, - { - "parameter": "id_or_code", - "required": true, - "type": "String" - } - ], - "description": "This endpoint retrieves a specific batch code. It also returns useful information on its progress by way of the `total_charges` and `pending_charges` attributes.\n\n**Path Params**\n- **id_or_code** (_required_) - An ID or code for the transfer whose details you want to retrieve." - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/bulkcharge/id_or_code/charges", - "method": "GET", - "params": [ - - { - "parameter": "Path Params", - "required": false, - "type": "String" - }, - { - "parameter": "id_or_code", - "required": true, - "type": "String" - }, - - { - "parameter": "status", - "required": false, - "type": "String" - }, - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "This endpoint retrieves the charges associated with a specified batch code. Pagination parameters are available. You can also filter by status. Charge statuses can be `pending`, `success` or `failed`.\n\n**Path Params**\n- **id_or_code** (_required_) - An ID or code for the batch whose charges you want to retrieve.\n\n**Query Params**\n- **status** - `pending`, `success` or `failed`\n- **perPage**\n- **page**\n" - }, - { - "api": "initiate", - "endpoint": "https://api.paystack.co/bulkcharge", - "method": "POST", - "params": [ - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "(no_name)", - "required": false, - "type": "String" - } - ], - "description": "Send an array of objects with authorization codes and amount in kobo so we can process transactions as a batch.\n\n**Body Params**\n- **(no_name)**" - }, - { - "api": "resume", - "endpoint": "https://api.paystack.co/bulkcharge/resume/batch_code", - "method": "GET", - "params": [ - - { - "parameter": "Path Params", - "required": false, - "type": "String" - }, - { - "parameter": "batch_code", - "required": true, - "type": "String" - } - ], - "description": "Use this endpoint to pause processing a batch\n\n**Path Params**\n- **batch_code** (_required_)" - }, - { - "api": "pause", - "endpoint": "https://api.paystack.co/bulkcharge/pause/batch_code", - "method": "GET", - "params": [ - - { - "parameter": "Path Params", - "required": false, - "type": "String" - }, - { - "parameter": "batch_code", - "required": true, - "type": "String" - } - ], - "description": "Use this endpoint to pause processing a batch\n\n**Path Params**\n- **batch_code** (_required_)" - } - ], - "bank": [ - { - "api": "list", - "endpoint": "https://api.paystack.co/bank", - "method": "GET", - "params": [], - "description": null - }, - { - "api": "resolve", - "endpoint": "?account_number=ACCOUNT_NUMBER&bank_code=BANK_CODE", - "method": "GET", - "params": [ - { - "parameter": "account_number", - "required": false, - "type": "String" - }, - { - "parameter": "bank_code", - "required": false, - "type": "String" - } - ], - "description": "**Path Params**\n- **account_number** - Account Number\n- **bank_code** - Bank Code" - }, - { - "api": "resolve", - "endpoint": "{BVN}", - "method": "GET", - "params": [ - { - "parameter": "bvn", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **bvn** (_required_) - 11 digit BVN" - }, - { - "api": "match", - "endpoint": "{ACCOUNT_NUMBER}&bank_code={BANK_CODE}&bvn={BVN}", - "method": "GET", - "params": [ - - { - "parameter": "Path Params", - "required": false, - "type": "String" - }, - { - "parameter": "*account_number* _(required)_ Bank account numbe", - "required": true, - "type": "String" - }, - { - "parameter": "*bank_code* _(required)_ Bank code from [List Bank endpoint](https://api.paystack.co/bank", - "required": true, - "type": "String" - }, - { - "parameter": "*bvn* _(required)_ 11 digit BV", - "required": true, - "type": "String" - } - ], - "description": "The Match BVN endpoint checks if the account number for a bank belongs to a user's BVN\n\n**Path Params**\n- *account_number* _(required)_ - Bank account number\n- *bank_code* _(required)_ - Bank code from [List Bank endpoint](https://api.paystack.co/bank)\n- *bvn* _(required)_ - 11 digit BVN" - } - ], - "charge": [ - { - "api": "submit", - "endpoint": "https://api.paystack.co/charge/submit_otp", - "method": "POST", - "params": [ - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "otp", - "required": true, - "type": "String" - }, - { - "parameter": "reference", - "required": true, - "type": "String" - } - ], - "description": "Submit OTP to complete a charge\n\n**Body Params**\n- **otp** (_required_) - OTP submitted by user\n- **reference** (_required_) - reference for ongoing transaction" - }, - { - "api": "submit", - "endpoint": "https://api.paystack.co/charge/submit_pin", - "method": "POST", - "params": [ - { - "parameter": "pin", - "required": true, - "type": "String" - }, - { - "parameter": "reference", - "required": true, - "type": "String" - } - ], - "description": "**Body Params**\n- **pin** (_required_) - PIN submitted by user\n- **reference** (_required_) - reference for transaction that requested pin" - }, - { - "api": "submit", - "endpoint": "https://api.paystack.co/charge/submit_birthday", - "method": "POST", - "params": [ - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "birthday", - "required": true, - "type": "String" - }, - { - "parameter": "reference", - "required": true, - "type": "String" - } - ], - "description": "Submit Birthday when requested\n\n**Body Params**\n- **birthday** (_required_) - Birthday number submitted by user\n- **reference** (_required_) - reference for ongoing transaction" - }, - { - "api": "tokenize", - "endpoint": "https://api.paystack.co/charge/tokenize", - "method": "POST", - "params": [ - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "email", - "required": true, - "type": "String" - }, - { - "parameter": "card", - "required": true, - "type": "String" - }, - { - "parameter": "card.number", - "required": true, - "type": "String" - }, - { - "parameter": "card.cvv", - "required": true, - "type": "String" - }, - { - "parameter": "card.expiry_month", - "required": true, - "type": "String" - }, - { - "parameter": "card.expiry_year", - "required": true, - "type": "String" - } - ], - "description": "Send an array of objects with authorization codes and amount in kobo so we can process transactions as a batch.\n\n**Body Params**\n- **email** (_required_) - Customer's email address\n- **card** (_required_) - Card to tokenize\n- **card.number** (_required_) - Card to tokenize\n- **card.cvv** (_required_) - Card security code\n- **card.expiry_month** (_required_) - Expiry month of card\n- **card.expiry_year** (_required_) - Expiry year of card\n" - }, - { - "api": "check", - "endpoint": "https://api.paystack.co/charge/reference", - "method": "GET", - "params": [ - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "reference", - "required": true, - "type": "String" - } - ], - "description": "When you get \"pending\" as a charge status, wait 30 seconds or more, then make a check to see if its status has changed. Don't call too early as you may get a lot more pending than you should.\n\n**Body Params**\n- **reference** (_required_) - The reference to check" - }, - { - "api": "charge", - "endpoint": "https://api.paystack.co/charge", - "method": "POST", - "params": [ - { - "parameter": "imple guide to charging cards directly https://developers.paystack.co/docs/chargingfromyourbacken", - "required": false, - "type": "String" - }, - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "email", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": true, - "type": "Number" - }, - { - "parameter": "card", - "required": true, - "type": "String" - }, - { - "parameter": "card.number", - "required": true, - "type": "String" - }, - { - "parameter": "card.cvv", - "required": true, - "type": "String" - }, - { - "parameter": "card.expiry_month", - "required": true, - "type": "String" - }, - { - "parameter": "card.expiry_year", - "required": true, - "type": "String" - }, - { - "parameter": "bank", - "required": false, - "type": "String" - }, - { - "parameter": "bank.code", - "required": true, - "type": "String" - }, - { - "parameter": "bank.account_number", - "required": true, - "type": "String" - }, - { - "parameter": "authorization_code", - "required": false, - "type": "String" - }, - { - "parameter": "pin", - "required": false, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - } - ], - "description": "Send card details or bank details or authorization code to start a charge.\nSimple guide to charging cards directly https://developers.paystack.co/docs/charging-from-your-backend\n\n**Body Params**\n- **email** (_required_) - Customer's email address\n- **amount** (_required_) - Amount in kobo\n- **card** (_required_) - Card number\n- **card.number** (_required_) - Card to tokenize\n- **card.cvv** (_required_) - Card security code\n- **card.expiry_month** (_required_) - Expiry month of card\n- **card.expiry_year** (_required_) - Expiry year of card\n- **bank** - Bank account to charge (don't send if charging an authorization code or card)\n- **bank.code** (_required_) - A code for the [bank](https://developers.paystack.co/v1.0/ref/banks) (check banks for the banks supported). Only the ones for which paywithbank is true will work.\n- **bank.account_number** (_required_) - 10 digit nuban for the account to charge\n- **authorization_code** - An authorization code to charge (don't send if charging a card or bank account)\n- **pin** - 4-digit PIN (send with a non-reusable authorization code)\n- **metadata** - A JSON object" - }, - { - "api": "submit", - "endpoint": "https://api.paystack.co/charge/submit_phone", - "method": "POST", - "params": [ - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "phone", - "required": true, - "type": "String" - }, - { - "parameter": "reference", - "required": true, - "type": "String" - } - ], - "description": "Submit Phone when requested\n\n**Body Params**\n- **phone** (_required_) - Phone number submitted by user\n- **reference** (_required_) - reference for ongoing transaction" - } - ], - "transaction": [ - { - "api": "verify", - "endpoint": "https://api.paystack.co/transaction/verify/{reference}", - "method": "GET", - "params": [ - { - "parameter": "reference", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **reference** (_required_)" - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/transaction", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - }, - { - "parameter": "customer", - "required": false, - "type": "String" - }, - { - "parameter": "status", - "required": false, - "type": "String" - }, - { - "parameter": "from", - "required": false, - "type": "String" - }, - { - "parameter": "to", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **customer** - Specify an ID for the customer whose transactions you want to retrieve\n- **status** - Filter transactions by status ('failed', 'success', 'abandoned')\n- **from** - A timestamp from which to start listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21\n- **to** - A timestamp at which to stop listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21\n- **amount** - Filter transactions by amount. Specify the amount in kobo." - }, - { - "api": "view", - "endpoint": ":id_or_reference", - "method": "GET", - "params": [], - "description": null - }, - { - "api": "charge", - "endpoint": "https://api.paystack.co/transaction/charge_authorization", - "method": "POST", - "params": [ - { - "parameter": "reference", - "required": false, - "type": "String" - }, - { - "parameter": "authorization_code", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": true, - "type": "Number" - }, - { - "parameter": "plan", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "email", - "required": true, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - }, - { - "parameter": "subaccount", - "required": false, - "type": "String" - }, - { - "parameter": "transaction_charge", - "required": false, - "type": "String" - }, - { - "parameter": "bearer", - "required": false, - "type": "String" - }, - { - "parameter": "invoice_limit", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **reference** - Unique transaction reference. Only `-` `,` `.` `,` `=` and alphanumeric characters allowed. System will generate one if none is provided\n- **authorization_code** - (_required_) Valid authorization code to charge\n- **amount** - (_required_) Amount in kobo\n- **plan** - If transaction is to create a subscription to a predefined plan, provide plan code here\n- **currency** - Currency in which amount should be charged\n- ** email** (_required_) - Customer's email address\n- **metadata** - Add a `custom_fields` attribute which has an array of objects if you would like the fields to be added to your transaction when displayed on the dashboard.\n- **subaccount** - The code for the subaccount that owns the payment.\n- **transaction_charge** - A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split).\n- **bearer** - Who bears Paystack charges? `account` or `subaccount`?\n- **invoice_limit** - Number of invoices to raise during the subscription. Overrides `invoice_limit` set on plan." - }, - { - "api": "export", - "endpoint": "https://api.paystack.co/transaction/export", - "method": "GET", - "params": [ - { - "parameter": "from", - "required": false, - "type": "String" - }, - { - "parameter": "to", - "required": false, - "type": "String" - }, - { - "parameter": "settled", - "required": false, - "type": "String" - }, - { - "parameter": "payment_page", - "required": false, - "type": "String" - }, - { - "parameter": "customer", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "settlement", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "status", - "required": false, - "type": "String" - } - ], - "description": "**Query Params**\n- **from** - Lower bound of date range. Leave undefined to export transactions from day one.\n- **to** - Upper bound of date range. Leave undefined to export transactions till date.\n- **settled** - Set to `true` to export only settled transactions. `false` for pending transactions. Leave undefined to export all transactions\n- **payment_page** - Specify a payment page's id to export only transactions conducted on said page\n- **customer** - Specify customer id.\n- **currency** - Currency in which you are charging the customer in.\n- **settlement** - An ID for the settlement whose transactions we should export\n- **amount** - Amount for transactions to export\n- **status** - Status for transactions to export" - }, - { - "api": "check", - "endpoint": "https://api.paystack.co/transaction/check_authorization", - "method": "POST", - "params": [ - - { - "parameter": "authorization_code", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": true, - "type": "Number" - }, - { - "parameter": "email", - "required": true, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - } - ], - "description": "All mastercard and visa authorizations can be checked with this endpoint to know if they have funds for the payment you seek.\n\n**Body Params**\n- **authorization_code** (_required_) - Authorization code for mastercard or VISA authorization belonging to email.\n- **amount** (_required_) - Amount in kobo\n- **email** (_required_) - Customer's email address\n- **currency** - A currency for the amount we want to check\n\nIn test mode, we will return insufficient funds for an amount greater than or equal 500,000 naira." - }, - { - "api": "transaction", - "endpoint": "https://api.paystack.co/transaction/totals", - "method": "GET", - "params": [ - { - "parameter": "from", - "required": false, - "type": "String" - }, - { - "parameter": "to", - "required": false, - "type": "String" - } - ], - "description": "Total amount received on your account\n\n**Query Params**\n- **from** - Lower bound of date range. Leave undefined to show totals from day one.\n- **to** - Upper bound of date range. Leave undefined to show totals till date." - }, - { - "api": "initialize", - "endpoint": "https://api.paystack.co/transaction/initialize", - "method": "POST", - "params": [ - { - "parameter": "email", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": true, - "type": "Number" - }, - { - "parameter": "reference", - "required": false, - "type": "String" - }, - { - "parameter": "callback_url", - "required": false, - "type": "String" - }, - { - "parameter": "plan", - "required": false, - "type": "String" - }, - { - "parameter": "invoice_limit", - "required": false, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - }, - { - "parameter": "subaccount", - "required": false, - "type": "String" - }, - { - "parameter": "transaction_charge", - "required": false, - "type": "String" - }, - { - "parameter": "bearer", - "required": false, - "type": "String" - }, - { - "parameter": "channels", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **email** (_required_) - Customer's email address\n- **amount** (_required_) - Amount in kobo\n- **reference** - Generate a reference or leave this param blank for Paystack to generate one for you\n- **callback_url** - Overrides the callback URL set on Paystack dashboard.\n- **plan** - If transaction is to create a subscription to a predefined plan, provide plan code here. This would invalidate the value provided in `amount`\n- **invoice_limit** - Number of times to charge customer during subscription to plan\n- **metadata** - Stringified JSON object. Add a `custom_fields` attribute which has an array of objects if you would like the fields to be added to your transaction when displayed on the dashboard.\n- **subaccount** - The code for the subaccount that owns the payment.\n- **transaction_charge** - A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split).\n- **bearer** - Who bears Paystack charges? `account` or `subaccount` (defaults to `account`).\n- **channels** - Send us 'card' or 'bank' or 'card','bank' as an array to specify what options to show the user paying" - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/transaction/id", - "method": "GET", - "params": [ - { - "parameter": "id", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **id** (_required_) - An ID for the transaction to fetch" - } - ], - "plan": [ - { - "api": "update", - "endpoint": ":id_or_plan_code", - "method": "PUT", - "params": [ - { - "parameter": "name", - "required": false, - "type": "String" - }, - { - "parameter": "description", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "interval", - "required": false, - "type": "String" - }, - { - "parameter": "send_invoices", - "required": false, - "type": "String" - }, - { - "parameter": "send_sms", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "invoice_limit", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **name** - Name of plan\n- **description** - Short description of plan\n- **amount** - Amount to be charged in kobo. Will override the amount for existing subscriptions.\n- **interval** - Interval in words. Valid intervals are `hourly`, `daily`, `weekly`, `monthly`, `annually`.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers.\n- **send_sms** - Set to false if you don't want text messages to be sent to your customers\n- **currency** - Currency in which amount is set\n- **invoice_limit** - Number of invoices to raise during subscription to this plan. Will not override `invoice_limit` set on active subscriptions." - }, - { - "api": "create", - "endpoint": "https://api.paystack.co/plan", - "method": "POST", - "params": [ - { - "parameter": "name", - "required": true, - "type": "String" - }, - { - "parameter": "description", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": true, - "type": "Number" - }, - { - "parameter": "interval", - "required": true, - "type": "String" - }, - { - "parameter": "send_invoices", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "invoice_limit", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **name** (_required_) - Name of plan\n- **description** - Short description of plan\n- **amount** (_required_) - Amount to be charged in kobo\n- **interval** (_required_) - Interval in words. Valid intervals are `hourly`, `daily`, `weekly`, `monthly`, `annually`.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers\n- **currency** - Currency in which amount is set\n- **invoice_limit** - Number of invoices to raise during subscription to this plan. Can be overridden by specifying an `invoice_limit` while subscribing." - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/plan", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - }, - { - "parameter": "interval", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **interval** - Filter list by plans with specified interval\n- **amount** - Filter list by plans with specified amount (in kobo)" - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/plan/id_or_plan_code", - "method": "GET", - "params": [], - "description": null - } - ], - "customer": [ - { - "api": "update", - "endpoint": "https://api.paystack.co/customer/:ID_OR_CUSTOMER_CODE", - "method": "PUT", - "params": [ - { - "parameter": "first_name", - "required": false, - "type": "String" - }, - { - "parameter": "last_name", - "required": false, - "type": "String" - }, - { - "parameter": "phone", - "required": false, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **first_name** - Customer's first name\n- **last_name** - Customer's last name\n- **phone** - Customer's phone number\n- **metadata** - A set of key/value pairs that you can attach to the customer. It can be used to store additional information in a structured format." - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/customer", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" - }, - { - "api": "create", - "endpoint": "https://api.paystack.co/customer", - "method": "POST", - "params": [ - { - "parameter": "email", - "required": true, - "type": "String" - }, - { - "parameter": "first_name", - "required": false, - "type": "String" - }, - { - "parameter": "last_name", - "required": false, - "type": "String" - }, - { - "parameter": "phone", - "required": false, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **email** (_required_) - Customer's email address\n- **first_name** - Customer's first name\n- **last_name** - Customer's last name\n- **phone** - Customer's phone number\n- **metadata** - A set of key/value pairs that you can attach to the customer. It can be used to store additional information in a structured format." - }, - { - "api": "fetch", - "endpoint": ":id_or_customer_code", - "method": "GET", - "params": [ - { - "parameter": "exclude_transactions", - "required": false, - "type": "String" - } - ], - "description": "**Query Params**\n- **exclude_transactions** - By default, fetching a customer returns all their transactions. Set this to true to disable this behaviour." - }, - { - "api": "set_risk_action", - "endpoint": "https://api.paystack.co/customer/set_risk_action", - "method": "POST", - "params": [ - { - "parameter": "customer", - "required": false, - "type": "String" - }, - { - "parameter": "risk_action", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **customer** - Customer's ID, code, or email address\n- **risk_action** - One of the possible risk actions. `allow` to whitelist. `deny` to blacklist." - }, - { - "api": "deactivate", - "endpoint": "https://api.paystack.co/customer/deactivate_authorization", - "method": "POST", - "params": [ - - { - "parameter": "authorization_code", - "required": true, - "type": "String" - }, - ], - "description": "For when the card needs to be forgotten...\n\n**Body Params**\n- **authorization_code** (_required_) - Authorization code to be deactivated\n\n" - } - ], - "refund": [ - { - "api": "create", - "endpoint": "https://api.paystack.co/refund", - "method": "POST", - "params": [ - - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "transaction", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "customer_note", - "required": false, - "type": "String" - }, - { - "parameter": "merchant_note", - "required": false, - "type": "String" - } - ], - "description": "This creates a refund which is then processed by the Paystack team\n\n**Body Params**\n- **transaction** _(required)_: Identifier for transaction to be refunded\n- **amount** _(optional)_: How much in kobo to be refunded to the customer. Amount is optional(defaults to original transaction amount) and cannot be more than the original transaction amount.\n- **currency**: Three-letter ISO currency\n- **customer_note** _(optional)_: customer reason\n- **merchant_note** _(optional)_: merchant reason" - }, - { - "api": "fetch", - "endpoint": ":id", - "method": "GET", - "params": [ - { - "parameter": "id", - "required": false, - "type": "String" - } - ], - "description": "**Path Params**\n- **id** - ID of the transaction to be refunded" - }, - { - "api": "fetch", - "endpoint": ":id", - "method": "GET", - "params": [ - { - "parameter": "id", - "required": false, - "type": "String" - } - ], - "description": "**Path Params**\n- **id** - ID of the transaction to be refunded" - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/refund", - "method": "GET", - "params": [ - - { - "parameter": "transaction", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - } - ], - "description": "**Query Parameters**\n\n- **transaction**\n- **currency**" - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/refund", - "method": "GET", - "params": [ - - { - "parameter": "transaction", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - } - ], - "description": "**Query Parameters**\n\n- **transaction**\n- **currency**" - } - ], - "integration": [ - { - "api": "update", - "endpoint": "https://api.paystack.co/integration/payment_session_timeout", - "method": "PUT", - "params": [ - { - "parameter": "timeout", - "required": false, - "type": "String" - } - ], - "description": "**Query Params**\n- **timeout** - Time before stopping session (in seconds). Set to 0 to cancel session timeouts" - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/integration/payment_session_timeout", - "method": "GET", - "params": [], - "description": null - } - ], - "balance": [ - { - "api": "check", - "endpoint": "https://api.paystack.co/balance", - "method": "GET", - "params": [], - "description": "You can only transfer from what you have" - }, - { - "api": "balance", - "endpoint": "https://api.paystack.co/balance/ledger", - "method": "GET", - "params": [], - "description": "Returns all activity carried out from and to the Paystack Balance" - } - ], - "settlement": [ - { - "api": "fetch", - "endpoint": "https://api.paystack.co/settlement", - "method": "GET", - "params": [ - { - "parameter": "from", - "required": false, - "type": "String" - }, - { - "parameter": "to", - "required": false, - "type": "String" - }, - { - "parameter": "subaccount", - "required": false, - "type": "String" - } - ], - "description": "Settlements made to your bank accounts and the bank accounts for your subaccounts\n\n**Query Params**\n- **from** - Lower bound of date range. Leave undefined to export settlement from day one.\n- **to** - Upper bound of date range. Leave undefined to export settlements till date.\n- **subaccount** - Provide a subaccount code to export only settlements for that subaccount. Set to `none` to export only transactions for the account." - } - ], - "decision": [ - { - "api": "resolve", - "endpoint": "{BIN)", - "method": "GET", - "params": [ - { - "parameter": "bin", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **bin** (_required_) - First 6 characters of card" - } - ], - "invoice": [ - { - "api": "archive", - "endpoint": ":id_or_code", - "method": "POST", - "params": [], - "description": "Used to archive an invoice. Invoice will no longer be fetched on list or returned on verify." - } - ], - "verifications": [ - { - "api": "resolve", - "endpoint": "https://api.paystack.co/verifications", - "method": "POST", - "params": [ - - { - "parameter": "Body Parameters", - "required": false, - "type": "String" - }, - { - "parameter": "verification_type", - "required": true, - "type": "String" - }, - { - "parameter": "phone", - "required": true, - "type": "String" - }, - { - "parameter": "callback_url", - "required": false, - "type": "String" - } - ], - "description": "Using the Truecaller API you can verify the authenticity of a customer. It returns the customer's name, phone number, email, social media handles and organization as available on their Truecaller profile.\n\n**Body Parameters**\n- **verification_type** _(required)_\n- **phone** _(required)_ - Customer phone number starting with country code (without the + prefix)\n- **callback_url** - Link on server to receive the truecaller details" - } - ] -} \ No newline at end of file diff --git a/lib/Paystack/webhooks.js b/lib/Paystack/webhooks.js deleted file mode 100644 index ec3ff62..0000000 --- a/lib/Paystack/webhooks.js +++ /dev/null @@ -1,179 +0,0 @@ -module.exports = { - 'charge.success':{ - "event":"charge.success", - "data":{ - "id":302961, - "domain":"live", - "status":"success", - "reference":"qTPrJoy9Bx", - "amount":10000, - "message":null, - "gateway_response":"Approved by Financial Institution", - "paid_at":"2016-09-30T21:10:19.000Z", - "created_at":"2016-09-30T21:09:56.000Z", - "channel":"card", - "currency":"NGN", - "ip_address":"41.242.49.37", - "metadata":0, - "log":{ - "time_spent":16, - "attempts":1, - "authentication":"pin", - "errors":0, - "success":false, - "mobile":false, - "input":[ - - ], - "channel":null, - "history":[ - { - "type":"input", - "message":"Filled these fields: card number, card expiry, card cvv", - "time":15 - }, - { - "type":"action", - "message":"Attempted to pay", - "time":15 - }, - { - "type":"auth", - "message":"Authentication Required: pin", - "time":16 - } - ] - }, - "fees":null, - "customer":{ - "id":68324, - "first_name":"BoJack", - "last_name":"Horseman", - "email":"bojack@horseman.com", - "customer_code":"CUS_qo38as2hpsgk2r0", - "phone":null, - "metadata":null, - "risk_action":"default" - }, - "authorization":{ - "authorization_code":"AUTH_f5rnfq9p", - "bin":"539999", - "last4":"8877", - "exp_month":"08", - "exp_year":"2020", - "card_type":"mastercard DEBIT", - "bank":"Guaranty Trust Bank", - "country_code":"NG", - "brand":"mastercard" - }, - "plan":{} - } - }, - 'transfer.success':{ - event: "transfer.success", - data: { - domain: "live", - amount: 10000, - currency: "NGN", - source: "balance", - source_details: null, - reason: "Bless you", - recipient: { - domain: "live", - type: "nuban", - currency: "NGN", - name: "Someone", - details: { - account_number: "0123456789", - account_name: null, - bank_code: "058", - bank_name: "Guaranty Trust Bank" - }, - description: null, - metadata: null, - recipient_code: "RCP_xoosxcjojnvronx", - active: true - }, - status: "success", - transfer_code: "TRF_zy6w214r4aw9971", - transferred_at: "2017-03-25T17:51:24.000Z", - created_at: "2017-03-25T17:48:54.000Z" - } - }, - 'subscription.create':{ - "event": "subscription.create", - "data": { - "domain": "test", - "status": "active", - "subscription_code": "SUB_vsyqdmlzble3uii", - "amount": 50000, - "cron_expression": "0 0 28 * *", - "next_payment_date": "2016-05-19T07:00:00.000Z", - "open_invoice": null, - "createdAt": "2016-03-20T00:23:24.000Z", - "plan": { - "name": "Monthly retainer", - "plan_code": "PLN_gx2wn530m0i3w3m", - "description": null, - "amount": 50000, - "interval": "monthly", - "send_invoices": true, - "send_sms": true, - "currency": "NGN" - }, - "authorization": { - "authorization_code": "AUTH_96xphygz", - "bin": "539983", - "last4": "7357", - "exp_month": "10", - "exp_year": "2017", - "card_type": "MASTERCARD DEBIT", - "bank": "GTBANK", - "country_code": "NG", - "brand": "MASTERCARD" - }, - "customer": { - "first_name": "BoJack", - "last_name": "Horseman", - "email": "bojack@horsinaround.com", - "customer_code": "CUS_xnxdt6s1zg1f4nx", - "phone": "", - "metadata": {}, - "risk_action": "default" - }, - "created_at": "2016-10-01T10:59:59.000Z" - } - }, - 'transfer.failed':{ - "event": "transfer.failed", - "data": { - "domain": "test", - "amount": 10000, - "currency": "NGN", - "source": "balance", - "source_details": null, - "reason": "Test", - "recipient": { - "domain": "live", - "type": "nuban", - "currency": "NGN", - "name": "Test account", - "details": { - "account_number": "0000000000", - "account_name": null, - "bank_code": "058", - "bank_name": "Zenith Bank" - }, - "description": null, - "metadata": null, - "recipient_code": "RCP_7um8q67gj0v4n1c", - "active": true - }, - "status": "failed", - "transfer_code": "TRF_3g8pc1cfmn00x6u", - "transferred_at": null, - "created_at": "2017-12-01T08:51:37.000Z" - } - } - -} \ No newline at end of file diff --git a/lib/db.js b/lib/db.js index 449d969..07c25d4 100644 --- a/lib/db.js +++ b/lib/db.js @@ -1,29 +1,42 @@ -const rl = require('readline'); +import { LowSync } from 'lowdb'; +import { JSONFileSync } from 'lowdb/node'; -const low = require('lowdb') -const FileSync = require('lowdb/adapters/FileSync') +const adapter = new JSONFileSync('db.json'); +const db = new LowSync(adapter, { + token: '', + user: {}, + selected_integration: {}, +}); -const adapter = new FileSync('db.json') -const db = low(adapter) +db.read(); +db.write(); -db.defaults({ token: '', user: {}, selected_integration: {} }).write(); +export function write(key, value) { + db.data[key] = value; + db.write(); +} +export function read(key) { + return db.data[key]; +} +export function addToList(key, value) { + const list = read(key); + if (Array.isArray(list)) { + list.push(value); + write(key, list); + } else { + console.error(`db.${key} is not a list.`); + } +} -module.exports = { - write: function (key, value) { - db.set(key, value).write(); - }, - read: function (key) { - return db.get(key).value(); - }, - addToList: function (key, value) { - db.get(key) - .push(value) - .write() - }, - query: function (key, query) { - return db.get(key) - .find(query).value() - } -} \ No newline at end of file +export function query(key, query) { + const list = read(key); + if (Array.isArray(list)) { + // should this use filter ?? + // what type do we want to return + return list.find(query); + } else { + console.error(`db.${key} can't be queried.`); + } +} diff --git a/lib/helpers.js b/lib/helpers.js index f2e9333..7dd195f 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -1,138 +1,148 @@ -const readlineSync = require('readline-sync'); -const chalk = require('chalk'); -const url = require('url'); -const APIs = require('./paystack/apis') -const axios = require('axios') -function prompt(question, mute = false) { - return readlineSync.question(question, { hideEchoBack: mute }) -} -const promiseWrapper = promise => ( - promise - .then(data => ([null, data])) - .catch(error => ([error])) -); +import chalk from 'chalk'; +import readlineSync from 'readline-sync'; +import url from 'url'; +import APIs from './paystack/apis.js'; +import axios from 'axios'; +import progressBar from 'progressbar'; -function jsonLog(json) { - infoLog(JSON.stringify(json, null, 2)); +export function prompt(question, mute = false) { + return readlineSync.question(question, { hideEchoBack: mute }); } -function successLog(error) { - const eLog = chalk.green(error) - console.log(eLog) + +export const promiseWrapper = (promise) => + promise.then((data) => [null, data]).catch((error) => [error]); + +export function jsonLog(json) { + infoLog(JSON.stringify(json, null, 2)); } -function errorLog(error) { - const eLog = chalk.red(error) - console.log(eLog) + +export function successLog(error) { + const eLog = chalk.green(error); + console.log(eLog); } -function isJson(val) { - - return val instanceof Array || val instanceof Object ? true : false; +export function errorLog(error) { + const eLog = chalk.red(error); + console.log(eLog); +} +export function isJson(val) { + return val instanceof Array || val instanceof Object ? true : false; } -function loader() { - let progress = require('progressbar').create().step('. .') +export function loader() { + let progress = progressBar.create().step('. .'); return new Promise((resolve, reject) => { [ () => progress.setTotal(3), () => progress.addTick(), () => progress.addTick(), () => progress.addTick(), - () => progress.finish() // remove and destroy the progress bar + () => progress.finish(), // remove and destroy the progress bar ].forEach(function (step, index) { - setTimeout(step, index * 1000) - - }) + setTimeout(step, index * 1000); + }); resolve('hello'); - }) + }); } -function infoLog(error) { - const eLog = chalk.blueBright(error) - console.log(eLog) + +export function infoLog(error) { + const eLog = chalk.blueBright(error); + console.log(eLog); } -function parseURL(uri) { - if (!uri.startsWith('http')) uri = 'http://' + uri - return url.parse(uri) +export function parseURL(uri) { + if (!uri.startsWith('http')) uri = 'http://' + uri; + return url.parse(uri); } -function findSchema(command, args) { + +export function findSchema(command, args) { let schema; APIs[command].forEach((f) => { if (f.api == args.command) { schema = f; } - }) + }); return schema; } function getKeys(token, type = 'secret', domain = 'test') { return new Promise((resolve, reject) => { - axios.get('https://api.paystack.co/integration/keys', { headers: { Authorization: 'Bearer ' + token, 'jwt-auth': true } }).then(response => { - let key = {}; - let keys = response.data.data; - if (keys.length) { - for (let i = 0; i < keys.length; i++) { - if (keys[i].domain === domain && keys[i].type === type) { - key = keys[i] - break + axios + .get('https://api.paystack.co/integration/keys', { + headers: { Authorization: 'Bearer ' + token, 'jwt-auth': true }, + }) + .then((response) => { + let key = {}; + let keys = response.data.data; + if (keys.length) { + for (let i = 0; i < keys.length; i++) { + if (keys[i].domain === domain && keys[i].type === type) { + key = keys[i]; + break; + } } } - } - resolve(key.key) - }).catch(error => { - if (error.response) { - reject(error.response.data.message) - return - } - reject(error) - }) - }) + resolve(key.key); + }) + .catch((error) => { + if (error.response) { + reject(error.response.data.message); + return; + } + reject(error); + }); + }); } -async function executeSchema(schema, args) { +export async function executeSchema(schema, args) { let domain = 'test'; if (args.options.domain) { - domain = args.options.domain + domain = args.options.domain; } let token = db.read('token'); let key = await getKeys(token, 'secret', domain); let instance = axios.create({ baseURL: 'https://api.paystack.co', timeout: 3000, - headers: { 'Authorization': 'Bearer ' + key } + headers: { Authorization: 'Bearer ' + key }, }); return new Promise((resolve, reject) => { let query, data; if (schema.method == 'GET') query = args.options; if (schema.method == 'POST') data = args.options; if (schema.endpoint.indexOf('{')) { - let path = schema.endpoint.slice(schema.endpoint.indexOf('{') + 1, schema.endpoint.indexOf('}')) - - schema.endpoint = schema.endpoint.replace('{' + path + '}', args.options[path]); + let path = schema.endpoint.slice( + schema.endpoint.indexOf('{') + 1, + schema.endpoint.indexOf('}') + ); + schema.endpoint = schema.endpoint.replace( + '{' + path + '}', + args.options[path] + ); } instance({ url: schema.endpoint, method: schema.method, query, - data - }).then((resp) => { - resolve(resp.data) - }).catch((err) => { - reject(err.response.data.message) + data, }) - }) + .then((resp) => { + resolve(resp.data); + }) + .catch((err) => { + reject(err.response.data.message); + }); + }); } -function getDescription(section, title) { - let desc = '' +export function getDescription(section, title) { + let desc = ''; section.forEach((f) => { - desc = desc + ', ' + f.api - }) + desc = desc + ', ' + f.api; + }); desc = desc + ' ' + title; desc = desc.slice(1); return desc; } - - -module.exports = { prompt, promiseWrapper, successLog, jsonLog , errorLog, infoLog, isJson, loader, parseURL, findSchema, executeSchema, getDescription} \ No newline at end of file diff --git a/lib/paystack/apis.js b/lib/paystack/apis.js new file mode 100644 index 0000000..8247350 --- /dev/null +++ b/lib/paystack/apis.js @@ -0,0 +1,2120 @@ +#!/usr/bin/env node + +export default { + subaccount: [ + { + api: 'update', + endpoint: 'https://api.paystack.co/subaccount', + method: 'PUT', + params: [], + description: null, + }, + { + api: 'fetch', + endpoint: 'https://api.paystack.co/subaccount/{ID}', + method: 'GET', + params: [], + description: null, + }, + { + api: 'list', + endpoint: 'https://api.paystack.co/subaccount', + method: 'GET', + params: [ + { + parameter: 'perPage', + required: false, + type: 'String', + }, + { + parameter: 'page', + required: false, + type: 'Number', + }, + ], + description: + '**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve', + }, + { + api: 'create', + endpoint: 'https://api.paystack.co/subaccount', + method: 'POST', + params: [ + { + parameter: 'business_name', + required: true, + type: 'String', + }, + { + parameter: 'settlement_bank', + required: true, + type: 'String', + }, + { + parameter: 'account_number', + required: true, + type: 'String', + }, + { + parameter: 'percentage_charge', + required: true, + type: 'String', + }, + { + parameter: 'primary_contact_email', + required: false, + type: 'String', + }, + { + parameter: 'primary_contact_name', + required: false, + type: 'String', + }, + { + parameter: 'primary_contact_phone', + required: false, + type: 'String', + }, + { + parameter: 'metadata', + required: false, + type: 'String', + }, + { + parameter: 'settlement_schedule', + required: false, + type: 'String', + }, + { + parameter: + 'eceive payments for the created subaccount by providing their code when doing a transaction. More details here: [Split Payments Overview](https://developers.paystack.co/v1.0/docs/splitpaymentsoverview', + required: false, + type: 'String', + }, + ], + description: + '**Body Params**\n- **business_name** (_required_) - Name of business for subaccount\n- **settlement_bank** (_required_) - Name of Bank (see list of accepted names by calling [List Banks](https://developers.paystack.co/v1.0/docs/list-banks)\n- **account_number** (_required_) - NUBAN Bank Account Number\n- **percentage_charge** (_required_) - What is the default percentage charged when receiving on behalf of this subaccount?\n- **primary_contact_email** - A contact email for the subaccount\n- **primary_contact_name** - A name for the contact person for this subaccount\n- **primary_contact_phone** - A phone number to call for this subaccount\n- **metadata** - Stringified JSON object\n- **settlement_schedule** - Any of `auto`, `weekly`, `monthly`, `manual`. Auto means payout is T+1 and manual means payout to the subaccount should only be made when requested.\n\nReceive payments for the created subaccount by providing their code when doing a transaction. More details here: [Split Payments Overview](https://developers.paystack.co/v1.0/docs/split-payments-overview)', + }, + ], + page: [ + { + api: 'update', + endpoint: 'https://api.paystack.co/page/', + method: 'PUT', + params: [ + { + parameter: 'name', + required: false, + type: 'String', + }, + { + parameter: 'description', + required: false, + type: 'String', + }, + { + parameter: 'amount', + required: false, + type: 'Number', + }, + { + parameter: 'active', + required: false, + type: 'String', + }, + ], + description: + '**Body Params**\n- **name** - Name of page\n- **description** - Short description of page\n- **amount** - Amount to be charged in kobo. Will override the amount for existing subscriptions.\n- **active** - Set to false to deactivate page url.', + }, + { + api: 'fetch', + endpoint: 'https://api.paystack.co/page/id_or_plan_code', + method: 'GET', + params: [], + description: null, + }, + { + api: 'list', + endpoint: 'https://api.paystack.co/page', + method: 'GET', + params: [ + { + parameter: 'perPage', + required: false, + type: 'String', + }, + { + parameter: 'page', + required: false, + type: 'Number', + }, + { + parameter: 'interval', + required: false, + type: 'String', + }, + { + parameter: 'amount', + required: false, + type: 'Number', + }, + ], + description: + '**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **interval** - Filter list by plans with specified interval\n- **amount** - Filter list by plans with specified amount (in kobo)', + }, + { + api: 'check', + endpoint: 'https://api.paystack.co/page/check_slug_availability/slug', + method: 'GET', + params: [ + { + parameter: 'slug', + required: true, + type: 'String', + }, + ], + description: + '**Path Params**\n- **slug** (_required_) - URL slug to be confirmed', + }, + { + api: 'create', + endpoint: 'https://api.paystack.co/page', + method: 'POST', + params: [ + { + parameter: 'name', + required: true, + type: 'String', + }, + { + parameter: 'description', + required: false, + type: 'String', + }, + { + parameter: 'amount', + required: false, + type: 'Number', + }, + { + parameter: 'slug', + required: false, + type: 'String', + }, + { + parameter: 'redirect_url', + required: false, + type: 'String', + }, + { + parameter: 'send_invoices', + required: false, + type: 'String', + }, + { + parameter: 'custom_fields', + required: false, + type: 'String', + }, + + { + parameter: + 'end pages created to your customers by giving out a link in this format https://paystack.com/pay/:slug. For instance, a valid link for the page above would be https://paystack.com/pay/5nApBwZkv', + required: false, + type: 'String', + }, + ], + description: + "**Body Params**\n- **name** (_required_) - Name of page\n- **description** - Short description of page\n- **amount** - Default amount you want to accept using this page. If none is set, customer is free to provide any amount of their choice. The latter scenario is useful for accepting donations\n- **slug** - URL slug you would like to be associated with this page. Page will be accessible at https://paystack.com/pay/[slug]\n- **redirect_url** - If you would like Paystack to redirect someplace upon successful payment, specify the URL here.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers\n- **custom_fields** - If you would like to accept custom fields, specify them here. See sample code for details.\n\nSend pages created to your customers by giving out a link in this format https://paystack.com/pay/:slug. For instance, a valid link for the page above would be https://paystack.com/pay/5nApBwZkvY", + }, + ], + transfer: [ + { + api: 'list', + endpoint: 'https://api.paystack.co/transfer', + method: 'GET', + params: [ + { + parameter: 'perPage', + required: false, + type: 'String', + }, + { + parameter: 'page', + required: false, + type: 'Number', + }, + ], + description: + '**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve', + }, + { + api: 'finalize', + endpoint: 'https://api.paystack.co/transfer/finalize_transfer', + method: 'POST', + params: [ + { + parameter: 'transfer_code', + required: true, + type: 'String', + }, + { + parameter: 'otp', + required: true, + type: 'String', + }, + ], + description: + '**Body Params**\n- **transfer_code** (_required_) - Transfer code\n- **otp** (_required_) - OTP sent to business phone to verify transfer.', + }, + { + api: 'initiate', + endpoint: 'https://api.paystack.co/transfer', + method: 'POST', + params: [ + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: 'source', + required: true, + type: 'String', + }, + { + parameter: 'amount', + required: false, + type: 'Number', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + { + parameter: 'reason', + required: false, + type: 'String', + }, + { + parameter: 'recipient', + required: true, + type: 'String', + }, + { + parameter: 'reference', + required: false, + type: 'String', + }, + ], + description: + 'Status of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’.\n\n**Body Params**\n- **source** (_required_) - Where should we transfer from? Only balance for now\n- **amount** - Amount to transfer in kobo\n- **currency** - NGN\n- **reason**\n- **recipient** (_required_) - Code for transfer recipient\n- **reference** - If specified, the field should be a unique identifier (in lowercase) for the object. Only `-` `,` `_` and alphanumeric characters allowed.', + }, + { + api: 'verify', + endpoint: 'https://api.paystack.co/transfer/{reference}', + method: 'GET', + params: [ + { + parameter: 'perPage', + required: false, + type: 'String', + }, + { + parameter: 'reference', + required: true, + type: 'String', + }, + { + parameter: 'page', + required: false, + type: 'Number', + }, + ], + description: + '**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve', + }, + { + api: 'disable', + endpoint: 'https://api.paystack.co/transfer/disable_otp', + method: 'POST', + params: [ + { + parameter: + 'n the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. An OTP is sent to you on your business phone', + required: true, + type: 'String', + }, + ], + description: + 'In the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. You will get an OTP.\n\nIn the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. An OTP is sent to you on your business phone.', + }, + { + api: 'enable', + endpoint: 'https://api.paystack.co/transfer/enable_otp', + method: 'POST', + params: [], + description: + 'In the event that a customer wants to stop being able to complete transfers programmatically, this endpoint helps turn OTP requirement back on. No arguments required.', + }, + { + api: 'initiate', + endpoint: 'https://api.paystack.co/transfer/bulk', + method: 'POST', + params: [ + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: '(no name)', + required: false, + type: 'String', + }, + + { + parameter: + 'tatus of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’', + required: true, + type: 'String', + }, + ], + description: + 'You need to disable the Transfers OTP requirement to use this endpoint.\n\n**Body Params**\n- **(no name)**\n\nStatus of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’.', + }, + { + api: 'finalize', + endpoint: 'https://api.paystack.co/transfer/disable_otp_finalize', + method: 'POST', + params: [ + { + parameter: 'otp', + required: true, + type: 'String', + }, + ], + description: + '**Body Params**\n- **otp** (_required_) - OTP sent to business phone to verify disabling OTP requirement\n\n', + }, + { + api: 'fetch', + endpoint: 'https://api.paystack.co/transfer/id', + method: 'GET', + params: [ + { + parameter: 'id_or_code', + required: true, + type: 'String', + }, + ], + description: + '**Path Params**\n- **id_or_code** (_required_) - An ID or code for the transfer whose details you want to retrieve.', + }, + { + api: 'list', + endpoint: 'https://api.paystack.co/transfer/id_or_code', + method: 'GET', + params: [ + { + parameter: 'perPage', + required: false, + type: 'String', + }, + { + parameter: 'page', + required: false, + type: 'Number', + }, + ], + description: + 'This lists all bulk charge batches created by the integration. Statuses can be `active`, `paused`, or `complete`.\n\n**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve', + }, + { + api: 'resend', + endpoint: 'https://api.paystack.co/transfer/resend_otp', + method: 'POST', + params: [ + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: 'transfer_code', + required: true, + type: 'String', + }, + { + parameter: 'reason', + required: true, + type: 'String', + }, + ], + description: + 'Creates a new recipient. An duplicate account number will lead to the retrieval of the existing record.\n\n**Body Params**\n- **transfer_code** (_required_) - Transfer code\n- **reason** (_required_) - either `resend_otp` or `transfer`', + }, + ], + paymentrequest: [ + { + api: 'create', + endpoint: 'https://api.paystack.co/paymentrequest', + method: 'POST', + params: [ + { + parameter: 'customer', + required: true, + type: 'String', + }, + { + parameter: 'due_date', + required: true, + type: 'String', + }, + { + parameter: 'amount', + required: true, + type: 'Number', + }, + { + parameter: 'description', + required: false, + type: 'String', + }, + { + parameter: 'line_items', + required: false, + type: 'String', + }, + { + parameter: 'tax', + required: false, + type: 'String', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + { + parameter: 'send_notification', + required: false, + type: 'String', + }, + { + parameter: 'draft', + required: false, + type: 'String', + }, + { + parameter: 'send_notification', + required: false, + type: 'String', + }, + { + parameter: 'has_invoice', + required: false, + type: 'String', + }, + { + parameter: 'invoice_number', + required: false, + type: 'String', + }, + ], + description: + '**Body Params**\n- **customer** (_required_) - Customer ID or code\n- **due_date** (_required_) - ISO 8601 representation of request due date\n- **amount** (_required_) - Invoice amount. Only useful if line items and tax values are ignored. endpoint will throw a friendly warning if neither is available.\n- **description**\n- **line_items** - Array of line items in the format `[{"name":"item 1", "amount":2000}]`\n- **tax** - Array of taxes to be charged in the format `[{"name":"VAT", "amount":2000}]`\n- **currency** - Defaults to Naira\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`.\n- **draft** - Indicate if request should be saved as draft. Defaults to `false` and overrides send_notification.\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`.\n- **has_invoice** - Set to `true` to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no `line_items` or `tax` passed.\n- **invoice_number** - Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point.', + }, + { + api: 'finalize', + endpoint: 'https://api.paystack.co/paymentrequest/finalize/ID_OR_CODE', + method: 'POST', + params: [ + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: 'send_notification', + required: false, + type: 'String', + }, + ], + description: + 'Publishes invoice that is draft by sending customer the invoice via email\n\n**Body Params**\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`', + }, + { + api: 'send', + endpoint: 'https://api.paystack.co/paymentrequest/notify/ID_OR_CODE', + method: 'POST', + params: [ + { + parameter: 'id', + required: false, + type: 'String', + }, + ], + description: + '**Path Params**\n- **id** - Invoice code for which you want to send a notification for', + }, + { + api: 'list', + endpoint: 'https://api.paystack.co/paymentrequest', + method: 'GET', + params: [ + { + parameter: 'customer', + required: false, + type: 'String', + }, + { + parameter: 'status', + required: false, + type: 'String', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + { + parameter: 'paid', + required: false, + type: 'String', + }, + { + parameter: 'include_archive', + required: false, + type: 'String', + }, + { + parameter: 'payment_request', + required: false, + type: 'String', + }, + ], + description: + "**Query Params**\n- **customer** - Specify an ID for the customer whose requests you want to retrieve\n- **status** - Filter requests by status ('failed', 'success', 'abandoned')\n- **currency** - Filter requests sent in a particular currency.\n- **paid** - Filter requests that have been paid for \n- **include_archive** - Includes archived requests in the response\n- **payment_request** - Filter specific invoice by passing invoice code", + }, + { + api: 'view', + endpoint: 'https://api.paystack.co/paymentrequest/REQUEST_ID_OR_CODE', + method: 'GET', + params: [ + { + parameter: 'id', + required: true, + type: 'String', + }, + ], + description: + '**Path Params**\n- **id** _(required)_ - An ID for the Invoice', + }, + { + api: 'invoice', + endpoint: 'https://api.paystack.co/paymentrequest/totals', + method: 'GET', + params: [], + description: null, + }, + { + api: 'update', + endpoint: 'https://api.paystack.co/paymentrequest/ID_OR_CODE', + method: 'PUT', + params: [ + { + parameter: 'description', + required: false, + type: 'String', + }, + { + parameter: 'amount', + required: false, + type: 'Number', + }, + { + parameter: 'line_item', + required: false, + type: 'String', + }, + { + parameter: 'tax', + required: false, + type: 'String', + }, + { + parameter: 'due_date', + required: false, + type: 'String', + }, + { + parameter: 'metadata', + required: false, + type: 'String', + }, + { + parameter: 'send_notification', + required: false, + type: 'String', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + { + parameter: 'customer', + required: false, + type: 'String', + }, + ], + description: + '**Body Params**\n- **description**\n- **amount**\n- **line_item**\n- **tax**\n- **due_date**\n- **metadata**\n- **send_notification**\n- **currency** - only works in draft mode\n- **customer** - only works in draft mode', + }, + { + api: 'verify', + endpoint: 'https://api.paystack.co/paymentrequest/verify/{ID}', + method: 'GET', + params: [ + { + parameter: 'ID', + required: false, + type: 'String', + }, + + { + parameter: + 'ote that a key is added called `pending_amount` when you fetch an invoice. This is because when paying for an invoice, you can choose to pay part but not all. Whenever a successful transaction is made, the key updates to reveal what’s left of the invoice to pay', + required: false, + type: 'String', + }, + ], + description: + '**Path Params**\n- **ID** - The invoice code for the Payment Request to be verified\n\nNote that a key is added called `pending_amount` when you fetch an invoice. This is because when paying for an invoice, you can choose to pay part but not all. Whenever a successful transaction is made, the key updates to reveal what’s left of the invoice to pay.', + }, + ], + transferrecipient: [ + { + api: 'create', + endpoint: 'https://api.paystack.co/transferrecipient', + method: 'POST', + params: [ + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: 'type', + required: true, + type: 'String', + }, + { + parameter: 'name', + required: true, + type: 'String', + }, + { + parameter: 'metadata', + required: false, + type: 'String', + }, + { + parameter: 'bank_code', + required: true, + type: 'String', + }, + { + parameter: 'account_number', + required: true, + type: 'String', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + { + parameter: 'description', + required: false, + type: 'String', + }, + ], + description: + 'Creates a new recipient. An duplicate account number will lead to the retrieval of the existing record.\n\n**Body Params**\n- **type** (_required_) - Recipient Type (Only nuban at this time)\n- **name** (_required_) - A name for the recipient\n- **metadata** - Store additional information about your recipient in a structured format. JSON\n- **bank_code** (_required_) - Required if type is nuban. You can find a list of bank codes at [api.paystack.co/bank](https://api.paystack.co/bank)\n- **account_number** (_required_) - Required if type is `nuban`\n- **currency** - Currency for the account receiving the transfer.\n- **description**', + }, + { + api: 'delete', + endpoint: 'https://api.paystack.co/transferrecipient', + method: 'DELETE', + params: [], + description: null, + }, + { + api: 'list', + endpoint: 'https://api.paystack.co/transferrecipient', + method: 'GET', + params: [ + { + parameter: 'perPage', + required: false, + type: 'String', + }, + { + parameter: 'page', + required: false, + type: 'Number', + }, + ], + description: + '**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve', + }, + { + api: 'update', + endpoint: '{recipient_code_or_id}', + method: 'PUT', + params: [], + description: null, + }, + ], + subscription: [ + { + api: 'disable', + endpoint: 'https://api.paystack.co/subscription/disable', + method: 'POST', + params: [ + { + parameter: 'code', + required: true, + type: 'String', + }, + { + parameter: 'token', + required: true, + type: 'String', + }, + ], + description: + '**Body Params**\n- **code** (_required_) - Subscription code\n- **token** (_required_) - Email token', + }, + { + api: 'fetch', + endpoint: ':id_or_subscription_code', + method: 'GET', + params: [], + description: null, + }, + { + api: 'create', + endpoint: 'https://api.paystack.co/subscription', + method: 'POST', + params: [ + { + parameter: 'customer', + required: true, + type: 'String', + }, + { + parameter: 'plan', + required: true, + type: 'String', + }, + { + parameter: 'authorization', + required: false, + type: 'String', + }, + { + parameter: 'start_date', + required: false, + type: 'String', + }, + + { + parameter: + 'ote the `email_token` attribute for the subscription object. We create one on each subscription so customers can cancel their subscriptions from within the invoices sent to their mailboxes. Since they are not authorized, the email tokens are what we use to authenticate the requests over the API', + required: false, + type: 'String', + }, + ], + description: + "**Body Params**\n- **customer** (_required_) - Customer's email address or customer code\n- **plan** (_required_) - Plan code\n- **authorization** - If customer has multiple authorizations, you can set the desired authorization you wish to use for this subscription here. If this is not supplied, the customer's most recent authorization would be used\n- **start_date** - Set the date for the first debit. (ISO 8601 format)\n\nNote the `email_token` attribute for the subscription object. We create one on each subscription so customers can cancel their subscriptions from within the invoices sent to their mailboxes. Since they are not authorized, the email tokens are what we use to authenticate the requests over the API.", + }, + { + api: 'list', + endpoint: 'https://api.paystack.co/subscription', + method: 'GET', + params: [ + { + parameter: 'perPage', + required: false, + type: 'String', + }, + { + parameter: 'page', + required: false, + type: 'Number', + }, + { + parameter: 'customer', + required: false, + type: 'String', + }, + { + parameter: 'plan', + required: false, + type: 'String', + }, + ], + description: + '**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **customer** - Filter by Customer ID\n- **plan** - Filter by Plan ID', + }, + { + api: 'enable', + endpoint: 'https://api.paystack.co/subscription/enable', + method: 'POST', + params: [ + { + parameter: 'code', + required: true, + type: 'String', + }, + { + parameter: 'token', + required: true, + type: 'String', + }, + ], + description: + '**Body Params**\n- **code** (_required_) - Subscription code\n- **token** (_required_) - Email token', + }, + ], + bulkcharge: [ + { + api: 'fetch', + endpoint: 'https://api.paystack.co/bulkcharge/id_or_code', + method: 'GET', + params: [ + { + parameter: 'Path Params', + required: false, + type: 'String', + }, + { + parameter: 'id_or_code', + required: true, + type: 'String', + }, + ], + description: + 'This endpoint retrieves a specific batch code. It also returns useful information on its progress by way of the `total_charges` and `pending_charges` attributes.\n\n**Path Params**\n- **id_or_code** (_required_) - An ID or code for the transfer whose details you want to retrieve.', + }, + { + api: 'fetch', + endpoint: 'https://api.paystack.co/bulkcharge/id_or_code/charges', + method: 'GET', + params: [ + { + parameter: 'Path Params', + required: false, + type: 'String', + }, + { + parameter: 'id_or_code', + required: true, + type: 'String', + }, + + { + parameter: 'status', + required: false, + type: 'String', + }, + { + parameter: 'perPage', + required: false, + type: 'String', + }, + { + parameter: 'page', + required: false, + type: 'Number', + }, + ], + description: + 'This endpoint retrieves the charges associated with a specified batch code. Pagination parameters are available. You can also filter by status. Charge statuses can be `pending`, `success` or `failed`.\n\n**Path Params**\n- **id_or_code** (_required_) - An ID or code for the batch whose charges you want to retrieve.\n\n**Query Params**\n- **status** - `pending`, `success` or `failed`\n- **perPage**\n- **page**\n', + }, + { + api: 'initiate', + endpoint: 'https://api.paystack.co/bulkcharge', + method: 'POST', + params: [ + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: '(no_name)', + required: false, + type: 'String', + }, + ], + description: + 'Send an array of objects with authorization codes and amount in kobo so we can process transactions as a batch.\n\n**Body Params**\n- **(no_name)**', + }, + { + api: 'resume', + endpoint: 'https://api.paystack.co/bulkcharge/resume/batch_code', + method: 'GET', + params: [ + { + parameter: 'Path Params', + required: false, + type: 'String', + }, + { + parameter: 'batch_code', + required: true, + type: 'String', + }, + ], + description: + 'Use this endpoint to pause processing a batch\n\n**Path Params**\n- **batch_code** (_required_)', + }, + { + api: 'pause', + endpoint: 'https://api.paystack.co/bulkcharge/pause/batch_code', + method: 'GET', + params: [ + { + parameter: 'Path Params', + required: false, + type: 'String', + }, + { + parameter: 'batch_code', + required: true, + type: 'String', + }, + ], + description: + 'Use this endpoint to pause processing a batch\n\n**Path Params**\n- **batch_code** (_required_)', + }, + ], + bank: [ + { + api: 'list', + endpoint: 'https://api.paystack.co/bank', + method: 'GET', + params: [], + description: null, + }, + { + api: 'resolve', + endpoint: '?account_number=ACCOUNT_NUMBER&bank_code=BANK_CODE', + method: 'GET', + params: [ + { + parameter: 'account_number', + required: false, + type: 'String', + }, + { + parameter: 'bank_code', + required: false, + type: 'String', + }, + ], + description: + '**Path Params**\n- **account_number** - Account Number\n- **bank_code** - Bank Code', + }, + { + api: 'resolve', + endpoint: '{BVN}', + method: 'GET', + params: [ + { + parameter: 'bvn', + required: true, + type: 'String', + }, + ], + description: '**Path Params**\n- **bvn** (_required_) - 11 digit BVN', + }, + { + api: 'match', + endpoint: '{ACCOUNT_NUMBER}&bank_code={BANK_CODE}&bvn={BVN}', + method: 'GET', + params: [ + { + parameter: 'Path Params', + required: false, + type: 'String', + }, + { + parameter: '*account_number* _(required)_ Bank account numbe', + required: true, + type: 'String', + }, + { + parameter: + '*bank_code* _(required)_ Bank code from [List Bank endpoint](https://api.paystack.co/bank', + required: true, + type: 'String', + }, + { + parameter: '*bvn* _(required)_ 11 digit BV', + required: true, + type: 'String', + }, + ], + description: + "The Match BVN endpoint checks if the account number for a bank belongs to a user's BVN\n\n**Path Params**\n- *account_number* _(required)_ - Bank account number\n- *bank_code* _(required)_ - Bank code from [List Bank endpoint](https://api.paystack.co/bank)\n- *bvn* _(required)_ - 11 digit BVN", + }, + ], + charge: [ + { + api: 'submit', + endpoint: 'https://api.paystack.co/charge/submit_otp', + method: 'POST', + params: [ + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: 'otp', + required: true, + type: 'String', + }, + { + parameter: 'reference', + required: true, + type: 'String', + }, + ], + description: + 'Submit OTP to complete a charge\n\n**Body Params**\n- **otp** (_required_) - OTP submitted by user\n- **reference** (_required_) - reference for ongoing transaction', + }, + { + api: 'submit', + endpoint: 'https://api.paystack.co/charge/submit_pin', + method: 'POST', + params: [ + { + parameter: 'pin', + required: true, + type: 'String', + }, + { + parameter: 'reference', + required: true, + type: 'String', + }, + ], + description: + '**Body Params**\n- **pin** (_required_) - PIN submitted by user\n- **reference** (_required_) - reference for transaction that requested pin', + }, + { + api: 'submit', + endpoint: 'https://api.paystack.co/charge/submit_birthday', + method: 'POST', + params: [ + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: 'birthday', + required: true, + type: 'String', + }, + { + parameter: 'reference', + required: true, + type: 'String', + }, + ], + description: + 'Submit Birthday when requested\n\n**Body Params**\n- **birthday** (_required_) - Birthday number submitted by user\n- **reference** (_required_) - reference for ongoing transaction', + }, + { + api: 'tokenize', + endpoint: 'https://api.paystack.co/charge/tokenize', + method: 'POST', + params: [ + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: 'email', + required: true, + type: 'String', + }, + { + parameter: 'card', + required: true, + type: 'String', + }, + { + parameter: 'card.number', + required: true, + type: 'String', + }, + { + parameter: 'card.cvv', + required: true, + type: 'String', + }, + { + parameter: 'card.expiry_month', + required: true, + type: 'String', + }, + { + parameter: 'card.expiry_year', + required: true, + type: 'String', + }, + ], + description: + "Send an array of objects with authorization codes and amount in kobo so we can process transactions as a batch.\n\n**Body Params**\n- **email** (_required_) - Customer's email address\n- **card** (_required_) - Card to tokenize\n- **card.number** (_required_) - Card to tokenize\n- **card.cvv** (_required_) - Card security code\n- **card.expiry_month** (_required_) - Expiry month of card\n- **card.expiry_year** (_required_) - Expiry year of card\n", + }, + { + api: 'check', + endpoint: 'https://api.paystack.co/charge/reference', + method: 'GET', + params: [ + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: 'reference', + required: true, + type: 'String', + }, + ], + description: + 'When you get "pending" as a charge status, wait 30 seconds or more, then make a check to see if its status has changed. Don\'t call too early as you may get a lot more pending than you should.\n\n**Body Params**\n- **reference** (_required_) - The reference to check', + }, + { + api: 'charge', + endpoint: 'https://api.paystack.co/charge', + method: 'POST', + params: [ + { + parameter: + 'imple guide to charging cards directly https://developers.paystack.co/docs/chargingfromyourbacken', + required: false, + type: 'String', + }, + + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: 'email', + required: true, + type: 'String', + }, + { + parameter: 'amount', + required: true, + type: 'Number', + }, + { + parameter: 'card', + required: true, + type: 'String', + }, + { + parameter: 'card.number', + required: true, + type: 'String', + }, + { + parameter: 'card.cvv', + required: true, + type: 'String', + }, + { + parameter: 'card.expiry_month', + required: true, + type: 'String', + }, + { + parameter: 'card.expiry_year', + required: true, + type: 'String', + }, + { + parameter: 'bank', + required: false, + type: 'String', + }, + { + parameter: 'bank.code', + required: true, + type: 'String', + }, + { + parameter: 'bank.account_number', + required: true, + type: 'String', + }, + { + parameter: 'authorization_code', + required: false, + type: 'String', + }, + { + parameter: 'pin', + required: false, + type: 'String', + }, + { + parameter: 'metadata', + required: false, + type: 'String', + }, + ], + description: + "Send card details or bank details or authorization code to start a charge.\nSimple guide to charging cards directly https://developers.paystack.co/docs/charging-from-your-backend\n\n**Body Params**\n- **email** (_required_) - Customer's email address\n- **amount** (_required_) - Amount in kobo\n- **card** (_required_) - Card number\n- **card.number** (_required_) - Card to tokenize\n- **card.cvv** (_required_) - Card security code\n- **card.expiry_month** (_required_) - Expiry month of card\n- **card.expiry_year** (_required_) - Expiry year of card\n- **bank** - Bank account to charge (don't send if charging an authorization code or card)\n- **bank.code** (_required_) - A code for the [bank](https://developers.paystack.co/v1.0/ref/banks) (check banks for the banks supported). Only the ones for which paywithbank is true will work.\n- **bank.account_number** (_required_) - 10 digit nuban for the account to charge\n- **authorization_code** - An authorization code to charge (don't send if charging a card or bank account)\n- **pin** - 4-digit PIN (send with a non-reusable authorization code)\n- **metadata** - A JSON object", + }, + { + api: 'submit', + endpoint: 'https://api.paystack.co/charge/submit_phone', + method: 'POST', + params: [ + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: 'phone', + required: true, + type: 'String', + }, + { + parameter: 'reference', + required: true, + type: 'String', + }, + ], + description: + 'Submit Phone when requested\n\n**Body Params**\n- **phone** (_required_) - Phone number submitted by user\n- **reference** (_required_) - reference for ongoing transaction', + }, + ], + transaction: [ + { + api: 'verify', + endpoint: 'https://api.paystack.co/transaction/verify/{reference}', + method: 'GET', + params: [ + { + parameter: 'reference', + required: true, + type: 'String', + }, + ], + description: '**Path Params**\n- **reference** (_required_)', + }, + { + api: 'list', + endpoint: 'https://api.paystack.co/transaction', + method: 'GET', + params: [ + { + parameter: 'perPage', + required: false, + type: 'String', + }, + { + parameter: 'page', + required: false, + type: 'Number', + }, + { + parameter: 'customer', + required: false, + type: 'String', + }, + { + parameter: 'status', + required: false, + type: 'String', + }, + { + parameter: 'from', + required: false, + type: 'String', + }, + { + parameter: 'to', + required: false, + type: 'String', + }, + { + parameter: 'amount', + required: false, + type: 'Number', + }, + ], + description: + "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **customer** - Specify an ID for the customer whose transactions you want to retrieve\n- **status** - Filter transactions by status ('failed', 'success', 'abandoned')\n- **from** - A timestamp from which to start listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21\n- **to** - A timestamp at which to stop listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21\n- **amount** - Filter transactions by amount. Specify the amount in kobo.", + }, + { + api: 'view', + endpoint: ':id_or_reference', + method: 'GET', + params: [], + description: null, + }, + { + api: 'charge', + endpoint: 'https://api.paystack.co/transaction/charge_authorization', + method: 'POST', + params: [ + { + parameter: 'reference', + required: false, + type: 'String', + }, + { + parameter: 'authorization_code', + required: true, + type: 'String', + }, + { + parameter: 'amount', + required: true, + type: 'Number', + }, + { + parameter: 'plan', + required: false, + type: 'String', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + { + parameter: 'email', + required: true, + type: 'String', + }, + { + parameter: 'metadata', + required: false, + type: 'String', + }, + { + parameter: 'subaccount', + required: false, + type: 'String', + }, + { + parameter: 'transaction_charge', + required: false, + type: 'String', + }, + { + parameter: 'bearer', + required: false, + type: 'String', + }, + { + parameter: 'invoice_limit', + required: false, + type: 'String', + }, + ], + description: + "**Body Params**\n- **reference** - Unique transaction reference. Only `-` `,` `.` `,` `=` and alphanumeric characters allowed. System will generate one if none is provided\n- **authorization_code** - (_required_) Valid authorization code to charge\n- **amount** - (_required_) Amount in kobo\n- **plan** - If transaction is to create a subscription to a predefined plan, provide plan code here\n- **currency** - Currency in which amount should be charged\n- ** email** (_required_) - Customer's email address\n- **metadata** - Add a `custom_fields` attribute which has an array of objects if you would like the fields to be added to your transaction when displayed on the dashboard.\n- **subaccount** - The code for the subaccount that owns the payment.\n- **transaction_charge** - A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split).\n- **bearer** - Who bears Paystack charges? `account` or `subaccount`?\n- **invoice_limit** - Number of invoices to raise during the subscription. Overrides `invoice_limit` set on plan.", + }, + { + api: 'export', + endpoint: 'https://api.paystack.co/transaction/export', + method: 'GET', + params: [ + { + parameter: 'from', + required: false, + type: 'String', + }, + { + parameter: 'to', + required: false, + type: 'String', + }, + { + parameter: 'settled', + required: false, + type: 'String', + }, + { + parameter: 'payment_page', + required: false, + type: 'String', + }, + { + parameter: 'customer', + required: false, + type: 'String', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + { + parameter: 'settlement', + required: false, + type: 'String', + }, + { + parameter: 'amount', + required: false, + type: 'Number', + }, + { + parameter: 'status', + required: false, + type: 'String', + }, + ], + description: + "**Query Params**\n- **from** - Lower bound of date range. Leave undefined to export transactions from day one.\n- **to** - Upper bound of date range. Leave undefined to export transactions till date.\n- **settled** - Set to `true` to export only settled transactions. `false` for pending transactions. Leave undefined to export all transactions\n- **payment_page** - Specify a payment page's id to export only transactions conducted on said page\n- **customer** - Specify customer id.\n- **currency** - Currency in which you are charging the customer in.\n- **settlement** - An ID for the settlement whose transactions we should export\n- **amount** - Amount for transactions to export\n- **status** - Status for transactions to export", + }, + { + api: 'check', + endpoint: 'https://api.paystack.co/transaction/check_authorization', + method: 'POST', + params: [ + { + parameter: 'authorization_code', + required: true, + type: 'String', + }, + { + parameter: 'amount', + required: true, + type: 'Number', + }, + { + parameter: 'email', + required: true, + type: 'String', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + ], + description: + "All mastercard and visa authorizations can be checked with this endpoint to know if they have funds for the payment you seek.\n\n**Body Params**\n- **authorization_code** (_required_) - Authorization code for mastercard or VISA authorization belonging to email.\n- **amount** (_required_) - Amount in kobo\n- **email** (_required_) - Customer's email address\n- **currency** - A currency for the amount we want to check\n\nIn test mode, we will return insufficient funds for an amount greater than or equal 500,000 naira.", + }, + { + api: 'transaction', + endpoint: 'https://api.paystack.co/transaction/totals', + method: 'GET', + params: [ + { + parameter: 'from', + required: false, + type: 'String', + }, + { + parameter: 'to', + required: false, + type: 'String', + }, + ], + description: + 'Total amount received on your account\n\n**Query Params**\n- **from** - Lower bound of date range. Leave undefined to show totals from day one.\n- **to** - Upper bound of date range. Leave undefined to show totals till date.', + }, + { + api: 'initialize', + endpoint: 'https://api.paystack.co/transaction/initialize', + method: 'POST', + params: [ + { + parameter: 'email', + required: true, + type: 'String', + }, + { + parameter: 'amount', + required: true, + type: 'Number', + }, + { + parameter: 'reference', + required: false, + type: 'String', + }, + { + parameter: 'callback_url', + required: false, + type: 'String', + }, + { + parameter: 'plan', + required: false, + type: 'String', + }, + { + parameter: 'invoice_limit', + required: false, + type: 'String', + }, + { + parameter: 'metadata', + required: false, + type: 'String', + }, + { + parameter: 'subaccount', + required: false, + type: 'String', + }, + { + parameter: 'transaction_charge', + required: false, + type: 'String', + }, + { + parameter: 'bearer', + required: false, + type: 'String', + }, + { + parameter: 'channels', + required: false, + type: 'String', + }, + ], + description: + "**Body Params**\n- **email** (_required_) - Customer's email address\n- **amount** (_required_) - Amount in kobo\n- **reference** - Generate a reference or leave this param blank for Paystack to generate one for you\n- **callback_url** - Overrides the callback URL set on Paystack dashboard.\n- **plan** - If transaction is to create a subscription to a predefined plan, provide plan code here. This would invalidate the value provided in `amount`\n- **invoice_limit** - Number of times to charge customer during subscription to plan\n- **metadata** - Stringified JSON object. Add a `custom_fields` attribute which has an array of objects if you would like the fields to be added to your transaction when displayed on the dashboard.\n- **subaccount** - The code for the subaccount that owns the payment.\n- **transaction_charge** - A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split).\n- **bearer** - Who bears Paystack charges? `account` or `subaccount` (defaults to `account`).\n- **channels** - Send us 'card' or 'bank' or 'card','bank' as an array to specify what options to show the user paying", + }, + { + api: 'fetch', + endpoint: 'https://api.paystack.co/transaction/id', + method: 'GET', + params: [ + { + parameter: 'id', + required: true, + type: 'String', + }, + ], + description: + '**Path Params**\n- **id** (_required_) - An ID for the transaction to fetch', + }, + ], + plan: [ + { + api: 'update', + endpoint: ':id_or_plan_code', + method: 'PUT', + params: [ + { + parameter: 'name', + required: false, + type: 'String', + }, + { + parameter: 'description', + required: false, + type: 'String', + }, + { + parameter: 'amount', + required: false, + type: 'Number', + }, + { + parameter: 'interval', + required: false, + type: 'String', + }, + { + parameter: 'send_invoices', + required: false, + type: 'String', + }, + { + parameter: 'send_sms', + required: false, + type: 'String', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + { + parameter: 'invoice_limit', + required: false, + type: 'String', + }, + ], + description: + "**Body Params**\n- **name** - Name of plan\n- **description** - Short description of plan\n- **amount** - Amount to be charged in kobo. Will override the amount for existing subscriptions.\n- **interval** - Interval in words. Valid intervals are `hourly`, `daily`, `weekly`, `monthly`, `annually`.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers.\n- **send_sms** - Set to false if you don't want text messages to be sent to your customers\n- **currency** - Currency in which amount is set\n- **invoice_limit** - Number of invoices to raise during subscription to this plan. Will not override `invoice_limit` set on active subscriptions.", + }, + { + api: 'create', + endpoint: 'https://api.paystack.co/plan', + method: 'POST', + params: [ + { + parameter: 'name', + required: true, + type: 'String', + }, + { + parameter: 'description', + required: false, + type: 'String', + }, + { + parameter: 'amount', + required: true, + type: 'Number', + }, + { + parameter: 'interval', + required: true, + type: 'String', + }, + { + parameter: 'send_invoices', + required: false, + type: 'String', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + { + parameter: 'invoice_limit', + required: false, + type: 'String', + }, + ], + description: + "**Body Params**\n- **name** (_required_) - Name of plan\n- **description** - Short description of plan\n- **amount** (_required_) - Amount to be charged in kobo\n- **interval** (_required_) - Interval in words. Valid intervals are `hourly`, `daily`, `weekly`, `monthly`, `annually`.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers\n- **currency** - Currency in which amount is set\n- **invoice_limit** - Number of invoices to raise during subscription to this plan. Can be overridden by specifying an `invoice_limit` while subscribing.", + }, + { + api: 'list', + endpoint: 'https://api.paystack.co/plan', + method: 'GET', + params: [ + { + parameter: 'perPage', + required: false, + type: 'String', + }, + { + parameter: 'page', + required: false, + type: 'Number', + }, + { + parameter: 'interval', + required: false, + type: 'String', + }, + { + parameter: 'amount', + required: false, + type: 'Number', + }, + ], + description: + '**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **interval** - Filter list by plans with specified interval\n- **amount** - Filter list by plans with specified amount (in kobo)', + }, + { + api: 'fetch', + endpoint: 'https://api.paystack.co/plan/id_or_plan_code', + method: 'GET', + params: [], + description: null, + }, + ], + customer: [ + { + api: 'update', + endpoint: 'https://api.paystack.co/customer/:ID_OR_CUSTOMER_CODE', + method: 'PUT', + params: [ + { + parameter: 'first_name', + required: false, + type: 'String', + }, + { + parameter: 'last_name', + required: false, + type: 'String', + }, + { + parameter: 'phone', + required: false, + type: 'String', + }, + { + parameter: 'metadata', + required: false, + type: 'String', + }, + ], + description: + "**Body Params**\n- **first_name** - Customer's first name\n- **last_name** - Customer's last name\n- **phone** - Customer's phone number\n- **metadata** - A set of key/value pairs that you can attach to the customer. It can be used to store additional information in a structured format.", + }, + { + api: 'list', + endpoint: 'https://api.paystack.co/customer', + method: 'GET', + params: [ + { + parameter: 'perPage', + required: false, + type: 'String', + }, + { + parameter: 'page', + required: false, + type: 'Number', + }, + ], + description: + '**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve', + }, + { + api: 'create', + endpoint: 'https://api.paystack.co/customer', + method: 'POST', + params: [ + { + parameter: 'email', + required: true, + type: 'String', + }, + { + parameter: 'first_name', + required: false, + type: 'String', + }, + { + parameter: 'last_name', + required: false, + type: 'String', + }, + { + parameter: 'phone', + required: false, + type: 'String', + }, + { + parameter: 'metadata', + required: false, + type: 'String', + }, + ], + description: + "**Body Params**\n- **email** (_required_) - Customer's email address\n- **first_name** - Customer's first name\n- **last_name** - Customer's last name\n- **phone** - Customer's phone number\n- **metadata** - A set of key/value pairs that you can attach to the customer. It can be used to store additional information in a structured format.", + }, + { + api: 'fetch', + endpoint: ':id_or_customer_code', + method: 'GET', + params: [ + { + parameter: 'exclude_transactions', + required: false, + type: 'String', + }, + ], + description: + '**Query Params**\n- **exclude_transactions** - By default, fetching a customer returns all their transactions. Set this to true to disable this behaviour.', + }, + { + api: 'set_risk_action', + endpoint: 'https://api.paystack.co/customer/set_risk_action', + method: 'POST', + params: [ + { + parameter: 'customer', + required: false, + type: 'String', + }, + { + parameter: 'risk_action', + required: false, + type: 'String', + }, + ], + description: + "**Body Params**\n- **customer** - Customer's ID, code, or email address\n- **risk_action** - One of the possible risk actions. `allow` to whitelist. `deny` to blacklist.", + }, + { + api: 'deactivate', + endpoint: 'https://api.paystack.co/customer/deactivate_authorization', + method: 'POST', + params: [ + { + parameter: 'authorization_code', + required: true, + type: 'String', + }, + ], + description: + 'For when the card needs to be forgotten...\n\n**Body Params**\n- **authorization_code** (_required_) - Authorization code to be deactivated\n\n', + }, + ], + refund: [ + { + api: 'create', + endpoint: 'https://api.paystack.co/refund', + method: 'POST', + params: [ + { + parameter: 'Body Params', + required: false, + type: 'String', + }, + { + parameter: 'transaction', + required: true, + type: 'String', + }, + { + parameter: 'amount', + required: false, + type: 'Number', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + { + parameter: 'customer_note', + required: false, + type: 'String', + }, + { + parameter: 'merchant_note', + required: false, + type: 'String', + }, + ], + description: + 'This creates a refund which is then processed by the Paystack team\n\n**Body Params**\n- **transaction** _(required)_: Identifier for transaction to be refunded\n- **amount** _(optional)_: How much in kobo to be refunded to the customer. Amount is optional(defaults to original transaction amount) and cannot be more than the original transaction amount.\n- **currency**: Three-letter ISO currency\n- **customer_note** _(optional)_: customer reason\n- **merchant_note** _(optional)_: merchant reason', + }, + { + api: 'fetch', + endpoint: ':id', + method: 'GET', + params: [ + { + parameter: 'id', + required: false, + type: 'String', + }, + ], + description: + '**Path Params**\n- **id** - ID of the transaction to be refunded', + }, + { + api: 'fetch', + endpoint: ':id', + method: 'GET', + params: [ + { + parameter: 'id', + required: false, + type: 'String', + }, + ], + description: + '**Path Params**\n- **id** - ID of the transaction to be refunded', + }, + { + api: 'list', + endpoint: 'https://api.paystack.co/refund', + method: 'GET', + params: [ + { + parameter: 'transaction', + required: false, + type: 'String', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + ], + description: '**Query Parameters**\n\n- **transaction**\n- **currency**', + }, + { + api: 'list', + endpoint: 'https://api.paystack.co/refund', + method: 'GET', + params: [ + { + parameter: 'transaction', + required: false, + type: 'String', + }, + { + parameter: 'currency', + required: false, + type: 'String', + }, + ], + description: '**Query Parameters**\n\n- **transaction**\n- **currency**', + }, + ], + integration: [ + { + api: 'update', + endpoint: 'https://api.paystack.co/integration/payment_session_timeout', + method: 'PUT', + params: [ + { + parameter: 'timeout', + required: false, + type: 'String', + }, + ], + description: + '**Query Params**\n- **timeout** - Time before stopping session (in seconds). Set to 0 to cancel session timeouts', + }, + { + api: 'fetch', + endpoint: 'https://api.paystack.co/integration/payment_session_timeout', + method: 'GET', + params: [], + description: null, + }, + ], + balance: [ + { + api: 'check', + endpoint: 'https://api.paystack.co/balance', + method: 'GET', + params: [], + description: 'You can only transfer from what you have', + }, + { + api: 'balance', + endpoint: 'https://api.paystack.co/balance/ledger', + method: 'GET', + params: [], + description: + 'Returns all activity carried out from and to the Paystack Balance', + }, + ], + settlement: [ + { + api: 'fetch', + endpoint: 'https://api.paystack.co/settlement', + method: 'GET', + params: [ + { + parameter: 'from', + required: false, + type: 'String', + }, + { + parameter: 'to', + required: false, + type: 'String', + }, + { + parameter: 'subaccount', + required: false, + type: 'String', + }, + ], + description: + 'Settlements made to your bank accounts and the bank accounts for your subaccounts\n\n**Query Params**\n- **from** - Lower bound of date range. Leave undefined to export settlement from day one.\n- **to** - Upper bound of date range. Leave undefined to export settlements till date.\n- **subaccount** - Provide a subaccount code to export only settlements for that subaccount. Set to `none` to export only transactions for the account.', + }, + ], + decision: [ + { + api: 'resolve', + endpoint: '{BIN)', + method: 'GET', + params: [ + { + parameter: 'bin', + required: true, + type: 'String', + }, + ], + description: + '**Path Params**\n- **bin** (_required_) - First 6 characters of card', + }, + ], + invoice: [ + { + api: 'archive', + endpoint: ':id_or_code', + method: 'POST', + params: [], + description: + 'Used to archive an invoice. Invoice will no longer be fetched on list or returned on verify.', + }, + ], + verifications: [ + { + api: 'resolve', + endpoint: 'https://api.paystack.co/verifications', + method: 'POST', + params: [ + { + parameter: 'Body Parameters', + required: false, + type: 'String', + }, + { + parameter: 'verification_type', + required: true, + type: 'String', + }, + { + parameter: 'phone', + required: true, + type: 'String', + }, + { + parameter: 'callback_url', + required: false, + type: 'String', + }, + ], + description: + "Using the Truecaller API you can verify the authenticity of a customer. It returns the customer's name, phone number, email, social media handles and organization as available on their Truecaller profile.\n\n**Body Parameters**\n- **verification_type** _(required)_\n- **phone** _(required)_ - Customer phone number starting with country code (without the + prefix)\n- **callback_url** - Link on server to receive the truecaller details", + }, + ], +}; diff --git a/lib/paystack/webhooks.js b/lib/paystack/webhooks.js new file mode 100644 index 0000000..9095993 --- /dev/null +++ b/lib/paystack/webhooks.js @@ -0,0 +1,176 @@ +export default { + 'charge.success': { + event: 'charge.success', + data: { + id: 302961, + domain: 'live', + status: 'success', + reference: 'qTPrJoy9Bx', + amount: 10000, + message: null, + gateway_response: 'Approved by Financial Institution', + paid_at: '2016-09-30T21:10:19.000Z', + created_at: '2016-09-30T21:09:56.000Z', + channel: 'card', + currency: 'NGN', + ip_address: '41.242.49.37', + metadata: 0, + log: { + time_spent: 16, + attempts: 1, + authentication: 'pin', + errors: 0, + success: false, + mobile: false, + input: [], + channel: null, + history: [ + { + type: 'input', + message: 'Filled these fields: card number, card expiry, card cvv', + time: 15, + }, + { + type: 'action', + message: 'Attempted to pay', + time: 15, + }, + { + type: 'auth', + message: 'Authentication Required: pin', + time: 16, + }, + ], + }, + fees: null, + customer: { + id: 68324, + first_name: 'BoJack', + last_name: 'Horseman', + email: 'bojack@horseman.com', + customer_code: 'CUS_qo38as2hpsgk2r0', + phone: null, + metadata: null, + risk_action: 'default', + }, + authorization: { + authorization_code: 'AUTH_f5rnfq9p', + bin: '539999', + last4: '8877', + exp_month: '08', + exp_year: '2020', + card_type: 'mastercard DEBIT', + bank: 'Guaranty Trust Bank', + country_code: 'NG', + brand: 'mastercard', + }, + plan: {}, + }, + }, + 'transfer.success': { + event: 'transfer.success', + data: { + domain: 'live', + amount: 10000, + currency: 'NGN', + source: 'balance', + source_details: null, + reason: 'Bless you', + recipient: { + domain: 'live', + type: 'nuban', + currency: 'NGN', + name: 'Someone', + details: { + account_number: '0123456789', + account_name: null, + bank_code: '058', + bank_name: 'Guaranty Trust Bank', + }, + description: null, + metadata: null, + recipient_code: 'RCP_xoosxcjojnvronx', + active: true, + }, + status: 'success', + transfer_code: 'TRF_zy6w214r4aw9971', + transferred_at: '2017-03-25T17:51:24.000Z', + created_at: '2017-03-25T17:48:54.000Z', + }, + }, + 'subscription.create': { + event: 'subscription.create', + data: { + domain: 'test', + status: 'active', + subscription_code: 'SUB_vsyqdmlzble3uii', + amount: 50000, + cron_expression: '0 0 28 * *', + next_payment_date: '2016-05-19T07:00:00.000Z', + open_invoice: null, + createdAt: '2016-03-20T00:23:24.000Z', + plan: { + name: 'Monthly retainer', + plan_code: 'PLN_gx2wn530m0i3w3m', + description: null, + amount: 50000, + interval: 'monthly', + send_invoices: true, + send_sms: true, + currency: 'NGN', + }, + authorization: { + authorization_code: 'AUTH_96xphygz', + bin: '539983', + last4: '7357', + exp_month: '10', + exp_year: '2017', + card_type: 'MASTERCARD DEBIT', + bank: 'GTBANK', + country_code: 'NG', + brand: 'MASTERCARD', + }, + customer: { + first_name: 'BoJack', + last_name: 'Horseman', + email: 'bojack@horsinaround.com', + customer_code: 'CUS_xnxdt6s1zg1f4nx', + phone: '', + metadata: {}, + risk_action: 'default', + }, + created_at: '2016-10-01T10:59:59.000Z', + }, + }, + 'transfer.failed': { + event: 'transfer.failed', + data: { + domain: 'test', + amount: 10000, + currency: 'NGN', + source: 'balance', + source_details: null, + reason: 'Test', + recipient: { + domain: 'live', + type: 'nuban', + currency: 'NGN', + name: 'Test account', + details: { + account_number: '0000000000', + account_name: null, + bank_code: '058', + bank_name: 'Zenith Bank', + }, + description: null, + metadata: null, + recipient_code: 'RCP_7um8q67gj0v4n1c', + active: true, + }, + status: 'failed', + transfer_code: 'TRF_3g8pc1cfmn00x6u', + transferred_at: null, + created_at: '2017-12-01T08:51:37.000Z', + }, + }, +}; diff --git a/lib/samples.js b/lib/samples.js index fa26be0..f3a829d 100644 --- a/lib/samples.js +++ b/lib/samples.js @@ -1,26 +1,28 @@ -module.exports = { - sample_vue:{ - name:'sample-vue', - description: 'A sample vue application for accepting donations using Paystack', - git: 'https://github.com/PaystackOSS/sample-vue', - init_commands:['npm install', 'npm run serve'] - }, - sample_react:{ - name:'sample-react', - description: 'A sample vue application for accepting donnations using Paystack', - git: 'https://github.com/PaystackOSS/sample-react.git', - init_commands:['yarn install', 'yarn start'] - }, - gift_store:{ - name: 'sample-gift-store', - description: 'Lorem ipsum dolor sit amet', - git: 'https://github.com/PaystackOSS/sample-gift-store', - init_commands:['npm install', 'npm run serve'] - }, - sneaker_store:{ - name:'Kix', - description:'A sample sneakers store with Paystack checkout', - git:'https://git@github.com:PaystackOSS/sample-kix.git', - init_commands:['npm install', 'npm run serve'] - } -} \ No newline at end of file +export default { + sample_vue: { + name: 'sample-vue', + description: + 'A sample vue application for accepting donations using Paystack', + git: 'https://github.com/PaystackOSS/sample-vue', + init_commands: ['npm install', 'npm run serve'], + }, + sample_react: { + name: 'sample-react', + description: + 'A sample vue application for accepting donnations using Paystack', + git: 'https://github.com/PaystackOSS/sample-react.git', + init_commands: ['yarn install', 'yarn start'], + }, + gift_store: { + name: 'sample-gift-store', + description: 'Lorem ipsum dolor sit amet', + git: 'https://github.com/PaystackOSS/sample-gift-store', + init_commands: ['npm install', 'npm run serve'], + }, + sneaker_store: { + name: 'Kix', + description: 'A sample sneakers store with Paystack checkout', + git: 'https://git@github.com:PaystackOSS/sample-kix.git', + init_commands: ['npm install', 'npm run serve'], + }, +}; diff --git a/logger b/logger deleted file mode 100755 index 03166e6..0000000 --- a/logger +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -console.log("I am a logger") \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index dc71504..d07161b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,456 +1,638 @@ { "name": "@paystack-oss/dev-cli", "version": "0.0.6", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@types/caseless": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", - "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==" + "packages": { + "": { + "name": "@paystack-oss/dev-cli", + "version": "0.0.6", + "dependencies": { + "axios": "^1.5.0", + "chalk": "^5.3.0", + "debug": "~2.6.9", + "lowdb": "^6.0.1", + "ngrok": "^5.0.0-beta.2", + "progressbar": "^1.3.0", + "readline-sync": "^1.4.10", + "shelljs": "^0.8.5", + "url": "^0.11.0", + "vorpal": "^1.12.0" + }, + "bin": { + "paystack": "cli.js" + } }, - "@types/node": { - "version": "8.10.66", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", - "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "dependencies": { + "defer-to-connect": "^2.0.0" + }, + "engines": { + "node": ">=10" + } }, - "@types/request": { - "version": "2.48.7", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.7.tgz", - "integrity": "sha512-GWP9AZW7foLd4YQxyFZDBepl0lPsWLMEXDZUjQ/c1gqVPDPECrRZyEzuhJdnPWioFCq3Tv0qoGpMD6U+ygd4ZA==", - "requires": { - "@types/caseless": "*", + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "dependencies": { + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", "@types/node": "*", - "@types/tough-cookie": "*", - "form-data": "^2.5.0" + "@types/responselike": "^1.0.0" } }, - "@types/tough-cookie": { + "node_modules/@types/http-cache-semantics": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.1.tgz", - "integrity": "sha512-Y0K95ThC3esLEYD6ZuqNek29lNX2EM1qxV8y2FTLUB0ff5wWrk7az+mLrnNFUnaXcgKye22+sFBRXOgpPILZNg==" + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", + "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "node_modules/@types/responselike": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", + "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "optional": true, + "dependencies": { + "@types/node": "*" } }, - "ansi-escapes": { + "node_modules/ansi-escapes": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" + "integrity": "sha512-wiXutNjDUlNEDWHcYH3jtZUhd3c4/VojassD8zHdHCY13xbZy2XbW+NKQwA0tWGBVzDA9qEzYwfoSsWmviidhw==", + "engines": { + "node": ">=0.10.0" + } }, - "ansi-regex": { + "node_modules/ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "engines": { + "node": ">=0.10.0" } }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { - "safer-buffer": "~2.1.0" + "node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "engines": { + "node": ">=0.10.0" } }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "asynckit": { + "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" - }, - "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "requires": { - "follow-redirects": "^1.14.0" + "node_modules/axios": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", + "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, - "babel-polyfill": { + "node_modules/babel-polyfill": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", - "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", - "requires": { + "integrity": "sha512-F2rZGQnAdaHWQ8YAoeRbukc7HS9QgdgeyJ0rQDd485v9opwuPvjpPFcOOT/WmkKTdgy9ESgSPXDcTNpzrGr6iQ==", + "dependencies": { "babel-runtime": "^6.26.0", "core-js": "^2.5.0", "regenerator-runtime": "^0.10.5" } }, - "babel-runtime": { + "node_modules/babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "requires": { + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "dependencies": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" - } } }, - "balanced-match": { + "node_modules/babel-runtime/node_modules/regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "binary": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", - "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", - "requires": { - "buffers": "~0.1.1", - "chainsaw": "~0.1.0" - } - }, - "brace-expansion": { + "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { + "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "buffers": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", - "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=" + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "engines": { + "node": "*" + } }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "node_modules/cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "engines": { + "node": ">=10.6.0" + } }, - "chainsaw": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", - "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", - "requires": { - "traverse": ">=0.3.0 <0.4" + "node_modules/cacheable-request": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "cli-cursor": { + "node_modules/cli-cursor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "requires": { + "integrity": "sha512-25tABq090YNKkF6JH7lcwO0zFJTRke4Jcq9iX2nr/Sz0Cjjv4gckmwlW6Ty/aoyFd6z3ysR2hMGC2GFugmBo6A==", + "dependencies": { "restore-cursor": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "cli-width": { + "node_modules/cli-width": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz", - "integrity": "sha1-pNKT72frt7iNSk1CwMzwDE0eNm0=" + "integrity": "sha512-eMU2akIeEIkCxGXUNmDnJq1KzOIiPnJ+rKqRe6hcxE3vIOPvpMrBYOn/Bl7zNlYJj/zQxXquAnozHUCf9Whnsg==" + }, + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "dependencies": { + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "code-point-at": { + "node_modules/code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "engines": { + "node": ">=0.10.0" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "combined-stream": { + "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { + "dependencies": { "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" } }, - "concat-map": { + "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, - "core-js": { + "node_modules/core-js": { "version": "2.6.12", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "hasInstallScript": true }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { + "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { + "dependencies": { "ms": "2.0.0" } }, - "decompress-zip": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.3.tgz", - "integrity": "sha512-/fy1L4s+4jujqj3kNptWjilFw3E6De8U6XUFvqmh4npN3Vsypm3oT2V0bXcmbBWS+5j5tr4okYaFrOmyZkszEg==", - "requires": { - "binary": "^0.3.0", - "graceful-fs": "^4.1.3", - "mkpath": "^0.1.0", - "nopt": "^3.0.1", - "q": "^1.1.2", - "readable-stream": "^1.1.8", - "touch": "0.0.3" + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "engines": { + "node": ">=10" } }, - "delayed-stream": { + "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" } }, - "editions": { + "node_modules/editions": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", - "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==" + "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==", + "engines": { + "node": ">=0.8" + } }, - "escape-string-regexp": { + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } }, - "exit-hook": { + "node_modules/exit-hook": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" + "integrity": "sha512-MsG3prOVw1WtLXAZbM3KiYtooKR1LvxHh3VHsVtIy0uiUu8usxgB/94DP2HxtD/661lLdB6yzQ09lGJSQr6nkg==", + "engines": { + "node": ">=0.10.0" + } }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "node_modules/extract-zip/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "node_modules/extract-zip/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dependencies": { + "pend": "~1.2.0" + } }, - "figures": { + "node_modules/figures": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "requires": { + "integrity": "sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==", + "dependencies": { "escape-string-regexp": "^1.0.5", "object-assign": "^4.1.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "follow-redirects": { - "version": "1.14.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.5.tgz", - "integrity": "sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } }, - "form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "requires": { + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", + "combined-stream": "^1.0.8", "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" } }, - "fs.realpath": { + "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, - "function-bind": { + "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "requires": { + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" + "node_modules/got": { + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "dependencies": { + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=10.19.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" } }, - "has": { + "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { + "dependencies": { "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" } }, - "has-ansi": { + "node_modules/has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dependencies": { "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hpagent": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-0.1.2.tgz", + "integrity": "sha512-ePqFXHtSQWAFXYmj+JtOTHr84iNrII4/QRlAAPPE+zqnKy4xJo7Ie1Y4kC7AdB+LxLxSTTzBMASsEcy0q8YyvQ==", + "optional": true + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "node_modules/http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + }, + "engines": { + "node": ">=10.19.0" } }, - "in-publish": { + "node_modules/in-publish": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz", - "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==" + "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==", + "bin": { + "in-install": "in-install.js", + "in-publish": "in-publish.js", + "not-in-install": "not-in-install.js", + "not-in-publish": "not-in-publish.js" + } }, - "inflight": { + "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, - "inherits": { + "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "inquirer": { + "node_modules/inquirer": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.11.0.tgz", - "integrity": "sha1-dEi/qSQJKvMR1HFzu6uZDK4rsCc=", - "requires": { + "integrity": "sha512-LIwC+g/fJbmKhDm341+RqDIV4jPf/n3pMway9xg8Ovt6CCQo1ozXhmuKTcoNIWhWJJKsSGZP+Rnuq7JgM7mE2A==", + "dependencies": { "ansi-escapes": "^1.1.0", "ansi-regex": "^2.0.0", "chalk": "^1.0.0", @@ -463,597 +645,543 @@ "rx-lite": "^3.1.2", "strip-ansi": "^3.0.0", "through": "^2.3.6" - }, + } + }, + "node_modules/inquirer/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "lodash": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "interpret": { + "node_modules/inquirer/node_modules/lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha512-9mDDwqVIma6OZX79ZlDACZl8sBm0TEnkf99zV3iMA4GzkIT/9hiqP5mY0HoT1iNLCrKc/R1HByV+yJfRWVJryQ==" + }, + "node_modules/interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "engines": { + "node": ">= 0.10" + } }, - "is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", - "requires": { + "node_modules/is-core-module": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "dependencies": { "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-fullwidth-code-point": { + "node_modules/is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "dependencies": { "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" + "node_modules/keyv": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", + "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", + "dependencies": { + "json-buffer": "3.0.1" } }, - "lodash": { + "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, - "log-update": { + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" + }, + "node_modules/log-update": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", - "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", - "requires": { + "integrity": "sha512-4vSow8gbiGnwdDNrpy1dyNaXWKSCIPop0EHdE8GrnngHoJujM3QhvHUN/igsYCgPoHo7pFOezlJ61Hlln0KHyA==", + "dependencies": { "ansi-escapes": "^1.0.0", "cli-cursor": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" } }, - "lowdb": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowdb/-/lowdb-1.0.0.tgz", - "integrity": "sha512-2+x8esE/Wb9SQ1F9IHaYWfsC9FIecLOPrK4g17FGEayjUWH172H6nwicRovGvSE2CPZouc2MCIqCI7h9d+GftQ==", - "requires": { - "graceful-fs": "^4.1.3", - "is-promise": "^2.1.0", - "lodash": "4", - "pify": "^3.0.0", - "steno": "^0.4.1" - } - }, - "mime-db": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", - "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==" - }, - "mime-types": { - "version": "2.1.33", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", - "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", - "requires": { - "mime-db": "1.50.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" + "node_modules/lowdb": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/lowdb/-/lowdb-6.0.1.tgz", + "integrity": "sha512-1ktuKYLlQzAWwl4/PQkIr8JzNXgcTM6rAhpXaQ6BR+VwI98Q8ZwMFhBOn9u0ldcW3K/WWzhYpS3xyGTshgVGzA==", + "dependencies": { + "steno": "^3.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "engines": { + "node": ">=8" + } }, - "mkpath": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/mkpath/-/mkpath-0.1.0.tgz", - "integrity": "sha1-dVSm+Nhxg0zJe1RisSLEwSTW3pE=" + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "ms": { + "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "mute-stream": { + "node_modules/mute-stream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", - "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=" - }, - "ngrok": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/ngrok/-/ngrok-3.4.1.tgz", - "integrity": "sha512-OTm6Nmi6JINPbzkZff8ysA2WqMeNDg3sOPMFHW2CpatVD5yJxmX1qdyLq3QYNACTKNB3/K9jTkG4wUVpAFX9Dw==", - "requires": { - "@types/node": "^8.10.50", - "@types/request": "^2.48.2", - "decompress-zip": "^0.3.2", - "request": "^2.88.0", - "request-promise-native": "^1.0.7", - "uuid": "^3.3.2" - } - }, - "node-localstorage": { + "integrity": "sha512-EbrziT4s8cWPmzr47eYVW3wimS4HsvlnV5ri1xw1aR6JQo/OrJX5rkl32K/QQHdxeabJETtfeaROGhd8W7uBgg==" + }, + "node_modules/ngrok": { + "version": "5.0.0-beta.2", + "resolved": "https://registry.npmjs.org/ngrok/-/ngrok-5.0.0-beta.2.tgz", + "integrity": "sha512-UzsyGiJ4yTTQLCQD11k1DQaMwq2/SsztBg2b34zAqcyjS25qjDpogMKPaCKHwe/APRTHeel3iDXcVctk5CNaCQ==", + "hasInstallScript": true, + "dependencies": { + "extract-zip": "^2.0.1", + "got": "^11.8.5", + "lodash.clonedeep": "^4.5.0", + "uuid": "^7.0.0 || ^8.0.0", + "yaml": "^2.2.2" + }, + "bin": { + "ngrok": "bin/ngrok" + }, + "engines": { + "node": ">=14.2" + }, + "optionalDependencies": { + "hpagent": "^0.1.2" + } + }, + "node_modules/node-localstorage": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/node-localstorage/-/node-localstorage-0.6.0.tgz", - "integrity": "sha1-RaBgHGky395mRKIzYfG+Fzx1068=" + "integrity": "sha512-t9dKMce8qUs2KK02ZiBgzZSykUxc+5UcML7/20a62ruHwfh7+bNQvrH/auxY5gFNexTwAFdr+DbptxlLq4+7qQ==", + "engines": { + "node": ">=0.10" + } }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "requires": { - "abbrev": "1" + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "number-is-nan": { + "node_modules/number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", + "engines": { + "node": ">=0.10.0" + } }, - "object-assign": { + "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } }, - "once": { + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { "wrappy": "1" } }, - "onetime": { + "node_modules/onetime": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + "integrity": "sha512-GZ+g4jayMqzCRMgB2sol7GiCLjKfS1PINkjmx8spcKce1LiVqcbQreXwqs2YAFXC6R03VIG28ZS31t8M866v6A==", + "engines": { + "node": ">=0.10.0" + } }, - "path-is-absolute": { + "node_modules/p-cancelable": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } }, - "path-parse": { + "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" }, - "progress": { + "node_modules/progress": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=" + "integrity": "sha512-TRNLrLfTyjKMs865PwLv6WM5TTMRvzqcZTkKaMVd0ooNM0fnMM8aEp0/7IpnGo295TAiI13Ju30zBZK0rdWZUg==", + "engines": { + "node": ">=0.4.0" + } }, - "progressbar": { + "node_modules/progressbar": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/progressbar/-/progressbar-1.3.0.tgz", "integrity": "sha512-lOncE1DwVI/ioINInGrR0hsFG8I82H9RzMY1bghVAhoU3f+S/JurtfFLpNoEZTnjQ5FS9ZpHSoeZlxig8uyJtw==", - "requires": { + "dependencies": { "editions": "^1.3.3", "progress": "2.0.0" + }, + "engines": { + "node": ">=0.12" } }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "readline-sync": { + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" + }, + "node_modules/qs": { + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/readline-sync": { "version": "1.4.10", "resolved": "https://registry.npmjs.org/readline-sync/-/readline-sync-1.4.10.tgz", - "integrity": "sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==" + "integrity": "sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==", + "engines": { + "node": ">= 0.8.0" + } }, - "readline2": { + "node_modules/readline2": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", - "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", - "requires": { + "integrity": "sha512-8/td4MmwUB6PkZUbV25uKz7dfrmjYWxsW8DVfibWdlHRk/l/DfHKn4pU+dfcoGLFgWOdyGCzINRQD7jn+Bv+/g==", + "dependencies": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", "mute-stream": "0.0.5" } }, - "rechoir": { + "node_modules/rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "requires": { + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dependencies": { "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" } }, - "regenerator-runtime": { + "node_modules/regenerator-runtime": { "version": "0.10.5", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - } - } + "integrity": "sha512-02YopEIhAgiBHWeoTiA8aitHDt8z6w+rQqNuIftlM+ZtvSl/brTouaU7DW6GO/cHtvxJvS4Hwv2ibKdxIRi24w==" }, - "request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", - "requires": { - "lodash": "^4.17.19" + "node_modules/resolve": { + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "request-promise-native": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", - "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", - "requires": { - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - } + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "dependencies": { + "lowercase-keys": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "restore-cursor": { + "node_modules/restore-cursor": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "requires": { + "integrity": "sha512-reSjH4HuiFlxlaBaFCiS6O76ZGG2ygKoSlCsipKdaZuKSPx/+bt9mULkn4l0asVzbEfQQmXRg6Wp6gv6m0wElw==", + "dependencies": { "exit-hook": "^1.0.0", "onetime": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "run-async": { + "node_modules/run-async": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", - "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", - "requires": { + "integrity": "sha512-qOX+w+IxFgpUpJfkv2oGN0+ExPs68F4sZHfaRRx4dDexAQkG83atugKVEylyT5ARees3HBbfmuvnjbrd8j9Wjw==", + "dependencies": { "once": "^1.3.0" } }, - "rx-lite": { + "node_modules/rx-lite": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", - "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=" - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "integrity": "sha512-1I1+G2gteLB8Tkt8YI1sJvSIfa0lWuRtC8GjvtyPBcLSF5jBCCJJqKrpER5JU5r6Bhe+i9/pK3VMuUcXu0kdwQ==" }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", - "requires": { + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dependencies": { "glob": "^7.0.0", "interpret": "^1.0.0", "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" } }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" - }, - "steno": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/steno/-/steno-0.4.4.tgz", - "integrity": "sha1-BxEFvfwobmYVwEA8J+nXtdy4Vcs=", - "requires": { - "graceful-fs": "^4.1.3" + "node_modules/steno": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/steno/-/steno-3.0.0.tgz", + "integrity": "sha512-uZtn7Ht9yXLiYgOsmo8btj4+f7VxyYheMt8g6F1ANjyqByQXEE2Gygjgenp3otHH1TlHsS4JAaRGv5wJ1wvMNw==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" } }, - "string-width": { + "node_modules/string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "dependencies": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, - "strip-ansi": { + "node_modules/strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dependencies": { "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "touch": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz", - "integrity": "sha1-Ua7z1ElXHU8oel2Hyci0kYGg2x0=", - "requires": { - "nopt": "~1.0.10" }, - "dependencies": { - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", - "requires": { - "abbrev": "1" - } - } + "engines": { + "node": ">=0.10.0" } }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "engines": { + "node": ">=0.8.0" } }, - "traverse": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", - "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, + "node_modules/url": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.1.tgz", + "integrity": "sha512-rWS3H04/+mzzJkv0eZ7vEDGiQbgquI1fGfOad6zKvgYQi1SzMmhl7c/DdRGxhaWrVH6z0qWITo8rpnxK/RfEhA==", "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - } + "punycode": "^1.4.1", + "qs": "^6.11.0" } }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - }, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - } + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" } }, - "vorpal": { + "node_modules/vorpal": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/vorpal/-/vorpal-1.12.0.tgz", - "integrity": "sha1-S+eypOSPj8/JzzZIxBnTEcUiFZ0=", - "requires": { + "integrity": "sha512-lYEhd75l75P3D1LKpm4KqdOSpNyNdDJ9ixEZmC5ZAZUKGy6JNexfMdQ9SNaT5pCHuzuXXRJQedJ+CdqNg/D4Kw==", + "dependencies": { "babel-polyfill": "^6.3.14", "chalk": "^1.1.0", "in-publish": "^2.0.0", @@ -1065,44 +1193,62 @@ "strip-ansi": "^3.0.0", "wrap-ansi": "^2.0.0" }, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.10.0" + } + }, + "node_modules/vorpal/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "wrap-ansi": { + "node_modules/wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "requires": { + "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", + "dependencies": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "wrappy": { + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/yaml": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", + "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } } } } diff --git a/package.json b/package.json index cea93fa..e6a2c88 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "@paystack-oss/dev-cli", - "version": "0.0.6", + "version": "0.0.7", "private": false, - "preferGlobal": true, + "type": "module", "scripts": { "start": "node cli.js" }, @@ -10,14 +10,14 @@ "paystack": "./cli.js" }, "dependencies": { - "axios": "^0.21.1", - "chalk": "^3.0.0", + "axios": "^1.5.0", + "chalk": "^5.3.0", "debug": "~2.6.9", - "lowdb": "^1.0.0", - "ngrok": "^3.2.7", + "lowdb": "^6.0.1", + "ngrok": "^5.0.0-beta.2", "progressbar": "^1.3.0", "readline-sync": "^1.4.10", - "shelljs": "^0.8.3", + "shelljs": "^0.8.5", "url": "^0.11.0", "vorpal": "^1.12.0" } diff --git a/parsers/1.js b/parsers/1.js index ee58f8f..9f91c59 100644 --- a/parsers/1.js +++ b/parsers/1.js @@ -1,93 +1,90 @@ -const fs = require('fs'); +import fs from 'fs'; + fs.readFile('./apis.json', function read(err, data) { - if (err) { - throw err; - } - const content = JSON.parse(data); + if (err) { + throw err; + } + const content = JSON.parse(data); - processFile(content); + processFile(content); }); function processFile(content) { - let commands = {}; - content.requests.forEach((request) => { - let command = getCommand(request.url); - let schema = { - api: request.name.split(' ')[0].toLowerCase(), - endpoint: cleanUrl(request.url), - method: request.method, - params: getParamsFromDescription(request.description), - description: request.description - } - if (!commands[command]) { - commands[command] = [ - schema - ] - } else { - commands[command].push(schema) - } - - }); - let data = JSON.stringify(commands); - fs.writeFileSync('./formattedAPIs.json', data); - // getParamsFromDescription(content.requests[1].description); - // console.log(content.requests[60]) - // getCommand(content.requests[60].url) + let commands = {}; + content.requests.forEach((request) => { + let command = getCommand(request.url); + let schema = { + api: request.name.split(' ')[0].toLowerCase(), + endpoint: cleanUrl(request.url), + method: request.method, + params: getParamsFromDescription(request.description), + description: request.description, + }; + if (!commands[command]) { + commands[command] = [schema]; + } else { + commands[command].push(schema); + } + }); + let data = JSON.stringify(commands); + fs.writeFileSync('./formattedAPIs.json', data); + // getParamsFromDescription(content.requests[1].description); + // console.log(content.requests[60]) + // getCommand(content.requests[60].url) } function getParamsFromDescription(desc) { - if (!desc) return [] - - desc = desc.replace(/-/g, '') - let words = desc.split('\n'); - words.splice(0, 1) - let params = []; - words.forEach((w) => { - params.push({ - parameter: w.slice(w.indexOf('**') + 2, w.lastIndexOf('**')), - required: w.toLowerCase().indexOf('required') > 0, - type: guessType(w.slice(w.indexOf('**') + 2, w.lastIndexOf('**'))) - }) - }) + if (!desc) return []; - return params; + desc = desc.replace(/-/g, ''); + let words = desc.split('\n'); + words.splice(0, 1); + let params = []; + words.forEach((w) => { + params.push({ + parameter: w.slice(w.indexOf('**') + 2, w.lastIndexOf('**')), + required: w.toLowerCase().indexOf('required') > 0, + type: guessType(w.slice(w.indexOf('**') + 2, w.lastIndexOf('**'))), + }); + }); + return params; } function guessType(name) { - name = name.toLowerCase(); - let type; - switch (name) { - case 'amount': - type = 'Number' - break; - case 'page': - type = 'Number' - break; - case 'perPage': - type = 'Number' - break; - default: - type = 'String'; - } - return type; + name = name.toLowerCase(); + let type; + switch (name) { + case 'amount': + type = 'Number'; + break; + case 'page': + type = 'Number'; + break; + case 'perPage': + type = 'Number'; + break; + default: + type = 'String'; + } + return type; } function getCommand(endpoint) { - let path = endpoint.replace('https://api.paystack.co/', ''); - path = path.split('/') - return path[0] + let path = endpoint.replace('https://api.paystack.co/', ''); + path = path.split('/'); + return path[0]; } function cleanUrl(url) { - if (url.indexOf('?') > 0) { - url = url.slice(url.indexOf('?')); - } - if (url.indexOf('{') > 0) { - url = url.slice(url.indexOf('{')); - } - if (url.indexOf(':id') > 0) { - url = url.slice(url.indexOf(':id')); - } - return url; -} \ No newline at end of file + if (url.indexOf('?') > 0) { + url = url.slice(url.indexOf('?')); + } + if (url.indexOf('{') > 0) { + url = url.slice(url.indexOf('{')); + } + if (url.indexOf(':id') > 0) { + url = url.slice(url.indexOf(':id')); + } + return url; +} diff --git a/parsers/apis.json b/parsers/apis.json index 9f150bb..4c078da 100644 --- a/parsers/apis.json +++ b/parsers/apis.json @@ -1,5093 +1,5081 @@ { - "id": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "name": "Paystack API", - "description": "The **Paystack** API Collection is a collection of all endpoints that merchants and developers can take advantage of to build financial solutions in Nigeria", - "auth": null, - "events": null, - "variables": [], - "order": [], - "folders_order": [ - "e446091c-eefd-4073-a582-4299e3c577de", - "4abcb36b-0005-4397-8452-1ad6f66e8ec3", - "886b67bc-06de-485b-8b9f-0297310ee7db", - "2bfdf110-b72e-4cc1-a7ba-73fa32369750", - "958cdff8-98b1-4e14-93c5-512ae20a253e", - "084139a8-b034-4bc7-97af-8a9d6a6022b9", - "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", - "b34521bd-87df-49f6-b11a-7b8da3a2ffc3", - "058c5fce-45d9-49b3-b243-2bd3489f42e9", - "4c6d8917-6047-41ca-9df7-153ba844f275", - "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", - "56062893-9ab5-40f0-a017-17072c219217", - "1696a2d4-2391-4f80-a929-4e7041df44cc", - "08b275ca-4233-4ac3-92a2-5224a4f63146", - "588455d8-920a-4aec-a63c-b29486d03e4f", - "9b923444-b195-452e-b534-8dbb98905930", - "65cf7432-1b38-403b-9d51-4d77aed89f7c", - "72fc0747-0dfd-4d95-9967-d2eec04a1d47" - ], - "folders": [ - { - "id": "1696a2d4-2391-4f80-a929-4e7041df44cc", - "name": "Bulk Charges", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "29f698b8-6ab0-4f0a-ae6e-c219c24d4581", - "ec7d7877-1d7f-417c-81a5-b1d01663ec46", - "107de35f-6a2d-4640-b708-360b260b4b9b", - "277970a1-0b1e-4431-90ba-c7b039b59070", - "c7bd8231-6b4b-49de-b549-c7282211e495", - "bc53767a-f68a-44a7-ac3f-0ba03ece6c3f" - ], - "folders_order": [] - }, - { - "id": "56062893-9ab5-40f0-a017-17072c219217", - "name": "Charge", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "a6755315-7c75-4c11-8709-1447ad19c2d2", - "d128d8bb-eb52-43dd-8545-4f9faf38cadf", - "82798ee0-0592-41fe-b2e8-e267a7e5b39b", - "25333027-4fdd-4454-bf65-536c40809cef", - "ea31deed-604d-4ed8-9c9e-553754a93654", - "99dc16de-6c99-4ea7-8254-fa57f73bfbe2", - "c168c418-43d0-4ceb-80e4-a4f6824754d9" - ], - "folders_order": [] - }, - { - "id": "9b923444-b195-452e-b534-8dbb98905930", - "name": "Control Panel", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "ad2d4a15-d9a5-4e10-ab8a-a77482e8ef2e", - "56989ea8-1cd4-4a11-a2e1-003f3d9b118b" - ], - "folders_order": [] - }, - { - "id": "4abcb36b-0005-4397-8452-1ad6f66e8ec3", - "name": "Customers", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "aa38750f-21b0-4cba-8864-24812685435d", - "9bdce8ac-0d49-46bc-a4cb-c1116a1dcf2c", - "b2833b4e-91e8-4f4c-8a0f-6fb97c130a1e", - "42d4a271-8b1e-4297-95d9-69e0727c2e9a", - "b2c99087-3afa-4310-99d8-549ec6ee1440" - ], - "folders_order": [] - }, - { - "id": "588455d8-920a-4aec-a63c-b29486d03e4f", - "name": "Disputes", - "description": "A chargeback(dispute) is a reversal of a payment made to a merchant, back to the customer's bank account. The reversal is done by the customer’s bank, at the request of the customer and it is used as a form of consumer protection to secure the customer's interest in wrongful transactions. This means a customer has a right to file a chargeback for a transaction if there is a valid reason to do so.\n\nChargebacks are different from refunds. In the case of a refund, the customer reaches out to the business to ask for a refund, which may or may not be honored depending on the business' policy. However, for a chargeback, the customer contacts their bank directly to forcibly reverse the transaction.", - "auth": null, - "events": [ - { - "listen": "prerequest", - "script": { - "id": "78233250-a60b-4f48-a000-d22290246c73", - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "id": "82318060-f724-4753-9c33-9a64500f0ef1", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "8c42b41f-1b9a-43f3-80bf-7094c6cbb1e6", - "fd878edc-b34c-4552-b166-d3d06ccd4d97", - "77203a76-a23a-45a4-ac6f-61f6f6d46f35" - ], - "folders_order": [], - "protocolProfileBehavior": {} - }, - { - "id": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", - "name": "Invoices", - "description": "Send out payment requests and invoices to your customers to supercharge your sales process\n", - "auth": null, - "events": [ - { - "listen": "prerequest", - "script": { - "id": "10c79117-a373-4bc3-9f0c-711fc802c996", - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "id": "f897e80c-6cca-439a-960f-e8d2d3ebbe98", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "0d31a07b-9c51-4afa-b47d-d5705bf88c81", - "3f87dee8-ad19-4f7a-8861-ae5220497c0b", - "50c32a6c-8e70-486a-9468-ad0694a0dce9", - "c2796b87-1b90-4bb3-a0e0-f176854bda18", - "3134838c-e543-47cb-9338-90e4868a1e70", - "773461c5-9baa-4c38-92f1-68f9e55f4bd0", - "219a3e30-67e1-4e60-80cf-ab352e3ee9d2", - "7f24265a-4e43-4839-8b59-b3b6758532ae", - "dd2df05a-3d7f-477a-8a44-180e42f62288" - ], - "folders_order": [] - }, - { - "id": "72fc0747-0dfd-4d95-9967-d2eec04a1d47", - "name": "Miscellaneous", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "1d6a47ee-9b08-4305-a597-c0e11c4c5cf9" - ], - "folders_order": [] - }, - { - "id": "084139a8-b034-4bc7-97af-8a9d6a6022b9", - "name": "Payment Pages", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "f411a75a-4e79-4248-b6b1-6bb2bc521a65", - "268b9f2f-013c-4380-9d69-b5b764da18a5", - "240f6fde-40da-4305-9dbe-9c4280ea3c21", - "092a52ea-294c-4943-a20a-f0a43e13d2a5", - "e67ba043-51d0-4ef4-a49e-e652482393ac" - ], - "folders_order": [] - }, - { - "id": "2bfdf110-b72e-4cc1-a7ba-73fa32369750", - "name": "Plans", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "8c25557c-11ce-45e7-9970-3b2eb9666a6b", - "8d605bc9-6eb8-4ee2-9180-ad3683f00ff7", - "9aa0cd8c-a4aa-4400-b9f9-3423dd4e759a", - "34e85546-128d-426c-8e55-980de4889852" - ], - "folders_order": [] - }, - { - "id": "08b275ca-4233-4ac3-92a2-5224a4f63146", - "name": "Refunds", - "description": "A Refund is an object created on a disputed transaction requesting for a refund. Credit/Debit card originally charged will be refunded.", - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "4a66b2b2-6a4b-4fb7-85ae-0a296263359d", - "a76c83a3-dde8-44b9-8f37-0d796b3c449b", - "9b543458-0505-4a68-acdb-68d55c9b1943" - ], - "folders_order": [] - }, - { - "id": "b34521bd-87df-49f6-b11a-7b8da3a2ffc3", - "name": "Settlements", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "b35664d5-a14f-4d8a-b959-3ea6ee821aba" - ], - "folders_order": [] - }, - { - "id": "886b67bc-06de-485b-8b9f-0297310ee7db", - "name": "Subaccounts", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "d19e26d4-7593-4af7-893a-ae45dfc43887", - "b2aca7dd-5390-4348-b690-f2d81673a39c", - "311bde2d-4b78-4710-8331-a5d8b60fb3dd", - "03b3abd7-77f0-4854-8ced-0c507ae0045b" - ], - "folders_order": [] - }, - { - "id": "958cdff8-98b1-4e14-93c5-512ae20a253e", - "name": "Subscriptions", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "68981e59-4687-4cfd-993a-140725f16582", - "beb2a320-ba1f-41d0-be71-49c783438d7c", - "455653a6-e83a-4170-b1c5-26c10c521be8", - "10107e5f-59b6-47bb-ac01-0a4b444f6fd2", - "c5b698c9-f2f2-431f-aef5-6f68d4497678" - ], - "folders_order": [] - }, - { - "id": "e446091c-eefd-4073-a582-4299e3c577de", - "name": "Transactions", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "f1fa7622-e735-49ca-be43-3daaf3865fe9", - "30aedfb9-716d-4c04-a9d8-d9917a5671fb", - "3828fd62-ac56-4173-b1f7-4e7a9736a07d", - "f463ae2f-e633-4833-a686-a392a87e24b8", - "7aa585e2-2e5c-4915-a9a5-01cb22cd2070", - "c6597500-7281-44c3-96c3-49e45ac0cc8f", - "db65eb06-772f-4987-bb35-94fc0d5840b7", - "6643a92f-c2ee-4010-8f50-cbe07103ffae", - "e578399d-00d7-4711-b088-9d8049b9f4a2", - "a7300540-a900-485e-8c90-7f20cf937bba" - ], - "folders_order": [] - }, - { - "id": "4c6d8917-6047-41ca-9df7-153ba844f275", - "name": "Transfers", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "2eb46d8f-c694-4ce1-ae2d-ea3a3e8e89a3", - "0c2d6ec3-cf3e-413e-bdd6-91014d702310", - "475a22fa-d9d9-4aad-9daa-551aac93df21", - "d2cdaab4-09a7-48e9-9cb9-34fef87c28bc", - "288745a8-e595-42c8-8a74-cc2c4dbc4949", - "9f56c0a9-ef8e-4fcc-9886-48b75966cf9f" - ], - "folders_order": [] - }, - { - "id": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", - "name": "Transfers Control", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "b1ce4f06-38b5-4b81-a7c5-8858c05a5274", - "c8ece9ee-69b2-4610-b925-3dc8de6487ca", - "f7be8d7c-4cd9-4741-8f05-da42f0864ed6", - "809a38f9-979d-4db7-b997-30709de84dad", - "b54289de-5afd-454c-84ce-6dc23e331579", - "847209c5-9d03-4364-9f44-c8fa666371c8" - ], - "folders_order": [] - }, - { - "id": "058c5fce-45d9-49b3-b243-2bd3489f42e9", - "name": "Transfers Recipients", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "0ea26c65-76af-4044-90d9-a20e480f6cd9", - "b77b4e4e-f9f5-4435-b19c-2f3bcf4e68a6", - "b93a1dc1-27ca-422c-8f4d-97bd62607c08", - "696647d0-b1f2-4746-a238-7ac1f1d41514" - ], - "folders_order": [] - }, - { - "id": "65cf7432-1b38-403b-9d51-4d77aed89f7c", - "name": "Verification", - "description": null, - "auth": null, - "events": null, - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", - "folder": null, - "order": [ - "6a02589a-001b-4c16-bd7f-d1ad880ef207", - "be833eaf-47a2-408a-95c5-6ab7d00e0798", - "4aac7fb7-2f46-4f47-80ff-3215dae57f94", - "ccd6fec1-02b7-4fa7-a602-2a8803c250cd", - "e2898759-e26f-4c26-9701-f8c3822c3b3d" - ], - "folders_order": [] - } - ], - "requests": [ - { - "id": "03b3abd7-77f0-4854-8ced-0c507ae0045b", - "name": "Update Subaccount", - "url": "https://api.paystack.co/subaccount/:id_or_slug", - "description": null, - "data": [ - { - "key": "primary_contact_email", - "value": "customer@newemail.com", - "type": "text" - }, - { - "key": "percentage_charge", - "value": "18.9", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "PUT", - "pathVariableData": [ - { - "key": "id_or_slug", - "value": "" - } - ], - "queryParams": [], - "auth": null, - "events": null, - "folder": "886b67bc-06de-485b-8b9f-0297310ee7db", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": { - "id_or_slug": "" - } - }, - { - "id": "092a52ea-294c-4943-a20a-f0a43e13d2a5", - "name": "Update Page", - "url": "https://api.paystack.co/page/:id_or_plan_code", - "description": "**Body Params**\n- **name** - Name of page\n- **description** - Short description of page\n- **amount** - Amount to be charged in kobo. Will override the amount for existing subscriptions.\n- **active** - Set to false to deactivate page url.", - "data": [ - { - "key": "description", - "value": "Give unto the Lord, and it shall be multiplied 10-fold to you.", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "PUT", - "pathVariableData": [ - { - "key": "id_or_plan_code", - "value": "" - } - ], - "queryParams": [], - "auth": null, - "events": null, - "folder": "084139a8-b034-4bc7-97af-8a9d6a6022b9", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": { - "id_or_plan_code": "" - } - }, - { - "id": "0c2d6ec3-cf3e-413e-bdd6-91014d702310", - "name": "List Transfers", - "url": "https://api.paystack.co/transfer", - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "4c6d8917-6047-41ca-9df7-153ba844f275", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "0d31a07b-9c51-4afa-b47d-d5705bf88c81", - "name": "Create Invoice", - "url": "https://api.paystack.co/paymentrequest", - "description": "**Body Params**\n- **customer** (_required_) - Customer ID or code\n- **due_date** (_required_) - ISO 8601 representation of request due date\n- **amount** (_required_) - Invoice amount. Only useful if line items and tax values are ignored. endpoint will throw a friendly warning if neither is available.\n- **description**\n- **line_items** - Array of line items in the format `[{\"name\":\"item 1\", \"amount\":2000}]`\n- **tax** - Array of taxes to be charged in the format `[{\"name\":\"VAT\", \"amount\":2000}]`\n- **currency** - Defaults to Naira\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`.\n- **draft** - Indicate if request should be saved as draft. Defaults to `false` and overrides send_notification.\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`.\n- **has_invoice** - Set to `true` to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no `line_items` or `tax` passed.\n- **invoice_number** - Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point.", - "data": [], - "dataMode": "raw", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", - "responses": [ - { - "id": "c34c8e52-f905-47e9-bab3-06fefcf3227b", - "name": "Successful 200", - "status": "OK", - "mime": "", - "language": "json", - "text": "{\n \"status\": true,\n \"message\": \"Payment request created\",\n \"data\": {\n \"id\": 23902,\n \"domain\": \"test\",\n \"amount\": 42000,\n \"currency\": \"NGN\",\n \"due_date\": \"2017-05-08T00:00:00.000Z\",\n \"has_invoice\": true,\n \"invoice_number\": 6,\n \"description\": \"a test invoice\",\n \"line_items\": [\n {\n \"name\": \"item 1\",\n \"amount\": 20000\n },\n {\n \"name\": \"item 2\",\n \"amount\": 20000\n }\n ],\n \"tax\": [\n {\n \"name\": \"VAT\",\n \"amount\": 2000\n }\n ],\n \"request_code\": \"PRQ_3z3cfcsee63r16w\",\n \"status\": \"pending\",\n \"paid\": false,\n \"metadata\": null,\n \"notifications\": [],\n \"offline_reference\": \"119333023902\",\n \"customer\": 2396797,\n \"created_at\": \"2018-06-21T09:08:43.745Z\"\n }\n}", - "responseCode": { - "code": 200, - "name": "OK", - "detail": "" - }, - "requestObject": { - "id": "f9679dbf-da14-4312-a9ca-a22e43e480be", - "method": "POST", - "headers": "Content-Type: application/json\nAuthorization: Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", - "dataMode": "raw", - "data": [], - "url": "https://api.paystack.co/paymentrequest", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Content-Type", - "value": "application/json", - "enabled": true - }, - { - "key": "Authorization", - "value": "Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", - "type": "text", - "enabled": true - } - ], - "rawModeData": "{\n\t\"description\": \"a test invoice\",\n\t\"line_items\": [\n\t\t{\"name\": \"item 1\", \"amount\": 20000},\n\t\t{\"name\": \"item 2\", \"amount\": 20000}\n\t],\n\t\"tax\": [\n\t\t{\"name\": \"VAT\", \"amount\": 2000}\n\t],\n\t\"customer\": \"CUS_lvsdks3lllw3ure\",\n\t\"due_date\": \"2017-05-08\"\n}" - }, - "headers": [ - { - "key": "Access-Control-Allow-Origin", - "value": "*", - "name": "Access-Control-Allow-Origin", - "description": "Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource." - }, - { - "key": "CF-RAY", - "value": "42e5550cee6635ba-LHR", - "name": "CF-RAY", - "description": "Custom header" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "Options that are desired for the connection" - }, - { - "key": "Content-Encoding", - "value": "gzip", - "name": "Content-Encoding", - "description": "The type of encoding used on the data." - }, - { - "key": "Content-Length", - "value": "389", - "name": "Content-Length", - "description": "The length of the response body in octets (8-bit bytes)" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "The mime type of this content" - }, - { - "key": "Date", - "value": "Thu, 21 Jun 2018 09:08:43 GMT", - "name": "Date", - "description": "The date and time that the message was sent" - }, - { - "key": "ETag", - "value": "W/\"30a-IawJd2wFpUB2pAD/gWgjNA\"", - "name": "ETag", - "description": "An identifier for a specific version of a resource, often a message digest" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "Custom header" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "A name for the server" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains." - }, - { - "key": "Vary", - "value": "X-HTTP-Method-Override", - "name": "Vary", - "description": "Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server." - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "The only defined value, \"nosniff\", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "Specifies the technology (ASP.NET, PHP, JBoss, e.g.) supporting the web application (version details are often in X-Runtime, X-Version, or X-AspNet-Version)" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3ASgBvFKkNMl9LqoQn61BYPQv0FGo7Px_8.6r7HOko5VFuXL%2FqOBe9zJdEr29%2BhgowKdBy8bulmAaw; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "an HTTP cookie" - } - ], - "cookies": [ - { - "expirationDate": "Fri Apr 19 2019 18:10:52 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d70b94619eafb5cf44f6917a3e277cbc11524161452", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3ASgBvFKkNMl9LqoQn61BYPQv0FGo7Px_8.6r7HOko5VFuXL%2FqOBe9zJdEr29%2BhgowKdBy8bulmAaw", - "name": "sails.sid" - } - ], - "request": "0d31a07b-9c51-4afa-b47d-d5705bf88c81", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "rawModeData": "{\n\t\"description\": \"a test invoice\",\n\t\"line_items\": [\n\t\t{\"name\": \"item 1\", \"amount\": 20000},\n\t\t{\"name\": \"item 2\", \"amount\": 20000}\n\t],\n\t\"tax\": [\n\t\t{\"name\": \"VAT\", \"amount\": 2000}\n\t],\n\t\"customer\": \"CUS_je02lbimlqixzax\",\n\t\"due_date\": \"2017-05-08\"\n}", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "0ea26c65-76af-4044-90d9-a20e480f6cd9", - "name": "Create Transfer Recipient", - "url": "https://api.paystack.co/transferrecipient", - "description": "Creates a new recipient. An duplicate account number will lead to the retrieval of the existing record.\n\n**Body Params**\n- **type** (_required_) - Recipient Type (Only nuban at this time)\n- **name** (_required_) - A name for the recipient\n- **metadata** - Store additional information about your recipient in a structured format. JSON\n- **bank_code** (_required_) - Required if type is nuban. You can find a list of bank codes at [api.paystack.co/bank](https://api.paystack.co/bank)\n- **account_number** (_required_) - Required if type is `nuban`\n- **currency** - Currency for the account receiving the transfer.\n- **description**", - "data": [ - { - "key": "type", - "value": "nuban", - "type": "text" - }, - { - "key": "name", - "value": "Zombie", - "type": "text" - }, - { - "key": "description", - "value": "Zombier", - "type": "text" - }, - { - "key": "account_number", - "value": "01000000010", - "type": "text" - }, - { - "key": "bank_code", - "value": "044", - "type": "text" - }, - { - "key": "currency", - "value": "NGN", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "058c5fce-45d9-49b3-b243-2bd3489f42e9", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "10107e5f-59b6-47bb-ac01-0a4b444f6fd2", - "name": "Disable Subscription", - "url": "https://api.paystack.co/subscription/disable", - "description": "**Body Params**\n- **code** (_required_) - Subscription code\n- **token** (_required_) - Email token", - "data": [ - { - "key": "code", - "value": "SUB_vsyqdmlzble3uii", - "type": "text" - }, - { - "key": "token", - "value": "d7gofp6yppn3qz7", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "958cdff8-98b1-4e14-93c5-512ae20a253e", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "107de35f-6a2d-4640-b708-360b260b4b9b", - "name": "Fetch Bulk Charge Batch", - "url": "https://api.paystack.co/bulkcharge/id_or_code", - "description": "This endpoint retrieves a specific batch code. It also returns useful information on its progress by way of the `total_charges` and `pending_charges` attributes.\n\n**Path Params**\n- **id_or_code** (_required_) - An ID or code for the transfer whose details you want to retrieve.", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "1696a2d4-2391-4f80-a929-4e7041df44cc", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "1d6a47ee-9b08-4305-a597-c0e11c4c5cf9", - "name": "List Banks", - "url": "https://api.paystack.co/bank", - "description": null, - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "72fc0747-0dfd-4d95-9967-d2eec04a1d47", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "219a3e30-67e1-4e60-80cf-ab352e3ee9d2", - "name": "Finalize Invoice", - "url": "https://api.paystack.co/paymentrequest/finalize/ID_OR_CODE", - "description": "Publishes invoice that is draft by sending customer the invoice via email\n\n**Body Params**\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`", - "data": [], - "dataMode": "params", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "240f6fde-40da-4305-9dbe-9c4280ea3c21", - "name": "Fetch Page", - "url": "https://api.paystack.co/page/id_or_plan_code", - "description": null, - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "084139a8-b034-4bc7-97af-8a9d6a6022b9", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "25333027-4fdd-4454-bf65-536c40809cef", - "name": "Submit OTP", - "url": "https://api.paystack.co/charge/submit_otp", - "description": "Submit OTP to complete a charge\n\n**Body Params**\n- **otp** (_required_) - OTP submitted by user\n- **reference** (_required_) - reference for ongoing transaction", - "data": [ - { - "key": "otp", - "value": "123456", - "type": "text" - }, - { - "key": "reference", - "value": "5bwib5v6anhe9xa", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "56062893-9ab5-40f0-a017-17072c219217", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "268b9f2f-013c-4380-9d69-b5b764da18a5", - "name": "List Pages", - "url": "https://api.paystack.co/page", - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **interval** - Filter list by plans with specified interval\n- **amount** - Filter list by plans with specified amount (in kobo)", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "https://api.paystack.co/plan" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "084139a8-b034-4bc7-97af-8a9d6a6022b9", - "headers": "Authorization: https://api.paystack.co/plan\n", - "pathVariables": {} - }, - { - "id": "277970a1-0b1e-4431-90ba-c7b039b59070", - "name": "Fetch Charges in a Batch", - "url": "https://api.paystack.co/bulkcharge/id_or_code/charges", - "description": "This endpoint retrieves the charges associated with a specified batch code. Pagination parameters are available. You can also filter by status. Charge statuses can be `pending`, `success` or `failed`.\n\n**Path Params**\n- **id_or_code** (_required_) - An ID or code for the batch whose charges you want to retrieve.\n\n**Query Params**\n- **status** - `pending`, `success` or `failed`\n- **perPage**\n- **page**\n", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "1696a2d4-2391-4f80-a929-4e7041df44cc", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "288745a8-e595-42c8-8a74-cc2c4dbc4949", - "name": "Finalize Transfer", - "url": "https://api.paystack.co/transfer/finalize_transfer", - "description": "**Body Params**\n- **transfer_code** (_required_) - Transfer code\n- **otp** (_required_) - OTP sent to business phone to verify transfer.", - "data": [ - { - "key": "transfer_code", - "value": "TRF_vsyqdmlzble3uii", - "type": "text" - }, - { - "key": "otp", - "value": "928783", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "4c6d8917-6047-41ca-9df7-153ba844f275", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "29f698b8-6ab0-4f0a-ae6e-c219c24d4581", - "name": "Initiate Bulk Charge", - "url": "https://api.paystack.co/bulkcharge", - "description": "Send an array of objects with authorization codes and amount in kobo so we can process transactions as a batch.\n\n**Body Params**\n- **(no_name)**", - "data": [], - "dataMode": "raw", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "1696a2d4-2391-4f80-a929-4e7041df44cc", - "rawModeData": "[{\n\t\"authorization\": \"AUTH_n95vpedf\", \n\t\"amount\": 2500\n}, \n{\n\t\"authorization\": \"AUTH_ljdt4e4j\", \n\t\"amount\": 1500\n}]", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "2eb46d8f-c694-4ce1-ae2d-ea3a3e8e89a3", - "name": "Initiate Transfer", - "url": "https://api.paystack.co/transfer", - "description": "Status of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’.\n\n**Body Params**\n- **source** (_required_) - Where should we transfer from? Only balance for now\n- **amount** - Amount to transfer in kobo\n- **currency** - NGN\n- **reason**\n- **recipient** (_required_) - Code for transfer recipient\n- **reference** - If specified, the field should be a unique identifier (in lowercase) for the object. Only `-` `,` `_` and alphanumeric characters allowed.", - "data": [ - { - "key": "source", - "value": "balance", - "type": "text" - }, - { - "key": "reason", - "value": "E go better for you", - "type": "text" - }, - { - "key": "amount", - "value": "3794800", - "type": "text" - }, - { - "key": "recipient", - "value": "RCP_gx2wn530m0i3w3m", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "4c6d8917-6047-41ca-9df7-153ba844f275", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "30aedfb9-716d-4c04-a9d8-d9917a5671fb", - "name": "Verify Transaction", - "url": "https://api.paystack.co/transaction/verify/{REFERENCE}", - "description": "**Path Params**\n- **reference** (_required_)", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "e446091c-eefd-4073-a582-4299e3c577de", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "311bde2d-4b78-4710-8331-a5d8b60fb3dd", - "name": "Fetch Subaccount", - "url": "https://api.paystack.co/subaccount/:id_or_slug", - "description": null, - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json", - "enabled": false - } - ], - "method": "GET", - "pathVariableData": [ - { - "key": "id_or_slug", - "value": "" - } - ], - "queryParams": [], - "auth": null, - "events": null, - "folder": "886b67bc-06de-485b-8b9f-0297310ee7db", - "headers": "Authorization: Bearer SECRET_KEY\n//Content-Type: application/json\n", - "pathVariables": { - "id_or_slug": "" - } - }, - { - "id": "3134838c-e543-47cb-9338-90e4868a1e70", - "name": "Send Notification", - "url": "https://api.paystack.co/paymentrequest/notify/ID_OR_CODE", - "description": "**Path Params**\n- **id** - Invoice code for which you want to send a notification for", - "data": [], - "dataMode": "params", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "34e85546-128d-426c-8e55-980de4889852", - "name": "Update Plan", - "url": "https://api.paystack.co/plan/:id_or_plan_code", - "description": "**Body Params**\n- **name** - Name of plan\n- **description** - Short description of plan\n- **amount** - Amount to be charged in kobo. Will override the amount for existing subscriptions.\n- **interval** - Interval in words. Valid intervals are `hourly`, `daily`, `weekly`, `monthly`, `annually`.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers.\n- **send_sms** - Set to false if you don't want text messages to be sent to your customers\n- **currency** - Currency in which amount is set\n- **invoice_limit** - Number of invoices to raise during subscription to this plan. Will not override `invoice_limit` set on active subscriptions.", - "data": [ - { - "key": "name", - "value": "Monthly retainer (renamed)", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "PUT", - "pathVariableData": [ - { - "key": "id_or_plan_code", - "value": "" - } - ], - "queryParams": [], - "auth": null, - "events": null, - "folder": "2bfdf110-b72e-4cc1-a7ba-73fa32369750", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": { - "id_or_plan_code": "" - } - }, - { - "id": "3828fd62-ac56-4173-b1f7-4e7a9736a07d", - "name": "List Transactions", - "url": "https://api.paystack.co/transaction", - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **customer** - Specify an ID for the customer whose transactions you want to retrieve\n- **status** - Filter transactions by status ('failed', 'success', 'abandoned')\n- **from** - A timestamp from which to start listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21\n- **to** - A timestamp at which to stop listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21\n- **amount** - Filter transactions by amount. Specify the amount in kobo.", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "e446091c-eefd-4073-a582-4299e3c577de", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "3f87dee8-ad19-4f7a-8861-ae5220497c0b", - "name": "List Invoices", - "url": "https://api.paystack.co/paymentrequest", - "description": "**Query Params**\n- **customer** - Specify an ID for the customer whose requests you want to retrieve\n- **status** - Filter requests by status ('failed', 'success', 'abandoned')\n- **currency** - Filter requests sent in a particular currency.\n- **paid** - Filter requests that have been paid for \n- **include_archive** - Includes archived requests in the response\n- **payment_request** - Filter specific invoice by passing invoice code", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEYS" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", - "headers": "Authorization: Bearer SECRET_KEYS\n", - "pathVariables": {} - }, - { - "id": "42d4a271-8b1e-4297-95d9-69e0727c2e9a", - "name": "Update Customer", - "url": "https://api.paystack.co/customer/:ID_OR_CUSTOMER_CODE", - "description": "**Body Params**\n- **first_name** - Customer's first name\n- **last_name** - Customer's last name\n- **phone** - Customer's phone number\n- **metadata** - A set of key/value pairs that you can attach to the customer. It can be used to store additional information in a structured format.", - "data": [ - { - "key": "email", - "value": "customer@email.com", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "PUT", - "pathVariableData": [ - { - "key": "ID_OR_CUSTOMER_CODE", - "value": "" - } - ], - "queryParams": [], - "auth": null, - "events": null, - "folder": "4abcb36b-0005-4397-8452-1ad6f66e8ec3", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": { - "ID_OR_CUSTOMER_CODE": "" - } - }, - { - "id": "455653a6-e83a-4170-b1c5-26c10c521be8", - "name": "Fetch Subscription", - "url": "https://api.paystack.co/subscription/:id_or_subscription_code", - "description": null, - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [ - { - "key": "id_or_subscription_code", - "value": "" - } - ], - "queryParams": [], - "auth": null, - "events": null, - "folder": "958cdff8-98b1-4e14-93c5-512ae20a253e", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": { - "id_or_subscription_code": "" - } - }, - { - "id": "475a22fa-d9d9-4aad-9daa-551aac93df21", - "name": "Verify Transfer", - "url": "https://api.paystack.co/transfer/verify/{reference}", - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "4c6d8917-6047-41ca-9df7-153ba844f275", - "responses": [ - { - "id": "70d3564d-bcdf-4f53-b579-80eea2209e67", - "name": "200 OK", - "status": "OK", - "mime": "", - "language": "json", - "text": "{\n \"status\": true,\n \"message\": \"Transfer retrieved\",\n \"data\": {\n \"integration\": 119333,\n \"recipient\": {\n \"domain\": \"test\",\n \"type\": \"nuban\",\n \"currency\": \"NGN\",\n \"name\": \"Zombie\",\n \"details\": {\n \"account_number\": \"0100000001\",\n \"account_name\": null,\n \"bank_code\": \"044\",\n \"bank_name\": \"Access Bank\"\n },\n \"description\": \"Zombier\",\n \"metadata\": \"\",\n \"recipient_code\": \"RCP_c2mty1w1uvd4av4\",\n \"active\": true,\n \"email\": null,\n \"id\": 31911,\n \"integration\": 119333,\n \"createdAt\": \"2017-10-13T20:35:51.000Z\",\n \"updatedAt\": \"2017-10-13T20:35:51.000Z\"\n },\n \"domain\": \"test\",\n \"amount\": 50000,\n \"currency\": \"NGN\",\n \"reference\": \"ref_demo\",\n \"source\": \"balance\",\n \"source_details\": null,\n \"reason\": \"Test for reference\",\n \"status\": \"success\",\n \"failures\": null,\n \"transfer_code\": \"TRF_kjati32r73poyt5\",\n \"titan_code\": null,\n \"transferred_at\": null,\n \"id\": 476948,\n \"createdAt\": \"2018-07-22T10:29:33.000Z\",\n \"updatedAt\": \"2018-07-22T10:29:33.000Z\"\n }\n}", - "responseCode": { - "code": 200, - "name": "OK", - "detail": "" - }, - "requestObject": { - "id": "31563353-eef7-4edf-84fc-f3746ca31900", - "method": "GET", - "headers": "Authorization: Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", - "dataMode": null, - "data": null, - "rawModeData": "", - "url": "https://api.paystack.co/transfer/verify/ref_demo", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", - "type": "text", - "enabled": true - } - ] - }, - "headers": [ - { - "key": "Access-Control-Allow-Origin", - "value": "*", - "name": "Access-Control-Allow-Origin", - "description": "Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource." - }, - { - "key": "CF-RAY", - "value": "43e53a928e146aa3-LHR", - "name": "CF-RAY", - "description": "Custom header" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "Options that are desired for the connection" - }, - { - "key": "Content-Encoding", - "value": "gzip", - "name": "Content-Encoding", - "description": "The type of encoding used on the data." - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "The mime type of this content" - }, - { - "key": "Date", - "value": "Sun, 22 Jul 2018 10:29:53 GMT", - "name": "Date", - "description": "The date and time that the message was sent" - }, - { - "key": "ETag", - "value": "W/\"44d-4mT+Xrgu45ptaJZbn63klw\"", - "name": "ETag", - "description": "An identifier for a specific version of a resource, often a message digest" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "Custom header" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "A name for the server" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains." - }, - { - "key": "Transfer-Encoding", - "value": "chunked", - "name": "Transfer-Encoding", - "description": "The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity." - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "The only defined value, \"nosniff\", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "Specifies the technology (ASP.NET, PHP, JBoss, e.g.) supporting the web application (version details are often in X-Runtime, X-Version, or X-AspNet-Version)" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3Acb7Xs6Sj6FPGDaV8tKBz7NLBoo97xD_Z.oTz8CdXKHPnva4Do7jCswOt4s5mkOQsSG52PMkr%2Fpb0; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "an HTTP cookie" - } - ], - "cookies": [ - { - "expirationDate": "Fri Apr 19 2019 18:10:52 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d70b94619eafb5cf44f6917a3e277cbc11524161452", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3Acb7Xs6Sj6FPGDaV8tKBz7NLBoo97xD_Z.oTz8CdXKHPnva4Do7jCswOt4s5mkOQsSG52PMkr%2Fpb0", - "name": "sails.sid" - } - ], - "request": "475a22fa-d9d9-4aad-9daa-551aac93df21", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "4a66b2b2-6a4b-4fb7-85ae-0a296263359d", - "name": "Create Refund", - "url": "https://api.paystack.co/refund", - "description": "This creates a refund which is then processed by the Paystack team\n\n**Body Params**\n- **transaction** _(required)_: Identifier for transaction to be refunded\n- **amount** _(optional)_: How much in kobo to be refunded to the customer. Amount is optional(defaults to original transaction amount) and cannot be more than the original transaction amount.\n- **currency**: Three-letter ISO currency\n- **customer_note** _(optional)_: customer reason\n- **merchant_note** _(optional)_: merchant reason", - "data": [ - { - "key": "transaction", - "value": "12794872", - "type": "text" - }, - { - "key": "amount", - "value": "50000", - "type": "text" - }, - { - "key": "currency", - "value": "NGN", - "type": "text" - }, - { - "key": "merchant_note", - "value": "yada yada", - "type": "text" - }, - { - "key": "customer_note", - "value": "blah blah", - "type": "text" - } - ], - "dataMode": "params", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "08b275ca-4233-4ac3-92a2-5224a4f63146", - "responses": [ - { - "id": "8260595a-9152-45f6-a700-62618dbd9461", - "name": "Create Refund", - "status": "Created", - "mime": "", - "language": "json", - "text": "{\n \"status\": true,\n \"message\": \"Refund created successfully\",\n \"data\": {\n \"dispute\": 5238,\n \"transaction\": {\n \"reference\": \"1517474242_6122RNV2MR\",\n \"domain\": \"test\",\n \"status\": \"reversed\",\n \"message\": null,\n \"original_amount\": 50750,\n \"amount\": 50750,\n \"authorized_amount\": null,\n \"captured_amount\": null,\n \"gateway\": \"\",\n \"otp_identifier\": null,\n \"quantity\": 1,\n \"channel\": \"card\",\n \"gateway_response\": \"Successful\",\n \"receipt_number\": null,\n \"merchant_transaction_reference\": null,\n \"authorization_code\": \"AUTH_jryeoytyxx\",\n \"authorization_url\": null,\n \"authorization_url_valid\": null,\n \"authorization_url_accessed_at\": null,\n \"authorization_url_access_count\": null,\n \"currency\": \"NGN\",\n \"logged_for_settlement\": \"ignored\",\n \"settled\": true,\n \"metadata\": {\n \"custom_fields\": [\n {\n \"display_name\": \"Full Name\",\n \"variable_name\": \"Full_Name\",\n \"type\": \"text\",\n \"value\": \"Stephen Amaza\"\n },\n {\n \"display_name\": \"Quantity\",\n \"variable_name\": \"Quantity\",\n \"type\": \"text\",\n \"value\": 1\n },\n {\n \"display_name\": \"Phone Number\",\n \"variable_name\": \"Phone_Number\",\n \"type\": \"text\",\n \"value\": 9085662909\n },\n {\n \"display_name\": \"Address\",\n \"variable_name\": \"Address\",\n \"type\": \"text\",\n \"value\": \"3 Ladoke Akintola Rd, GRA\"\n },\n {\n \"display_name\": \"Datepicker Title\",\n \"variable_name\": \"Datepicker_Title\",\n \"type\": \"text\",\n \"value\": \"02/23/2018\"\n },\n {\n \"display_name\": \"Unit Price\",\n \"variable_name\": \"Unit_Price\",\n \"type\": \"text\",\n \"value\": \"NGN500\"\n }\n ],\n \"referrer\": \"http://localhost:8888/page/\"\n },\n \"additional_parameters\": null,\n \"response\": null,\n \"transaction_number\": null,\n \"payment_page\": \"0\",\n \"bin\": \"408408\",\n \"country_code\": null,\n \"ip_address\": \"41.184.178.86\",\n \"ip_address_geo\": null,\n \"paidAt\": \"2018-02-01T08:38:08.000Z\",\n \"fees\": 761,\n \"deviceid\": \"648cbc1f3cd6f5cfc8e0fc621d33c06e\",\n \"callback_url\": null,\n \"label\": \"0\",\n \"dss_verdict\": null,\n \"log\": {\n \"time_spent\": 48,\n \"attempts\": 1,\n \"authentication\": null,\n \"errors\": 0,\n \"success\": true,\n \"mobile\": false,\n \"input\": [],\n \"channel\": null,\n \"history\": [\n {\n \"type\": \"input\",\n \"message\": \"Filled these fields: card number, card expiry, card cvv\",\n \"time\": 45\n },\n {\n \"type\": \"action\",\n \"message\": \"Attempted to pay\",\n \"time\": 45\n },\n {\n \"type\": \"success\",\n \"message\": \"Successfully paid\",\n \"time\": 47\n },\n {\n \"type\": \"close\",\n \"message\": \"Page closed\",\n \"time\": 48\n }\n ]\n },\n \"subaccount_code\": null,\n \"fees_split\": null,\n \"errorcategory\": null,\n \"errorcode\": null,\n \"id\": 12794872,\n \"integration\": 119333,\n \"customer\": 834733,\n \"coupon\": 0,\n \"plan\": 0,\n \"subscription\": null,\n \"invoice\": null,\n \"payment_request\": 0,\n \"authorization\": 3878861,\n \"settlement\": null,\n \"subaccount\": null,\n \"createdAt\": \"2018-02-01T08:37:24.000Z\",\n \"updatedAt\": \"2018-02-13T13:57:56.000Z\"\n },\n \"currency\": \"NGN\",\n \"amount\": 50000,\n \"channel\": \"\",\n \"customer_note\": \"blah blah\",\n \"merchant_note\": \"yada yada\",\n \"integration\": 119333,\n \"domain\": \"test\",\n \"status\": \"pending\",\n \"refunded_by\": \"steve@paystack.com\",\n \"refunded_at\": \"2018-02-13T13:57:56.549Z\",\n \"expected_at\": \"2018-02-20T13:57:56.000Z\",\n \"fully_deducted\": false,\n \"id\": 763,\n \"createdAt\": \"2018-02-13T13:57:56.551Z\",\n \"updatedAt\": \"2018-02-13T13:57:56.551Z\"\n }\n}", - "responseCode": { - "code": 201, - "name": "Created", - "detail": "" - }, - "requestObject": { - "id": "01464721-62f6-4dad-98c0-f2f2b48cbe6c", - "method": "POST", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json", - "dataMode": "params", - "data": [ - { - "key": "transaction", - "value": "12794872", - "type": "text" - }, - { - "key": "amount", - "value": "50000", - "type": "text" - }, - { - "key": "currency", - "value": "NGN", - "type": "text" - }, - { - "key": "merchant_note", - "value": "yada yada", - "type": "text" - }, - { - "key": "customer_note", - "value": "blah blah", - "type": "text" - } - ], - "rawModeData": "", - "url": "https://api.paystack.co/refund", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ] - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3ec84cb3ced506f4-LHR", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Length", - "value": "4189", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Tue, 13 Feb 2018 13:57:56 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"105d-5iUBG4flE1Tc2HYDTeyHIw\"", - "name": "ETag", - "description": "" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "Vary", - "value": "X-HTTP-Method-Override", - "name": "Vary", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3AvpsEWq6L5AUz3A8uLCZNFSPK7kEtBNbN.BxOcb504gxj4FQ09n9CmxWYSoEPViK5AUXt68C8zkZ8; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3AvpsEWq6L5AUz3A8uLCZNFSPK7kEtBNbN.BxOcb504gxj4FQ09n9CmxWYSoEPViK5AUXt68C8zkZ8", - "name": "sails.sid" - } - ], - "request": "4a66b2b2-6a4b-4fb7-85ae-0a296263359d", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "4aac7fb7-2f46-4f47-80ff-3215dae57f94", - "name": "Resolve Account Number", - "url": "https://api.paystack.co/bank/resolve?account_number=ACCOUNT_NUMBER&bank_code=BANK_CODE", - "description": "**Path Params**\n- **account_number** - Account Number\n- **bank_code** - Bank Code", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [ - { - "key": "account_number", - "value": "ACCOUNT_NUMBER" - }, - { - "key": "bank_code", - "value": "BANK_CODE" - } - ], - "auth": null, - "events": null, - "folder": "65cf7432-1b38-403b-9d51-4d77aed89f7c", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "50c32a6c-8e70-486a-9468-ad0694a0dce9", - "name": "View Invoice", - "url": "https://api.paystack.co/paymentrequest/REQUEST_ID_OR_CODE", - "description": "**Path Params**\n- **id** _(required)_ - An ID for the Invoice", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "56989ea8-1cd4-4a11-a2e1-003f3d9b118b", - "name": "Update Payment Session Timeout", - "url": "https://api.paystack.co/integration/payment_session_timeout", - "description": "**Query Params**\n- **timeout** - Time before stopping session (in seconds). Set to 0 to cancel session timeouts", - "data": [], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "PUT", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "9b923444-b195-452e-b534-8dbb98905930", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "6643a92f-c2ee-4010-8f50-cbe07103ffae", - "name": "View Transaction Timeline", - "url": "https://api.paystack.co/transaction/timeline/:id_or_reference", - "description": null, - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [ - { - "key": "id_or_reference", - "value": "" - } - ], - "queryParams": [], - "auth": null, - "events": null, - "folder": "e446091c-eefd-4073-a582-4299e3c577de", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": { - "id_or_reference": "" - } - }, - { - "id": "68981e59-4687-4cfd-993a-140725f16582", - "name": "Create Subscription", - "url": "https://api.paystack.co/subscription", - "description": "**Body Params**\n- **customer** (_required_) - Customer's email address or customer code\n- **plan** (_required_) - Plan code\n- **authorization** - If customer has multiple authorizations, you can set the desired authorization you wish to use for this subscription here. If this is not supplied, the customer's most recent authorization would be used\n- **start_date** - Set the date for the first debit. (ISO 8601 format)\n\nNote the `email_token` attribute for the subscription object. We create one on each subscription so customers can cancel their subscriptions from within the invoices sent to their mailboxes. Since they are not authorized, the email tokens are what we use to authenticate the requests over the API.", - "data": [ - { - "key": "customer", - "value": "CUS_xnxdt6s1zg1f4nx", - "type": "text" - }, - { - "key": "plan", - "value": "PLN_gx2wn530m0i3w3m", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "958cdff8-98b1-4e14-93c5-512ae20a253e", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "696647d0-b1f2-4746-a238-7ac1f1d41514", - "name": "Delete Transfer Receipient", - "url": "https://api.paystack.co/transferrecipient/{recipient_code_or_id}", - "description": null, - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "DELETE", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "058c5fce-45d9-49b3-b243-2bd3489f42e9", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "6a02589a-001b-4c16-bd7f-d1ad880ef207", - "name": "Resolve BVN", - "url": "https://api.paystack.co/bank/resolve_bvn/{BVN}", - "description": "**Path Params**\n- **bvn** (_required_) - 11 digit BVN", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "65cf7432-1b38-403b-9d51-4d77aed89f7c", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "77203a76-a23a-45a4-ac6f-61f6f6d46f35", - "name": "Fetch Refund", - "url": "https://api.paystack.co/refund/:id", - "description": "**Path Params**\n- **id** - ID of the transaction to be refunded", - "data": null, - "dataOptions": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [ - { - "key": "id", - "value": "" - } - ], - "queryParams": [], - "auth": null, - "events": null, - "folder": "588455d8-920a-4aec-a63c-b29486d03e4f", - "responses": [ - { - "id": "c097db1e-f81a-4651-a7af-a1944ddfe434", - "name": "Fetch Refund", - "status": "Unauthorized", - "mime": "", - "language": "json", - "text": "\n{\n \"status\": true,\n \"message\": \"Refund retrieved\",\n \"data\": {\n \"integration\": 100982,\n \"transaction\": 1641,\n \"dispute\": null,\n \"settlement\": null,\n \"domain\": \"live\",\n \"amount\": 500000,\n \"deducted_amount\": 500000,\n \"fully_deducted\": true,\n \"currency\": \"NGN\",\n \"channel\": \"migs\",\n \"status\": \"processed\",\n \"refunded_by\": \"eseyinwale@gmail.com\",\n \"refunded_at\": \"2018-01-12T10:54:47.000Z\",\n \"expected_at\": \"2017-10-01T21:10:59.000Z\",\n \"customer_note\": \"xxx\",\n \"merchant_note\": \"xxx\",\n \"id\": 1,\n \"createdAt\": \"2017-09-24T21:10:59.000Z\",\n \"updatedAt\": \"2018-01-18T11:59:56.000Z\"\n }\n}", - "responseCode": { - "code": 401, - "name": "Unauthorized", - "detail": "" - }, - "requestObject": { - "id": "963c2fb9-5ccd-4abf-85d3-9c6495af161d", - "method": "GET", - "headers": "Authorization: Bearer SECRET_KEY", - "dataMode": null, - "data": null, - "rawModeData": "", - "pathVariables": { - "id": "" - }, - "url": "https://api.paystack.co/refund/:id", - "pathVariableData": [ - { - "key": "id", - "value": "" - } - ], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY", - "enabled": true - } - ] - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3ebe98edefd50a84-LHR", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Length", - "value": "49", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Mon, 12 Feb 2018 09:42:21 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"31-TcCODO2pQ5hz9TTU0Rc5Eg\"", - "name": "ETag", - "description": "" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3A9hOGFH6HMzoKQ7SDjRZ2DDLIqdtnTyWJ.gz9UiPJ0Y%2BOxSf7xuav9YvSLw951S%2BBg%2BoB7pFBBi%2FI; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3A9hOGFH6HMzoKQ7SDjRZ2DDLIqdtnTyWJ.gz9UiPJ0Y%2BOxSf7xuav9YvSLw951S%2BBg%2BoB7pFBBi%2FI", - "name": "sails.sid" - } - ], - "request": "77203a76-a23a-45a4-ac6f-61f6f6d46f35", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": { - "id": "" - } - }, - { - "id": "773461c5-9baa-4c38-92f1-68f9e55f4bd0", - "name": "Invoice Total", - "url": "https://api.paystack.co/paymentrequest/totals", - "description": null, - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "7aa585e2-2e5c-4915-a9a5-01cb22cd2070", - "name": "Charge Authorization", - "url": "https://api.paystack.co/transaction/charge_authorization", - "description": "**Body Params**\n- **reference** - Unique transaction reference. Only `-` `,` `.` `,` `=` and alphanumeric characters allowed. System will generate one if none is provided\n- **authorization_code** - (_required_) Valid authorization code to charge\n- **amount** - (_required_) Amount in kobo\n- **plan** - If transaction is to create a subscription to a predefined plan, provide plan code here\n- **currency** - Currency in which amount should be charged\n- ** email** (_required_) - Customer's email address\n- **metadata** - Add a `custom_fields` attribute which has an array of objects if you would like the fields to be added to your transaction when displayed on the dashboard.\n- **subaccount** - The code for the subaccount that owns the payment.\n- **transaction_charge** - A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split).\n- **bearer** - Who bears Paystack charges? `account` or `subaccount`?\n- **invoice_limit** - Number of invoices to raise during the subscription. Overrides `invoice_limit` set on plan.", - "data": [ - { - "key": "authorization_code", - "value": "AUTH_CODE", - "type": "text" - }, - { - "key": "email", - "value": "customer@email.com", - "type": "text" - }, - { - "key": "amount", - "value": "500000", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "e446091c-eefd-4073-a582-4299e3c577de", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "7f24265a-4e43-4839-8b59-b3b6758532ae", - "name": "Update Invoice", - "url": "https://api.paystack.co/paymentrequest/ID_OR_CODE", - "description": "**Body Params**\n- **description**\n- **amount**\n- **line_item**\n- **tax**\n- **due_date**\n- **metadata**\n- **send_notification**\n- **currency** - only works in draft mode\n- **customer** - only works in draft mode", - "data": [ - { - "key": "amount", - "value": "100000", - "type": "text" - } - ], - "dataMode": "params", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "PUT", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "809a38f9-979d-4db7-b997-30709de84dad", - "name": "Disable OTP requirement for Transfers", - "url": "https://api.paystack.co/transfer/disable_otp", - "description": "In the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. You will get an OTP.\n\nIn the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. An OTP is sent to you on your business phone.", - "data": [], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "82798ee0-0592-41fe-b2e8-e267a7e5b39b", - "name": "Submit PIN", - "url": "https://api.paystack.co/charge/submit_pin", - "description": "**Body Params**\n- **pin** (_required_) - PIN submitted by user\n- **reference** (_required_) - reference for transaction that requested pin", - "data": [ - { - "key": "pin", - "value": "", - "type": "text" - }, - { - "key": "reference", - "value": "", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "56062893-9ab5-40f0-a017-17072c219217", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "847209c5-9d03-4364-9f44-c8fa666371c8", - "name": "Enable OTP requirement for Transfers", - "url": "https://api.paystack.co/transfer/enable_otp", - "description": "In the event that a customer wants to stop being able to complete transfers programmatically, this endpoint helps turn OTP requirement back on. No arguments required.", - "data": [], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "8c25557c-11ce-45e7-9970-3b2eb9666a6b", - "name": "Create Plan", - "url": "https://api.paystack.co/plan", - "description": "**Body Params**\n- **name** (_required_) - Name of plan\n- **description** - Short description of plan\n- **amount** (_required_) - Amount to be charged in kobo\n- **interval** (_required_) - Interval in words. Valid intervals are `hourly`, `daily`, `weekly`, `monthly`, `annually`.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers\n- **currency** - Currency in which amount is set\n- **invoice_limit** - Number of invoices to raise during subscription to this plan. Can be overridden by specifying an `invoice_limit` while subscribing.", - "data": [ - { - "key": "name", - "value": "Monthly retainer", - "type": "text" - }, - { - "key": "interval", - "value": "monthly", - "type": "text" - }, - { - "key": "amount", - "value": "500000", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "2bfdf110-b72e-4cc1-a7ba-73fa32369750", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "8c42b41f-1b9a-43f3-80bf-7094c6cbb1e6", - "name": "List Disputes", - "url": "https://api.paystack.co/refund?from&to&page&perPage&transaction&status", - "description": "This lists all the disputes logged against your transactions\n\n**Query Params**\n- **transaction** _(required)_: Identifier for transaction to be refunded\n- **amount** _(optional)_: How much in kobo to be refunded to the customer. Amount is optional(defaults to original transaction amount) and cannot be more than the original transaction amount.\n- **currency**: Three-letter ISO currency\n- **customer_note** _(optional)_: customer reason\n- **merchant_note** _(optional)_: merchant reason", - "data": [ - { - "key": "transaction", - "value": "12794872", - "type": "text" - }, - { - "key": "amount", - "value": "50000", - "type": "text" - }, - { - "key": "currency", - "value": "NGN", - "type": "text" - }, - { - "key": "merchant_note", - "value": "yada yada", - "type": "text" - }, - { - "key": "customer_note", - "value": "blah blah", - "type": "text" - } - ], - "dataOptions": null, - "dataMode": "params", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [ - { - "key": "from", - "value": "", - "equals": false, - "description": "Start date", - "enabled": true - }, - { - "key": "to", - "value": "", - "equals": false, - "description": "End date", - "enabled": true - }, - { - "key": "page", - "value": "", - "equals": false, - "description": "Page Number", - "enabled": true - }, - { - "key": "perPage", - "value": "", - "equals": false, - "description": "Number of records to show per page", - "enabled": true - }, - { - "key": "transaction", - "value": "", - "equals": false, - "description": "Transaction Id", - "enabled": true - }, - { - "key": "status", - "value": "", - "equals": false, - "description": "Dispute Status. Acceptable values: { awaiting-merchant-feedback | awaiting-bank-feedback | pending | resolved }", - "enabled": true - } - ], - "auth": null, - "events": null, - "folder": "588455d8-920a-4aec-a63c-b29486d03e4f", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "responses": [ - { - "id": "7d4dee7f-c9d7-456b-8777-6dc7c5cbccf3", - "name": "Create Refund", - "status": "Created", - "mime": "", - "language": "json", - "text": "{\n \"status\": true,\n \"message\": \"Refund created successfully\",\n \"data\": {\n \"dispute\": 5238,\n \"transaction\": {\n \"reference\": \"1517474242_6122RNV2MR\",\n \"domain\": \"test\",\n \"status\": \"reversed\",\n \"message\": null,\n \"original_amount\": 50750,\n \"amount\": 50750,\n \"authorized_amount\": null,\n \"captured_amount\": null,\n \"gateway\": \"\",\n \"otp_identifier\": null,\n \"quantity\": 1,\n \"channel\": \"card\",\n \"gateway_response\": \"Successful\",\n \"receipt_number\": null,\n \"merchant_transaction_reference\": null,\n \"authorization_code\": \"AUTH_jryeoytyxx\",\n \"authorization_url\": null,\n \"authorization_url_valid\": null,\n \"authorization_url_accessed_at\": null,\n \"authorization_url_access_count\": null,\n \"currency\": \"NGN\",\n \"logged_for_settlement\": \"ignored\",\n \"settled\": true,\n \"metadata\": {\n \"custom_fields\": [\n {\n \"display_name\": \"Full Name\",\n \"variable_name\": \"Full_Name\",\n \"type\": \"text\",\n \"value\": \"Stephen Amaza\"\n },\n {\n \"display_name\": \"Quantity\",\n \"variable_name\": \"Quantity\",\n \"type\": \"text\",\n \"value\": 1\n },\n {\n \"display_name\": \"Phone Number\",\n \"variable_name\": \"Phone_Number\",\n \"type\": \"text\",\n \"value\": 9085662909\n },\n {\n \"display_name\": \"Address\",\n \"variable_name\": \"Address\",\n \"type\": \"text\",\n \"value\": \"3 Ladoke Akintola Rd, GRA\"\n },\n {\n \"display_name\": \"Datepicker Title\",\n \"variable_name\": \"Datepicker_Title\",\n \"type\": \"text\",\n \"value\": \"02/23/2018\"\n },\n {\n \"display_name\": \"Unit Price\",\n \"variable_name\": \"Unit_Price\",\n \"type\": \"text\",\n \"value\": \"NGN500\"\n }\n ],\n \"referrer\": \"http://localhost:8888/page/\"\n },\n \"additional_parameters\": null,\n \"response\": null,\n \"transaction_number\": null,\n \"payment_page\": \"0\",\n \"bin\": \"408408\",\n \"country_code\": null,\n \"ip_address\": \"41.184.178.86\",\n \"ip_address_geo\": null,\n \"paidAt\": \"2018-02-01T08:38:08.000Z\",\n \"fees\": 761,\n \"deviceid\": \"648cbc1f3cd6f5cfc8e0fc621d33c06e\",\n \"callback_url\": null,\n \"label\": \"0\",\n \"dss_verdict\": null,\n \"log\": {\n \"time_spent\": 48,\n \"attempts\": 1,\n \"authentication\": null,\n \"errors\": 0,\n \"success\": true,\n \"mobile\": false,\n \"input\": [],\n \"channel\": null,\n \"history\": [\n {\n \"type\": \"input\",\n \"message\": \"Filled these fields: card number, card expiry, card cvv\",\n \"time\": 45\n },\n {\n \"type\": \"action\",\n \"message\": \"Attempted to pay\",\n \"time\": 45\n },\n {\n \"type\": \"success\",\n \"message\": \"Successfully paid\",\n \"time\": 47\n },\n {\n \"type\": \"close\",\n \"message\": \"Page closed\",\n \"time\": 48\n }\n ]\n },\n \"subaccount_code\": null,\n \"fees_split\": null,\n \"errorcategory\": null,\n \"errorcode\": null,\n \"id\": 12794872,\n \"integration\": 119333,\n \"customer\": 834733,\n \"coupon\": 0,\n \"plan\": 0,\n \"subscription\": null,\n \"invoice\": null,\n \"payment_request\": 0,\n \"authorization\": 3878861,\n \"settlement\": null,\n \"subaccount\": null,\n \"createdAt\": \"2018-02-01T08:37:24.000Z\",\n \"updatedAt\": \"2018-02-13T13:57:56.000Z\"\n },\n \"currency\": \"NGN\",\n \"amount\": 50000,\n \"channel\": \"\",\n \"customer_note\": \"blah blah\",\n \"merchant_note\": \"yada yada\",\n \"integration\": 119333,\n \"domain\": \"test\",\n \"status\": \"pending\",\n \"refunded_by\": \"steve@paystack.com\",\n \"refunded_at\": \"2018-02-13T13:57:56.549Z\",\n \"expected_at\": \"2018-02-20T13:57:56.000Z\",\n \"fully_deducted\": false,\n \"id\": 763,\n \"createdAt\": \"2018-02-13T13:57:56.551Z\",\n \"updatedAt\": \"2018-02-13T13:57:56.551Z\"\n }\n}", - "responseCode": { - "code": 201, - "name": "Created", - "detail": "" - }, - "requestObject": { - "id": "01464721-62f6-4dad-98c0-f2f2b48cbe6c", - "method": "POST", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json", - "dataMode": "params", - "data": [ - { - "key": "transaction", - "value": "12794872", - "type": "text" - }, - { - "key": "amount", - "value": "50000", - "type": "text" - }, - { - "key": "currency", - "value": "NGN", - "type": "text" - }, - { - "key": "merchant_note", - "value": "yada yada", - "type": "text" - }, - { - "key": "customer_note", - "value": "blah blah", - "type": "text" - } - ], - "rawModeData": "", - "url": "https://api.paystack.co/refund", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ] - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3ec84cb3ced506f4-LHR", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Length", - "value": "4189", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Tue, 13 Feb 2018 13:57:56 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"105d-5iUBG4flE1Tc2HYDTeyHIw\"", - "name": "ETag", - "description": "" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "Vary", - "value": "X-HTTP-Method-Override", - "name": "Vary", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3AvpsEWq6L5AUz3A8uLCZNFSPK7kEtBNbN.BxOcb504gxj4FQ09n9CmxWYSoEPViK5AUXt68C8zkZ8; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3AvpsEWq6L5AUz3A8uLCZNFSPK7kEtBNbN.BxOcb504gxj4FQ09n9CmxWYSoEPViK5AUXt68C8zkZ8", - "name": "sails.sid" - } - ], - "request": "8c42b41f-1b9a-43f3-80bf-7094c6cbb1e6", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "8d605bc9-6eb8-4ee2-9180-ad3683f00ff7", - "name": "List Plans", - "url": "https://api.paystack.co/plan", - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **interval** - Filter list by plans with specified interval\n- **amount** - Filter list by plans with specified amount (in kobo)", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "2bfdf110-b72e-4cc1-a7ba-73fa32369750", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "99dc16de-6c99-4ea7-8254-fa57f73bfbe2", - "name": "Submit Birthday", - "url": "https://api.paystack.co/charge/submit_birthday", - "description": "Submit Birthday when requested\n\n**Body Params**\n- **birthday** (_required_) - Birthday number submitted by user\n- **reference** (_required_) - reference for ongoing transaction", - "data": [], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "56062893-9ab5-40f0-a017-17072c219217", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "9aa0cd8c-a4aa-4400-b9f9-3423dd4e759a", - "name": "Fetch Plan", - "url": "https://api.paystack.co/plan/id_or_plan_code", - "description": null, - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "2bfdf110-b72e-4cc1-a7ba-73fa32369750", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "9b543458-0505-4a68-acdb-68d55c9b1943", - "name": "Fetch Refund", - "url": "https://api.paystack.co/refund/:id", - "description": "**Path Params**\n- **id** - ID of the transaction to be refunded", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [ - { - "key": "id", - "value": "" - } - ], - "queryParams": [], - "auth": null, - "events": null, - "folder": "08b275ca-4233-4ac3-92a2-5224a4f63146", - "responses": [ - { - "id": "8c33f6fb-089d-4df4-8abf-3e73e4ff2a71", - "name": "Fetch Refund", - "status": "Unauthorized", - "mime": "", - "language": "json", - "text": "\n{\n \"status\": true,\n \"message\": \"Refund retrieved\",\n \"data\": {\n \"integration\": 100982,\n \"transaction\": 1641,\n \"dispute\": null,\n \"settlement\": null,\n \"domain\": \"live\",\n \"amount\": 500000,\n \"deducted_amount\": 500000,\n \"fully_deducted\": true,\n \"currency\": \"NGN\",\n \"channel\": \"migs\",\n \"status\": \"processed\",\n \"refunded_by\": \"eseyinwale@gmail.com\",\n \"refunded_at\": \"2018-01-12T10:54:47.000Z\",\n \"expected_at\": \"2017-10-01T21:10:59.000Z\",\n \"customer_note\": \"xxx\",\n \"merchant_note\": \"xxx\",\n \"id\": 1,\n \"createdAt\": \"2017-09-24T21:10:59.000Z\",\n \"updatedAt\": \"2018-01-18T11:59:56.000Z\"\n }\n}", - "responseCode": { - "code": 401, - "name": "Unauthorized", - "detail": "" - }, - "requestObject": { - "id": "963c2fb9-5ccd-4abf-85d3-9c6495af161d", - "method": "GET", - "headers": "Authorization: Bearer SECRET_KEY", - "dataMode": null, - "data": null, - "rawModeData": "", - "pathVariables": { - "id": "" - }, - "url": "https://api.paystack.co/refund/:id", - "pathVariableData": [ - { - "key": "id", - "value": "" - } - ], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY", - "enabled": true - } - ] - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3ebe98edefd50a84-LHR", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Length", - "value": "49", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Mon, 12 Feb 2018 09:42:21 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"31-TcCODO2pQ5hz9TTU0Rc5Eg\"", - "name": "ETag", - "description": "" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3A9hOGFH6HMzoKQ7SDjRZ2DDLIqdtnTyWJ.gz9UiPJ0Y%2BOxSf7xuav9YvSLw951S%2BBg%2BoB7pFBBi%2FI; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3A9hOGFH6HMzoKQ7SDjRZ2DDLIqdtnTyWJ.gz9UiPJ0Y%2BOxSf7xuav9YvSLw951S%2BBg%2BoB7pFBBi%2FI", - "name": "sails.sid" - } - ], - "request": "9b543458-0505-4a68-acdb-68d55c9b1943", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": { - "id": "" - } - }, - { - "id": "9bdce8ac-0d49-46bc-a4cb-c1116a1dcf2c", - "name": "List Customers", - "url": "https://api.paystack.co/customer", - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "4abcb36b-0005-4397-8452-1ad6f66e8ec3", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "9f56c0a9-ef8e-4fcc-9886-48b75966cf9f", - "name": "Initiate Bulk Transfer", - "url": "https://api.paystack.co/transfer/bulk", - "description": "You need to disable the Transfers OTP requirement to use this endpoint.\n\n**Body Params**\n- **(no name)**\n\nStatus of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’.", - "data": [], - "dataMode": "raw", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "4c6d8917-6047-41ca-9df7-153ba844f275", - "rawModeData": "{\n\t\"currency\": \"NGN\",\n\t\"source\": \"balance\",\n\t\"transfers\": [\n\t\t{\n\t\t\"amount\": 50000,\n\t\t\"recipient\": \"RCP_db342dvqvz9qcrn\"\n\t\t},\n\t\t{\n\t\t\"amount\": 50000,\n\t\t\"recipient\": \"RCP_db342dvqvz9qcrn\"\n\t\t}\n\t]\n}", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "a6755315-7c75-4c11-8709-1447ad19c2d2", - "name": "Tokenize payment instrument before a charge", - "url": "https://api.paystack.co/charge/tokenize", - "description": "Send an array of objects with authorization codes and amount in kobo so we can process transactions as a batch.\n\n**Body Params**\n- **email** (_required_) - Customer's email address\n- **card** (_required_) - Card to tokenize\n- **card.number** (_required_) - Card to tokenize\n- **card.cvv** (_required_) - Card security code\n- **card.expiry_month** (_required_) - Expiry month of card\n- **card.expiry_year** (_required_) - Expiry year of card\n", - "data": [], - "dataMode": "raw", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "56062893-9ab5-40f0-a017-17072c219217", - "responses": [ - { - "id": "fbe0559b-b1b4-4d1d-a35a-3a270db51e87", - "name": "Success", - "status": "OK", - "mime": "", - "language": "json", - "text": "{\n \"status\": true,\n \"message\": \"Tokenization attempted\",\n \"data\": {\n \"authorization_code\": \"AUTH_2pnazdd1ij\",\n \"bin\": \"408408\",\n \"last4\": \"4081\",\n \"exp_month\": \"11\",\n \"exp_year\": \"2018\",\n \"channel\": \"card\",\n \"card_type\": \"visa DEBIT\",\n \"bank\": \"Test Bank\",\n \"country_code\": \"NG\",\n \"brand\": \"visa\",\n \"reusable\": true,\n \"signature\": \"SIG_blOoJX5KN0BjJOQT7Vwp\",\n \"customer\": {\n \"id\": 1541151,\n \"first_name\": null,\n \"last_name\": null,\n \"email\": \"sdhiman@kumenu.com\",\n \"customer_code\": \"CUS_87hd55av8vp8c1r\",\n \"phone\": null,\n \"metadata\": null,\n \"risk_action\": \"default\"\n }\n }\n}", - "responseCode": { - "code": 200, - "name": "OK", - "detail": "" - }, - "requestObject": { - "id": "21e42a01-3fd4-42f6-be39-e7b85558b572", - "method": "POST", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json", - "dataMode": "raw", - "data": [], - "url": "https://api.paystack.co/charge/tokenize", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "rawModeData": "{\n \"card\": {\n \"cvv\": \"408\",\n \"expiry_month\": 11,\n \"expiry_year\": 18,\n \"number\": \"4084084084084081\",\n \"type\": \"Visa\"\n },\n \"email\": \"sdhiman@kumenu.com\"\n}" - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3e9ef8386acd69d7-LHR", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Encoding", - "value": "gzip", - "name": "Content-Encoding", - "description": "" - }, - { - "key": "Content-Length", - "value": "371", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Thu, 08 Feb 2018 13:35:00 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"292-btfaNY0/ISQBtIbrUmgVsA\"", - "name": "ETag", - "description": "" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "Vary", - "value": "X-HTTP-Method-Override", - "name": "Vary", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3AdlNwFsasJLu_CoCCkWq3zgina43MhsMS.n%2F9pwEC2XYANjFfF7rctQdvlt71aAwxp%2BNTzu3PgKnI; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3AdlNwFsasJLu_CoCCkWq3zgina43MhsMS.n%2F9pwEC2XYANjFfF7rctQdvlt71aAwxp%2BNTzu3PgKnI", - "name": "sails.sid" - } - ], - "request": "a6755315-7c75-4c11-8709-1447ad19c2d2", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "rawModeData": "{\n \"card\": {\n \"cvv\": \"408\",\n \"expiry_month\": 11,\n \"expiry_year\": 18,\n \"number\": \"4084084084084081\",\n \"type\": \"Visa\"\n },\n \"email\": \"customer@email.com\"\n}", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "a7300540-a900-485e-8c90-7f20cf937bba", - "name": "Export Transactions", - "url": "https://api.paystack.co/transaction/export", - "description": "**Query Params**\n- **from** - Lower bound of date range. Leave undefined to export transactions from day one.\n- **to** - Upper bound of date range. Leave undefined to export transactions till date.\n- **settled** - Set to `true` to export only settled transactions. `false` for pending transactions. Leave undefined to export all transactions\n- **payment_page** - Specify a payment page's id to export only transactions conducted on said page\n- **customer** - Specify customer id.\n- **currency** - Currency in which you are charging the customer in.\n- **settlement** - An ID for the settlement whose transactions we should export\n- **amount** - Amount for transactions to export\n- **status** - Status for transactions to export", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "e446091c-eefd-4073-a582-4299e3c577de", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "a76c83a3-dde8-44b9-8f37-0d796b3c449b", - "name": "List Refunds", - "url": "https://api.paystack.co/refund", - "description": "**Query Parameters**\n\n- **transaction**\n- **currency**", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "08b275ca-4233-4ac3-92a2-5224a4f63146", - "responses": [ - { - "id": "3a80351f-4668-4bc9-a9f6-47dfb8de3702", - "name": "List Refunds", - "status": "Unauthorized", - "mime": "", - "language": "json", - "text": "\n{\n \"status\": true,\n \"message\": \"Refunds retrieved\",\n \"data\": [\n {\n \"id\": 1,\n \"integration\": 100982,\n \"domain\": \"live\",\n \"transaction\": 1641,\n \"dispute\": 20,\n \"amount\": 500000,\n \"deducted_amount\": 500000,\n \"currency\": \"NGN\",\n \"channel\": \"migs\",\n \"fully_deducted\": 1,\n \"refunded_by\": \"customer@gmail.com\",\n \"refunded_at\": \"2018-01-12T10:54:47.000Z\",\n \"expected_at\": \"2017-10-01T21:10:59.000Z\",\n \"settlement\": null,\n \"customer_note\": \"xxx\",\n \"merchant_note\": \"xxx\",\n \"created_at\": \"2017-09-24T21:10:59.000Z\",\n \"updated_at\": \"2018-01-18T11:59:56.000Z\",\n \"status\": \"processed\"\n },\n {\n \"id\": 2,\n \"integration\": 100982,\n \"domain\": \"test\",\n \"transaction\": 323896,\n \"dispute\": 45,\n \"amount\": 500000,\n \"deducted_amount\": null,\n \"currency\": \"NGN\",\n \"channel\": \"migs\",\n \"fully_deducted\": null,\n \"refunded_by\": \"customer@gmail.com\",\n \"refunded_at\": \"2017-09-24T21:11:53.000Z\",\n \"expected_at\": \"2017-10-01T21:11:53.000Z\",\n \"settlement\": null,\n \"customer_note\": \"xxx\",\n \"merchant_note\": \"xxx\",\n \"created_at\": \"2017-09-24T21:11:53.000Z\",\n \"updated_at\": \"2017-09-24T21:11:53.000Z\",\n \"status\": \"pending\"\n }\n ]\n}", - "responseCode": { - "code": 401, - "name": "Unauthorized", - "detail": "" - }, - "requestObject": { - "id": "0ac5c3bc-7f31-4603-ab19-7ecb1617ddb1", - "method": "GET", - "headers": "Authorization: Bearer SECRET KEY", - "dataMode": null, - "data": null, - "rawModeData": "", - "url": "https://api.paystack.co/refund", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET KEY" - } - ] - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3ebe8d2f6d760a90-LHR", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Length", - "value": "82", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Mon, 12 Feb 2018 09:34:20 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"52-hNi7udIfPKyFcTWyPMlgkw\"", - "name": "ETag", - "description": "" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3A9Ws_2f_T7wJ-hiQHjkSOfnBEuZjWp-Yq.ubKRlmVDHufn8fem8Ej2YOKlZjq75CgSJh%2Fx5Dg366Q; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3A9Ws_2f_T7wJ-hiQHjkSOfnBEuZjWp-Yq.ubKRlmVDHufn8fem8Ej2YOKlZjq75CgSJh%2Fx5Dg366Q", - "name": "sails.sid" - } - ], - "request": "a76c83a3-dde8-44b9-8f37-0d796b3c449b", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "headers": "Authorization: Bearer SECRET KEY\n", - "pathVariables": {} - }, - { - "id": "aa38750f-21b0-4cba-8864-24812685435d", - "name": "Create Customer", - "url": "https://api.paystack.co/customer", - "description": "**Body Params**\n- **email** (_required_) - Customer's email address\n- **first_name** - Customer's first name\n- **last_name** - Customer's last name\n- **phone** - Customer's phone number\n- **metadata** - A set of key/value pairs that you can attach to the customer. It can be used to store additional information in a structured format.", - "data": [ - { - "key": "email", - "value": "customer@email.com", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "4abcb36b-0005-4397-8452-1ad6f66e8ec3", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "ad2d4a15-d9a5-4e10-ab8a-a77482e8ef2e", - "name": "Fetch Payment Session Timeout", - "url": "https://api.paystack.co/integration/payment_session_timeout", - "description": null, - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "9b923444-b195-452e-b534-8dbb98905930", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "b1ce4f06-38b5-4b81-a7c5-8858c05a5274", - "name": "Check Balance", - "url": "https://api.paystack.co/balance", - "description": "You can only transfer from what you have", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "b2833b4e-91e8-4f4c-8a0f-6fb97c130a1e", - "name": "Fetch Customer", - "url": "https://api.paystack.co/customer/:id_or_customer_code", - "description": "**Query Params**\n- **exclude_transactions** - By default, fetching a customer returns all their transactions. Set this to true to disable this behaviour.", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [ - { - "key": "id_or_customer_code", - "value": "" - } - ], - "queryParams": [], - "auth": null, - "events": null, - "folder": "4abcb36b-0005-4397-8452-1ad6f66e8ec3", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": { - "id_or_customer_code": "" - } - }, - { - "id": "b2aca7dd-5390-4348-b690-f2d81673a39c", - "name": "List Subaccounts", - "url": "https://api.paystack.co/subaccount", - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "886b67bc-06de-485b-8b9f-0297310ee7db", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "b2c99087-3afa-4310-99d8-549ec6ee1440", - "name": "White/blacklist Customer", - "url": "https://api.paystack.co/customer/set_risk_action", - "description": "**Body Params**\n- **customer** - Customer's ID, code, or email address\n- **risk_action** - One of the possible risk actions. `allow` to whitelist. `deny` to blacklist.", - "data": [ - { - "key": "customer", - "value": "CUS_xr58yrr2ujlft9k" - }, - { - "key": "risk_action", - "value": "allow" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "4abcb36b-0005-4397-8452-1ad6f66e8ec3", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "b35664d5-a14f-4d8a-b959-3ea6ee821aba", - "name": "Fetch Settlements", - "url": "https://api.paystack.co/settlement", - "description": "Settlements made to your bank accounts and the bank accounts for your subaccounts\n\n**Query Params**\n- **from** - Lower bound of date range. Leave undefined to export settlement from day one.\n- **to** - Upper bound of date range. Leave undefined to export settlements till date.\n- **subaccount** - Provide a subaccount code to export only settlements for that subaccount. Set to `none` to export only transactions for the account.", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "b34521bd-87df-49f6-b11a-7b8da3a2ffc3", - "responses": [ - { - "id": "608d9765-7318-4bbc-9800-5c6c834df893", - "name": "Fetch Settlements JSON Sample", - "status": "OK", - "mime": "", - "language": "json", - "text": "{\n \"status\": true,\n \"message\": \"Settlements retrieved\",\n \"data\": [\n {\n \"integration\": 102711,\n \"settled_by\": null,\n \"settlement_date\": \"2017-10-13T00:00:00.000Z\",\n \"domain\": \"live\",\n \"total_amount\": 393850,\n \"status\": \"success\",\n \"total_fees\": 16150,\n \"total_fees_paystack\": 12050,\n \"total_fees_gateway\": 4100,\n \"total_processed\": 410000,\n \"currency\": \"NGN\",\n \"id\": 56419,\n \"createdAt\": \"2017-10-13T01:04:23.000Z\",\n \"updatedAt\": \"2017-10-13T01:04:23.000Z\"\n },\n {\n \"integration\": 102711,\n \"settled_by\": null,\n \"settlement_date\": \"2017-08-03T00:00:00.000Z\",\n \"domain\": \"live\",\n \"total_amount\": 9850,\n \"status\": \"success\",\n \"total_fees\": 150,\n \"total_fees_paystack\": 50,\n \"total_fees_gateway\": 100,\n \"total_processed\": 10000,\n \"currency\": \"NGN\",\n \"id\": 40570,\n \"createdAt\": \"2017-08-03T01:03:34.000Z\",\n \"updatedAt\": \"2017-08-03T01:03:34.000Z\"\n },\n {\n \"integration\": 102711,\n \"settled_by\": null,\n \"settlement_date\": \"2017-04-01T00:00:00.000Z\",\n \"domain\": \"live\",\n \"total_amount\": 19700,\n \"status\": \"success\",\n \"total_fees\": 300,\n \"total_fees_paystack\": 100,\n \"total_fees_gateway\": 200,\n \"total_processed\": 20000,\n \"currency\": \"NGN\",\n \"id\": 21929,\n \"createdAt\": \"2017-04-01T01:01:31.000Z\",\n \"updatedAt\": \"2017-04-04T10:59:48.000Z\"\n }\n ],\n \"meta\": {\n \"total\": 3,\n \"skipped\": 0,\n \"perPage\": 50,\n \"page\": 1,\n \"pageCount\": 1\n }\n}", - "responseCode": { - "code": 200, - "name": "OK", - "detail": "" - }, - "requestObject": { - "id": "e8e30d42-1e25-45c5-b309-a0f1ff8a5759", - "method": "GET", - "headers": "Authorization: Bearer SECRET_KEY", - "dataMode": null, - "data": null, - "rawModeData": "", - "url": "https://api.paystack.co/settlement", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ] - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3b5df77afaf11473-AMS", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Encoding", - "value": "gzip", - "name": "Content-Encoding", - "description": "" - }, - { - "key": "Content-Length", - "value": "440", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Mon, 30 Oct 2017 11:17:11 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"621-Az0eBtgn3Z/QBz+vSiP8Ew\"", - "name": "ETag", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare-nginx", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3A8OI1FSC0BVUdesKEQBjByqyGKe5h4QKm.pqQemCD%2B2D36QCYi5Pd%2Bw1U1S8TWrcHuFLIzJ1oqaOg; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3A8OI1FSC0BVUdesKEQBjByqyGKe5h4QKm.pqQemCD%2B2D36QCYi5Pd%2Bw1U1S8TWrcHuFLIzJ1oqaOg", - "name": "sails.sid" - } - ], - "request": "b35664d5-a14f-4d8a-b959-3ea6ee821aba", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "b54289de-5afd-454c-84ce-6dc23e331579", - "name": "Finalize Disabling of OTP requirement for Transfers", - "url": "https://api.paystack.co/transfer/disable_otp_finalize", - "description": "**Body Params**\n- **otp** (_required_) - OTP sent to business phone to verify disabling OTP requirement\n\n", - "data": [ - { - "key": "otp", - "value": "928783", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "b77b4e4e-f9f5-4435-b19c-2f3bcf4e68a6", - "name": "List Transfer Recipients", - "url": "https://api.paystack.co/transferrecipient", - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "058c5fce-45d9-49b3-b243-2bd3489f42e9", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "b93a1dc1-27ca-422c-8f4d-97bd62607c08", - "name": "Update Transfer Receipient", - "url": "https://api.paystack.co/transferrecipient/{recipient_code_or_id}", - "description": null, - "data": [ - { - "key": "name", - "value": "Zombie", - "type": "text" - }, - { - "key": "email", - "value": "customer@email.com", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "PUT", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "058c5fce-45d9-49b3-b243-2bd3489f42e9", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "bc53767a-f68a-44a7-ac3f-0ba03ece6c3f", - "name": "Resume Bulk Charge Batch", - "url": "https://api.paystack.co/bulkcharge/resume/batch_code", - "description": "Use this endpoint to pause processing a batch\n\n**Path Params**\n- **batch_code** (_required_)", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "1696a2d4-2391-4f80-a929-4e7041df44cc", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "be833eaf-47a2-408a-95c5-6ab7d00e0798", - "name": "Match BVN", - "url": "https://api.paystack.co/bank/match_bvn?account_number={ACCOUNT_NUMBER}&bank_code={BANK_CODE}&bvn={BVN}", - "description": "The Match BVN endpoint checks if the account number for a bank belongs to a user's BVN\n\n**Path Params**\n- *account_number* _(required)_ - Bank account number\n- *bank_code* _(required)_ - Bank code from [List Bank endpoint](https://api.paystack.co/bank)\n- *bvn* _(required)_ - 11 digit BVN", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [ - { - "key": "account_number", - "value": "{ACCOUNT_NUMBER}" - }, - { - "key": "bank_code", - "value": "{BANK_CODE}" - }, - { - "key": "bvn", - "value": "{BVN}" - } - ], - "auth": null, - "events": null, - "folder": "65cf7432-1b38-403b-9d51-4d77aed89f7c", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "beb2a320-ba1f-41d0-be71-49c783438d7c", - "name": "List Subscriptions", - "url": "https://api.paystack.co/subscription", - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **customer** - Filter by Customer ID\n- **plan** - Filter by Plan ID", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "958cdff8-98b1-4e14-93c5-512ae20a253e", - "responses": [ - { - "id": "11ac69e0-4356-478e-8dbd-a57f24396590", - "name": "List Subscriptions", - "status": "OK", - "mime": "", - "language": "json", - "text": "{\n \"status\": true,\n \"message\": \"Subscriptions retrieved\",\n \"data\": [\n {\n \"customer\": {\n \"first_name\": \"employee14\",\n \"last_name\": \"demo\",\n \"email\": \"employee14@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_7o5rpgyihn2ccui\",\n \"risk_action\": \"default\",\n \"id\": 1395761,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:04.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:04.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product G186WMRJ\",\n \"plan_code\": \"PLN_qajv0uplnjz2y05\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8235,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:44:21.000Z\",\n \"updatedAt\": \"2018-01-22T13:44:21.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3658609,\n \"domain\": \"test\",\n \"start\": 1516628816,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_2gc07u0dqk1yb1f\",\n \"email_token\": \"b2jd0eo7yacv98p\",\n \"easy_cron_id\": \"493980\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:46:50.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36190,\n \"createdAt\": \"2018-01-22T13:46:56.000Z\",\n \"updatedAt\": \"2018-01-22T13:46:58.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product G186WMRJ\",\n \"plan_code\": \"PLN_qajv0uplnjz2y05\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8235,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:44:21.000Z\",\n \"updatedAt\": \"2018-01-22T13:44:21.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516628814,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_75o3he3uuzd78wp\",\n \"email_token\": \"3wvpgdqtwxpixq2\",\n \"easy_cron_id\": \"493979\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:46:50.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36189,\n \"createdAt\": \"2018-01-22T13:46:54.000Z\",\n \"updatedAt\": \"2018-01-22T13:46:55.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product G186WMRJ\",\n \"plan_code\": \"PLN_qajv0uplnjz2y05\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8235,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:44:21.000Z\",\n \"updatedAt\": \"2018-01-22T13:44:21.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516628812,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_mb83ddoe9o1qfsq\",\n \"email_token\": \"t93p7dxbgicmyrb\",\n \"easy_cron_id\": \"493978\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:46:50.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36188,\n \"createdAt\": \"2018-01-22T13:46:52.000Z\",\n \"updatedAt\": \"2018-01-22T13:46:53.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product YBZ84RVZCOZ3\",\n \"plan_code\": \"PLN_pl42mdegb1pay14\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8232,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:28:01.000Z\",\n \"updatedAt\": \"2018-01-22T13:28:01.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516627795,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_bn9ab5zt3jxjwn3\",\n \"email_token\": \"vrc1x9i9dxha8s9\",\n \"easy_cron_id\": \"493969\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:29:50.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36183,\n \"createdAt\": \"2018-01-22T13:29:55.000Z\",\n \"updatedAt\": \"2018-01-22T13:29:55.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product YBZ84RVZCOZ3\",\n \"plan_code\": \"PLN_pl42mdegb1pay14\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8232,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:28:01.000Z\",\n \"updatedAt\": \"2018-01-22T13:28:01.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516627793,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_jry95yp22952v32\",\n \"email_token\": \"vcqc4wgdcefxcye\",\n \"easy_cron_id\": \"493968\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:29:50.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36182,\n \"createdAt\": \"2018-01-22T13:29:53.000Z\",\n \"updatedAt\": \"2018-01-22T13:29:53.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product YBZ84RVZCOZ3\",\n \"plan_code\": \"PLN_pl42mdegb1pay14\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8232,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:28:01.000Z\",\n \"updatedAt\": \"2018-01-22T13:28:01.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516627792,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_pz6388b8g98bhr4\",\n \"email_token\": \"1q8bnm7nfulshpv\",\n \"easy_cron_id\": \"493967\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:29:50.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36181,\n \"createdAt\": \"2018-01-22T13:29:52.000Z\",\n \"updatedAt\": \"2018-01-22T13:29:52.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product MY8M12AD6AMV\",\n \"plan_code\": \"PLN_0n5mh1zojhq0yw2\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8231,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:14:59.000Z\",\n \"updatedAt\": \"2018-01-22T13:14:59.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516627084,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_6a1ueijc69dn8ia\",\n \"email_token\": \"s1fjsq8aia1r4mp\",\n \"easy_cron_id\": \"493966\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:17:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36180,\n \"createdAt\": \"2018-01-22T13:18:04.000Z\",\n \"updatedAt\": \"2018-01-22T13:18:09.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee14\",\n \"last_name\": \"demo\",\n \"email\": \"employee14@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_7o5rpgyihn2ccui\",\n \"risk_action\": \"default\",\n \"id\": 1395761,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:04.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:04.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product MY8M12AD6AMV\",\n \"plan_code\": \"PLN_0n5mh1zojhq0yw2\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8231,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:14:59.000Z\",\n \"updatedAt\": \"2018-01-22T13:14:59.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3658609,\n \"domain\": \"test\",\n \"start\": 1516627082,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_0530l7rkso3hlk6\",\n \"email_token\": \"30ed3a6ekqowv6e\",\n \"easy_cron_id\": \"493965\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:17:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36179,\n \"createdAt\": \"2018-01-22T13:18:02.000Z\",\n \"updatedAt\": \"2018-01-22T13:18:02.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product MY8M12AD6AMV\",\n \"plan_code\": \"PLN_0n5mh1zojhq0yw2\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8231,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:14:59.000Z\",\n \"updatedAt\": \"2018-01-22T13:14:59.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516627080,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_sxach1ectrbsdfh\",\n \"email_token\": \"n0q52muafk5g2lz\",\n \"easy_cron_id\": \"493964\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:17:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36178,\n \"createdAt\": \"2018-01-22T13:18:00.000Z\",\n \"updatedAt\": \"2018-01-22T13:18:01.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product ZAQYYS0CU9J2\",\n \"plan_code\": \"PLN_hnhpbv7t6ifny7s\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8230,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:04:17.000Z\",\n \"updatedAt\": \"2018-01-22T13:04:17.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516626884,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_x7mnc2hfxgn9mvy\",\n \"email_token\": \"vmlymyc283ubnr2\",\n \"easy_cron_id\": \"493963\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:14:39.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36177,\n \"createdAt\": \"2018-01-22T13:14:44.000Z\",\n \"updatedAt\": \"2018-01-22T13:14:45.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product ZAQYYS0CU9J2\",\n \"plan_code\": \"PLN_hnhpbv7t6ifny7s\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8230,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:04:17.000Z\",\n \"updatedAt\": \"2018-01-22T13:04:17.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516626883,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_ftf7tfkcah7oyda\",\n \"email_token\": \"vdtc2b8hyahc226\",\n \"easy_cron_id\": \"493962\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:14:39.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36176,\n \"createdAt\": \"2018-01-22T13:14:43.000Z\",\n \"updatedAt\": \"2018-01-22T13:14:44.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee14\",\n \"last_name\": \"demo\",\n \"email\": \"employee14@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_7o5rpgyihn2ccui\",\n \"risk_action\": \"default\",\n \"id\": 1395761,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:04.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:04.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product ZAQYYS0CU9J2\",\n \"plan_code\": \"PLN_hnhpbv7t6ifny7s\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8230,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:04:17.000Z\",\n \"updatedAt\": \"2018-01-22T13:04:17.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3658609,\n \"domain\": \"test\",\n \"start\": 1516626881,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_h1cs0ntq45hf4cp\",\n \"email_token\": \"ps5t7usida5kygw\",\n \"easy_cron_id\": \"493961\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:14:39.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36175,\n \"createdAt\": \"2018-01-22T13:14:41.000Z\",\n \"updatedAt\": \"2018-01-22T13:14:42.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product DLPX8GQMHZXV\",\n \"plan_code\": \"PLN_ucpz4nthvhaon0z\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8229,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:02:31.000Z\",\n \"updatedAt\": \"2018-01-22T13:02:31.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516626186,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_53m01v14zhjivhu\",\n \"email_token\": \"zz2rtsancgqup7r\",\n \"easy_cron_id\": \"493959\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:02:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36173,\n \"createdAt\": \"2018-01-22T13:03:06.000Z\",\n \"updatedAt\": \"2018-01-22T13:03:06.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product DLPX8GQMHZXV\",\n \"plan_code\": \"PLN_ucpz4nthvhaon0z\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8229,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:02:31.000Z\",\n \"updatedAt\": \"2018-01-22T13:02:31.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516626183,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_5fs6ihqndix93m4\",\n \"email_token\": \"u3m15963gd0olha\",\n \"easy_cron_id\": \"493958\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:02:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36172,\n \"createdAt\": \"2018-01-22T13:03:03.000Z\",\n \"updatedAt\": \"2018-01-22T13:03:05.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product DLPX8GQMHZXV\",\n \"plan_code\": \"PLN_ucpz4nthvhaon0z\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8229,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:02:31.000Z\",\n \"updatedAt\": \"2018-01-22T13:02:31.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516626180,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_ejrv62w0xi84tcf\",\n \"email_token\": \"31amwtboj1i35z9\",\n \"easy_cron_id\": \"493957\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:02:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36171,\n \"createdAt\": \"2018-01-22T13:03:00.000Z\",\n \"updatedAt\": \"2018-01-22T13:03:01.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product KKHB47IW65UL\",\n \"plan_code\": \"PLN_mmt6z98r0vglxq8\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8226,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T12:28:02.000Z\",\n \"updatedAt\": \"2018-01-22T12:28:02.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516624143,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_lhi6bopt5xde19l\",\n \"email_token\": \"2qlin7ligxdndna\",\n \"easy_cron_id\": \"493949\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T12:28:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36166,\n \"createdAt\": \"2018-01-22T12:29:03.000Z\",\n \"updatedAt\": \"2018-01-22T12:29:04.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product KKHB47IW65UL\",\n \"plan_code\": \"PLN_mmt6z98r0vglxq8\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8226,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T12:28:02.000Z\",\n \"updatedAt\": \"2018-01-22T12:28:02.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516624141,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_vsu30z98riqxx2x\",\n \"email_token\": \"frtaegj04y756xm\",\n \"easy_cron_id\": \"493948\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T12:28:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36165,\n \"createdAt\": \"2018-01-22T12:29:01.000Z\",\n \"updatedAt\": \"2018-01-22T12:29:02.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product KKHB47IW65UL\",\n \"plan_code\": \"PLN_mmt6z98r0vglxq8\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8226,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T12:28:02.000Z\",\n \"updatedAt\": \"2018-01-22T12:28:02.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516624140,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_zp574lozv6llekc\",\n \"email_token\": \"fku9iyq6575t8vi\",\n \"easy_cron_id\": \"493947\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T12:28:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36164,\n \"createdAt\": \"2018-01-22T12:29:00.000Z\",\n \"updatedAt\": \"2018-01-22T12:29:00.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee14\",\n \"last_name\": \"demo\",\n \"email\": \"employee14@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_7o5rpgyihn2ccui\",\n \"risk_action\": \"default\",\n \"id\": 1395761,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:04.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:04.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product FAQ130X1GZKD\",\n \"plan_code\": \"PLN_v425e4j6eyt55me\",\n \"description\": null,\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8225,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T10:36:37.000Z\",\n \"updatedAt\": \"2018-01-22T10:36:37.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3658609,\n \"domain\": \"test\",\n \"start\": 1516618242,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_y517eofx0k3wuev\",\n \"email_token\": \"tru7qxp8m3f3hp0\",\n \"easy_cron_id\": \"493921\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T10:50:35.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36153,\n \"createdAt\": \"2018-01-22T10:50:42.000Z\",\n \"updatedAt\": \"2018-01-22T10:50:43.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product FAQ130X1GZKD\",\n \"plan_code\": \"PLN_v425e4j6eyt55me\",\n \"description\": null,\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8225,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T10:36:37.000Z\",\n \"updatedAt\": \"2018-01-22T10:36:37.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516618240,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_pmmw1bssp5wupjc\",\n \"email_token\": \"wnsl72jwcocmjgb\",\n \"easy_cron_id\": \"493920\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T10:50:35.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36152,\n \"createdAt\": \"2018-01-22T10:50:40.000Z\",\n \"updatedAt\": \"2018-01-22T10:50:41.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product FAQ130X1GZKD\",\n \"plan_code\": \"PLN_v425e4j6eyt55me\",\n \"description\": null,\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8225,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T10:36:37.000Z\",\n \"updatedAt\": \"2018-01-22T10:36:37.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516618239,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_g5nnr91a93881ki\",\n \"email_token\": \"hmx3etjyf3l67ws\",\n \"easy_cron_id\": \"493919\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T10:50:35.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36151,\n \"createdAt\": \"2018-01-22T10:50:39.000Z\",\n \"updatedAt\": \"2018-01-22T10:50:40.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product FAQ130X1GZKD\",\n \"plan_code\": \"PLN_v425e4j6eyt55me\",\n \"description\": null,\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8225,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T10:36:37.000Z\",\n \"updatedAt\": \"2018-01-22T10:36:37.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516618238,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_kcfhkosqhn13h8a\",\n \"email_token\": \"k6bvxdrlx4xqlg3\",\n \"easy_cron_id\": \"493918\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T10:50:35.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36150,\n \"createdAt\": \"2018-01-22T10:50:38.000Z\",\n \"updatedAt\": \"2018-01-22T10:50:38.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee14\",\n \"last_name\": \"demo\",\n \"email\": \"employee14@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_7o5rpgyihn2ccui\",\n \"risk_action\": \"default\",\n \"id\": 1395761,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:04.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:04.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product R1RR2R3R4R5\",\n \"plan_code\": \"PLN_mm752s00e60hhk7\",\n \"description\": \"\",\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8173,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-18T12:10:28.000Z\",\n \"updatedAt\": \"2018-01-18T12:10:28.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3658609,\n \"domain\": \"test\",\n \"start\": 1516429694,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_4rayx6mta5yqmym\",\n \"email_token\": \"bdd6synhcdkjb0y\",\n \"easy_cron_id\": \"493148\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:28:08.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36002,\n \"createdAt\": \"2018-01-20T06:28:14.000Z\",\n \"updatedAt\": \"2018-01-20T06:28:15.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product R1RR2R3R4R5\",\n \"plan_code\": \"PLN_mm752s00e60hhk7\",\n \"description\": \"\",\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8173,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-18T12:10:28.000Z\",\n \"updatedAt\": \"2018-01-18T12:10:28.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516429693,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_bkme8lju5xlvle4\",\n \"email_token\": \"pkxx935gcly9t2u\",\n \"easy_cron_id\": \"493147\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:28:08.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36001,\n \"createdAt\": \"2018-01-20T06:28:13.000Z\",\n \"updatedAt\": \"2018-01-20T06:28:14.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product R1RR2R3R4R5\",\n \"plan_code\": \"PLN_mm752s00e60hhk7\",\n \"description\": \"\",\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8173,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-18T12:10:28.000Z\",\n \"updatedAt\": \"2018-01-18T12:10:28.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516429692,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_5es1mw1kxm46gtd\",\n \"email_token\": \"sbfm13oydbkm52f\",\n \"easy_cron_id\": \"493145\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:28:08.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 35999,\n \"createdAt\": \"2018-01-20T06:28:12.000Z\",\n \"updatedAt\": \"2018-01-20T06:28:12.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product R1RR2R3R4R5\",\n \"plan_code\": \"PLN_mm752s00e60hhk7\",\n \"description\": \"\",\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8173,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-18T12:10:28.000Z\",\n \"updatedAt\": \"2018-01-18T12:10:28.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516429692,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_7xxt5qcrra1hfqu\",\n \"email_token\": \"tos1qk2qcm3m9xk\",\n \"easy_cron_id\": \"493146\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:28:08.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36000,\n \"createdAt\": \"2018-01-20T06:28:12.000Z\",\n \"updatedAt\": \"2018-01-20T06:28:13.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Private Thrift MYF8H2O63\",\n \"plan_code\": \"PLN_bxknjmadmsr87of\",\n \"description\": null,\n \"amount\": 1200000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8197,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-20T06:18:44.000Z\",\n \"updatedAt\": \"2018-01-20T06:18:44.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516429175,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 1200000,\n \"subscription_code\": \"SUB_82t90s0th5uypnr\",\n \"email_token\": \"tnvwf8cht0rk7jv\",\n \"easy_cron_id\": \"493144\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:18:42.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 35998,\n \"createdAt\": \"2018-01-20T06:19:35.000Z\",\n \"updatedAt\": \"2018-01-20T06:19:36.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Private Thrift MYF8H2O63\",\n \"plan_code\": \"PLN_bxknjmadmsr87of\",\n \"description\": null,\n \"amount\": 1200000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8197,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-20T06:18:44.000Z\",\n \"updatedAt\": \"2018-01-20T06:18:44.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516429174,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 1200000,\n \"subscription_code\": \"SUB_3yzhgywmdjba0dz\",\n \"email_token\": \"8olq6gbnnufqxre\",\n \"easy_cron_id\": \"493143\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:18:42.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 35997,\n \"createdAt\": \"2018-01-20T06:19:34.000Z\",\n \"updatedAt\": \"2018-01-20T06:19:35.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"ZAQ Prosper RS8GUZ\",\n \"plan_code\": \"PLN_n5u9lsl3ldtjpla\",\n \"description\": null,\n \"amount\": 44200000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8131,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-15T10:21:32.000Z\",\n \"updatedAt\": \"2018-01-15T10:21:32.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516428131,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 44200000,\n \"subscription_code\": \"SUB_tvpgx6ee7c0h5q2\",\n \"email_token\": \"rat7afimr2r2bop\",\n \"easy_cron_id\": \"493141\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:01:29.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 35996,\n \"createdAt\": \"2018-01-20T06:02:11.000Z\",\n \"updatedAt\": \"2018-01-20T06:02:12.000Z\"\n }\n ],\n \"meta\": {\n \"total\": 29,\n \"skipped\": 0,\n \"perPage\": 50,\n \"page\": 1,\n \"pageCount\": 1\n }\n}", - "responseCode": { - "code": 200, - "name": "OK", - "detail": "" - }, - "requestObject": { - "id": "759708f3-4460-44cd-bc00-4c5c059c1d10", - "method": "GET", - "headers": "Authorization: Bearer SECRET_KEY", - "dataMode": null, - "data": null, - "rawModeData": "", - "url": "https://api.paystack.co/subscription", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ] - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3e2308930b1969d1-LHR", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Encoding", - "value": "gzip", - "name": "Content-Encoding", - "description": "" - }, - { - "key": "Content-Length", - "value": "4020", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Wed, 24 Jan 2018 12:35:35 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"b996-CMrwL9gnwnEjtZ0VB4frGA\"", - "name": "ETag", - "description": "" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3AuJweoSRrLJYZ8feLjMaNcp0E2cRwd-WL.N1g6WqxlradKwfxdBBpezEDpDmls40XZkqx61d5uwvE; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3AuJweoSRrLJYZ8feLjMaNcp0E2cRwd-WL.N1g6WqxlradKwfxdBBpezEDpDmls40XZkqx61d5uwvE", - "name": "sails.sid" - } - ], - "request": "beb2a320-ba1f-41d0-be71-49c783438d7c", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "c168c418-43d0-4ceb-80e4-a4f6824754d9", - "name": "Check pending charge", - "url": "https://api.paystack.co/charge/reference", - "description": "When you get \"pending\" as a charge status, wait 30 seconds or more, then make a check to see if its status has changed. Don't call too early as you may get a lot more pending than you should.\n\n**Body Params**\n- **reference** (_required_) - The reference to check", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "56062893-9ab5-40f0-a017-17072c219217", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "c2796b87-1b90-4bb3-a0e0-f176854bda18", - "name": "Verify Invoice", - "url": "https://api.paystack.co/paymentrequest/verify/ID_OR_CODE", - "description": "**Path Params**\n- **ID** - The invoice code for the Payment Request to be verified\n\nNote that a key is added called `pending_amount` when you fetch an invoice. This is because when paying for an invoice, you can choose to pay part but not all. Whenever a successful transaction is made, the key updates to reveal what’s left of the invoice to pay.", - "data": null, - "dataMode": null, - "headerData": [], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", - "headers": "", - "pathVariables": {} - }, - { - "id": "c5b698c9-f2f2-431f-aef5-6f68d4497678", - "name": "Enable Subscription", - "url": "https://api.paystack.co/subscription/enable", - "description": "**Body Params**\n- **code** (_required_) - Subscription code\n- **token** (_required_) - Email token", - "data": [ - { - "key": "code", - "value": "SUB_vsyqdmlzble3uii", - "type": "text" - }, - { - "key": "token", - "value": "d7gofp6yppn3qz7", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "958cdff8-98b1-4e14-93c5-512ae20a253e", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "c6597500-7281-44c3-96c3-49e45ac0cc8f", - "name": "Check Authorization", - "url": "https://api.paystack.co/transaction/check_authorization", - "description": "All mastercard and visa authorizations can be checked with this endpoint to know if they have funds for the payment you seek.\n\n**Body Params**\n- **authorization_code** (_required_) - Authorization code for mastercard or VISA authorization belonging to email.\n- **amount** (_required_) - Amount in kobo\n- **email** (_required_) - Customer's email address\n- **currency** - A currency for the amount we want to check\n\nIn test mode, we will return insufficient funds for an amount greater than or equal 500,000 naira.", - "data": [ - { - "key": "authorization_code", - "value": "AUTH_CODE", - "type": "text" - }, - { - "key": "email", - "value": "customer@email.com", - "type": "text" - }, - { - "key": "amount", - "value": "500000", - "type": "text" - } - ], - "dataMode": "params", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "e446091c-eefd-4073-a582-4299e3c577de", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "c7bd8231-6b4b-49de-b549-c7282211e495", - "name": "Pause Bulk Charge Batch", - "url": "https://api.paystack.co/bulkcharge/pause/batch_code", - "description": "Use this endpoint to pause processing a batch\n\n**Path Params**\n- **batch_code** (_required_)", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "1696a2d4-2391-4f80-a929-4e7041df44cc", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "c8ece9ee-69b2-4610-b925-3dc8de6487ca", - "name": "Balance Ledger", - "url": "https://api.paystack.co/balance/ledger", - "description": "Returns all activity carried out from and to the Paystack Balance", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "ccd6fec1-02b7-4fa7-a602-2a8803c250cd", - "name": "Resolve Card BIN", - "url": "https://api.paystack.co/decision/bin/{BIN)", - "description": "**Path Params**\n- **bin** (_required_) - First 6 characters of card", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "65cf7432-1b38-403b-9d51-4d77aed89f7c", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "d128d8bb-eb52-43dd-8545-4f9faf38cadf", - "name": "Charge", - "url": "https://api.paystack.co/charge", - "description": "Send card details or bank details or authorization code to start a charge.\nSimple guide to charging cards directly https://developers.paystack.co/docs/charging-from-your-backend\n\n**Body Params**\n- **email** (_required_) - Customer's email address\n- **amount** (_required_) - Amount in kobo\n- **card** (_required_) - Card number\n- **card.number** (_required_) - Card to tokenize\n- **card.cvv** (_required_) - Card security code\n- **card.expiry_month** (_required_) - Expiry month of card\n- **card.expiry_year** (_required_) - Expiry year of card\n- **bank** - Bank account to charge (don't send if charging an authorization code or card)\n- **bank.code** (_required_) - A code for the [bank](https://developers.paystack.co/v1.0/ref/banks) (check banks for the banks supported). Only the ones for which paywithbank is true will work.\n- **bank.account_number** (_required_) - 10 digit nuban for the account to charge\n- **authorization_code** - An authorization code to charge (don't send if charging a card or bank account)\n- **pin** - 4-digit PIN (send with a non-reusable authorization code)\n- **metadata** - A JSON object", - "data": [], - "dataMode": "raw", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "56062893-9ab5-40f0-a017-17072c219217", - "rawModeData": "{\n \"email\":\"some@body.nice\",\n \"amount\":\"10000\",\n \"metadata\":{\n \"custom_fields\":[\n {\n \"value\":\"makurdi\",\n \"display_name\": \"Donation for\",\n \"variable_name\": \"donation_for\"\n }\n ]\n },\n \"card\":{\n \"cvv\":\"408\",\n \"number\":\"4084084084084081\",\n \"expiry_month\":\"01\",\n \"expiry_year\":\"99\"\n },\n \"pin\":\"0000\"\n}", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "d19e26d4-7593-4af7-893a-ae45dfc43887", - "name": "Create Subaccount", - "url": "https://api.paystack.co/subaccount", - "description": "**Body Params**\n- **business_name** (_required_) - Name of business for subaccount\n- **settlement_bank** (_required_) - Name of Bank (see list of accepted names by calling [List Banks](https://developers.paystack.co/v1.0/docs/list-banks)\n- **account_number** (_required_) - NUBAN Bank Account Number\n- **percentage_charge** (_required_) - What is the default percentage charged when receiving on behalf of this subaccount?\n- **primary_contact_email** - A contact email for the subaccount\n- **primary_contact_name** - A name for the contact person for this subaccount\n- **primary_contact_phone** - A phone number to call for this subaccount\n- **metadata** - Stringified JSON object\n- **settlement_schedule** - Any of `auto`, `weekly`, `monthly`, `manual`. Auto means payout is T+1 and manual means payout to the subaccount should only be made when requested.\n\nReceive payments for the created subaccount by providing their code when doing a transaction. More details here: [Split Payments Overview](https://developers.paystack.co/v1.0/docs/split-payments-overview)", - "data": [ - { - "key": "business_name", - "value": "Sunshine Studios", - "type": "text" - }, - { - "key": "settlement_bank", - "value": "044", - "type": "text" - }, - { - "key": "account_number", - "value": "0193274682", - "type": "text" - }, - { - "key": "percentage_charge", - "value": "18.2", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "886b67bc-06de-485b-8b9f-0297310ee7db", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "d2cdaab4-09a7-48e9-9cb9-34fef87c28bc", - "name": "Fetch Transfer", - "url": "https://api.paystack.co/transfer/id", - "description": "**Path Params**\n- **id_or_code** (_required_) - An ID or code for the transfer whose details you want to retrieve.", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "4c6d8917-6047-41ca-9df7-153ba844f275", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "db65eb06-772f-4987-bb35-94fc0d5840b7", - "name": "Deactivate Authorization", - "url": "https://api.paystack.co/customer/deactivate_authorization", - "description": "For when the card needs to be forgotten...\n\n**Body Params**\n- **authorization_code** (_required_) - Authorization code to be deactivated\n\n", - "data": [ - { - "key": "authorization_code", - "value": "AUTH_CODE", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "e446091c-eefd-4073-a582-4299e3c577de", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "dd2df05a-3d7f-477a-8a44-180e42f62288", - "name": "Archive Invoice", - "url": "https://api.paystack.co/invoice/archive/:id_or_code", - "description": "Used to archive an invoice. Invoice will no longer be fetched on list or returned on verify.", - "data": [], - "dataMode": "params", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "POST", - "pathVariableData": [ - { - "key": "id_or_code", - "value": "" - } - ], - "queryParams": [], - "auth": null, - "events": null, - "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": { - "id_or_code": "" - } - }, - { - "id": "e2898759-e26f-4c26-9701-f8c3822c3b3d", - "name": "Resolve Phone Number", - "url": "https://api.paystack.co/verifications", - "description": "Using the Truecaller API you can verify the authenticity of a customer. It returns the customer's name, phone number, email, social media handles and organization as available on their Truecaller profile.\n\n**Body Parameters**\n- **verification_type** _(required)_\n- **phone** _(required)_ - Customer phone number starting with country code (without the + prefix)\n- **callback_url** - Link on server to receive the truecaller details", - "data": [ - { - "key": "verification_type", - "value": "truecaller", - "type": "text" - }, - { - "key": "phone", - "value": "2349012345678", - "type": "text" - }, - { - "key": "callback_url", - "value": "https://linktopage.com/truecaller", - "type": "text" - } - ], - "dataMode": "params", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "65cf7432-1b38-403b-9d51-4d77aed89f7c", - "responses": [ - { - "id": "9b4ada70-810b-4902-b01f-546e51235b65", - "name": "Successful", - "status": "OK", - "mime": "", - "language": "json", - "text": "{\n \"status\": true,\n \"message\": \"Truecaller verification successful\",\n \"data\": {\n \"requestId\": \"zLXHzm_DqHcv09ghFQuLfBQ81Cs=\",\n \"state\": \"truecaller_vef_c4d3e611fbff37a0cb73e02e4d081db31a47255f\"\n }\n}", - "responseCode": { - "code": 200, - "name": "OK", - "detail": "" - }, - "requestObject": { - "id": "3c2cb2db-e979-40e1-9daf-82cc31fccf85", - "method": "POST", - "headers": "Authorization: Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", - "dataMode": "params", - "data": [ - { - "key": "verification_type", - "value": "truecaller", - "type": "text" - }, - { - "key": "phone", - "value": "2347036809340\n", - "type": "text" - }, - { - "key": "callback_url", - "value": "https://linktopage.com/truecaller", - "type": "text" - } - ], - "rawModeData": "", - "url": "https://api.paystack.co/verifications", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251" - } - ] - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3f9df6cc9ba76b61-LHR", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Encoding", - "value": "gzip", - "name": "Content-Encoding", - "description": "" - }, - { - "key": "Content-Length", - "value": "186", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Sun, 11 Mar 2018 12:18:31 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"d0-WENhxvB2YI5kTAMR7WR93A\"", - "name": "ETag", - "description": "" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "Vary", - "value": "X-HTTP-Method-Override", - "name": "Vary", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3A7LgGvmGpDzAihy5HGWjMt0-6pYQ-O1fI.Ww9WlrquS0KVxKei%2FOvD31f9FgrFwd6UeBtbUDUw5So", - "name": "sails.sid" - } - ], - "request": "e2898759-e26f-4c26-9701-f8c3822c3b3d", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - }, - { - "id": "c9899aec-287d-4d27-a0ed-c473b91ea845", - "name": "No truecaller app installed", - "status": "Forbidden", - "mime": "", - "language": "json", - "text": "{\n \"status\": false,\n \"message\": \"This number does not have the Truecaller app installed.\"\n}", - "responseCode": { - "code": 403, - "name": "Forbidden", - "detail": "" - }, - "requestObject": { - "id": "f7202b2e-9a49-4e55-822c-1499344a5944", - "method": "POST", - "headers": "Authorization: Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", - "dataMode": "params", - "data": [ - { - "key": "verification_type", - "value": "truecaller", - "type": "text" - }, - { - "key": "phone", - "value": "2347036809340\n", - "type": "text" - }, - { - "key": "callback_url", - "value": "https://linktopage.com/truecaller", - "type": "text" - } - ], - "rawModeData": "", - "url": "https://api.paystack.co/verifications", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", - "type": "text", - "enabled": true - } - ] - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3f9df7824a2d6b61-LHR", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Encoding", - "value": "gzip", - "name": "Content-Encoding", - "description": "" - }, - { - "key": "Content-Length", - "value": "102", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Sun, 11 Mar 2018 12:19:00 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"5d-0reyzbejXkazWnJmxYVtRA\"", - "name": "ETag", - "description": "" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "Vary", - "value": "X-HTTP-Method-Override", - "name": "Vary", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3ABcpFBu2qTg7wUxoUIsZ4P1VCnrnNOAfd.s7nRTSYSR1LCHPq8hhFYnrtplcieySZWtDNB8i1VTrQ; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3ABcpFBu2qTg7wUxoUIsZ4P1VCnrnNOAfd.s7nRTSYSR1LCHPq8hhFYnrtplcieySZWtDNB8i1VTrQ", - "name": "sails.sid" - } - ], - "request": "e2898759-e26f-4c26-9701-f8c3822c3b3d", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - }, - { - "id": "d783a03e-63cd-4ae0-bed7-56f143d80527", - "name": "Invalid Request", - "status": "Unauthorized", - "mime": "", - "language": "json", - "text": "{\n \"status\": false,\n \"message\": \"Invalid key\"\n}", - "responseCode": { - "code": 401, - "name": "Unauthorized", - "detail": "" - }, - "requestObject": { - "id": "b30bcf78-a03f-4f9f-895b-f018cbbecfa2", - "method": "POST", - "headers": "Authorization: Bearer SECRET_KEY", - "dataMode": "params", - "data": [ - { - "key": "verification_type", - "value": "truecaller", - "type": "text" - }, - { - "key": "phone", - "value": "2347036809348", - "type": "text" - }, - { - "key": "callback_url", - "value": "No URL included", - "type": "text" - } - ], - "rawModeData": "", - "url": "https://api.paystack.co/verifications", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ] - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3f9dfc750a0c6b61-LHR", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Length", - "value": "49", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Sun, 11 Mar 2018 12:22:22 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"31-TcCODO2pQ5hz9TTU0Rc5Eg\"", - "name": "ETag", - "description": "" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "Vary", - "value": "X-HTTP-Method-Override", - "name": "Vary", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3ABcpFBu2qTg7wUxoUIsZ4P1VCnrnNOAfd.s7nRTSYSR1LCHPq8hhFYnrtplcieySZWtDNB8i1VTrQ", - "name": "sails.sid" - } - ], - "request": "e2898759-e26f-4c26-9701-f8c3822c3b3d", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "e578399d-00d7-4711-b088-9d8049b9f4a2", - "name": "Transaction Totals", - "url": "https://api.paystack.co/transaction/totals", - "description": "Total amount received on your account\n\n**Query Params**\n- **from** - Lower bound of date range. Leave undefined to show totals from day one.\n- **to** - Upper bound of date range. Leave undefined to show totals till date.", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "e446091c-eefd-4073-a582-4299e3c577de", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "e67ba043-51d0-4ef4-a49e-e652482393ac", - "name": "Check Slug Availability", - "url": "https://api.paystack.co/page/check_slug_availability/slug", - "description": "**Path Params**\n- **slug** (_required_) - URL slug to be confirmed", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "084139a8-b034-4bc7-97af-8a9d6a6022b9", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "ea31deed-604d-4ed8-9c9e-553754a93654", - "name": "Submit Phone", - "url": "https://api.paystack.co/charge/submit_phone", - "description": "Submit Phone when requested\n\n**Body Params**\n- **phone** (_required_) - Phone number submitted by user\n- **reference** (_required_) - reference for ongoing transaction", - "data": [ - { - "key": "reference", - "value": "m5mwhre1vq7fuh9", - "type": "text" - }, - { - "key": "phone", - "value": "08030000000", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "56062893-9ab5-40f0-a017-17072c219217", - "headers": "Content-Type: application/json\nAuthorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "ec7d7877-1d7f-417c-81a5-b1d01663ec46", - "name": "List Bulk Charge Batches", - "url": "https://api.paystack.co/transfer/id_or_code", - "description": "This lists all bulk charge batches created by the integration. Statuses can be `active`, `paused`, or `complete`.\n\n**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "https://api.paystack.co/plan" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "1696a2d4-2391-4f80-a929-4e7041df44cc", - "headers": "Authorization: https://api.paystack.co/plan\n", - "pathVariables": {} - }, - { - "id": "f1fa7622-e735-49ca-be43-3daaf3865fe9", - "name": "Initialize Transaction", - "url": "https://api.paystack.co/transaction/initialize", - "description": "**Body Params**\n- **email** (_required_) - Customer's email address\n- **amount** (_required_) - Amount in kobo\n- **reference** - Generate a reference or leave this param blank for Paystack to generate one for you\n- **callback_url** - Overrides the callback URL set on Paystack dashboard.\n- **plan** - If transaction is to create a subscription to a predefined plan, provide plan code here. This would invalidate the value provided in `amount`\n- **invoice_limit** - Number of times to charge customer during subscription to plan\n- **metadata** - Stringified JSON object. Add a `custom_fields` attribute which has an array of objects if you would like the fields to be added to your transaction when displayed on the dashboard.\n- **subaccount** - The code for the subaccount that owns the payment.\n- **transaction_charge** - A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split).\n- **bearer** - Who bears Paystack charges? `account` or `subaccount` (defaults to `account`).\n- **channels** - Send us 'card' or 'bank' or 'card','bank' as an array to specify what options to show the user paying", - "data": [], - "dataOptions": null, - "dataMode": "raw", - "headerData": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Authorization", - "value": "Bearer sk_live_88bd6582eccfbd5801bc4f878e572ae52b4862de" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "e446091c-eefd-4073-a582-4299e3c577de", - "responses": [ - { - "id": "e6789275-2201-4f68-b496-379c7269ecb8", - "name": "Initialize Transaction", - "status": "OK", - "mime": "", - "language": "json", - "text": "{\n \"status\": true,\n \"message\": \"Authorization URL created\",\n \"data\": {\n \"authorization_url\": \"https://paystack.com/secure/5q70ef6pu1dq4qn\",\n \"access_code\": \"5q70ef6pu1dq4qn\",\n \"reference\": \"XXXREF\"\n }\n}", - "responseCode": { - "code": 200, - "name": "OK", - "detail": "" - }, - "requestObject": { - "id": "704d7de1-2c64-45c2-a16f-d12857781a0e", - "method": "POST", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json", - "dataMode": "raw", - "data": [], - "url": "https://api.paystack.co/transaction/initialize", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "rawModeData": "{\n\t\"email\": \"customer@email.com\",\n\t\"amount\": \"500000\",\n\t\"reference\": \"XXXREF\",\n\t\"metadata\": {\n \"custom_fields\": [\n {\n \"display_name\": \"Mobile Number\",\n \"variable_name\": \"mobile_number\",\n \"value\": \"+2348012345678\"\n }\n ]\n }\n}" - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3e5d58b8b8486b9d-LHR", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Encoding", - "value": "gzip", - "name": "Content-Encoding", - "description": "" - }, - { - "key": "Content-Length", - "value": "172", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Wed, 31 Jan 2018 14:26:32 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"d7-NRaST0Xb8B+N5gPWdfUh3Q\"", - "name": "ETag", - "description": "" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "Vary", - "value": "X-HTTP-Method-Override", - "name": "Vary", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3AFK0wuePK3VARObcUOKaJPenguhQFJJgH.aNleUsupaRA7X2SCoJSQIza%2BnXRBoon7J8BC8z%2BArIU; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3AFK0wuePK3VARObcUOKaJPenguhQFJJgH.aNleUsupaRA7X2SCoJSQIza%2BnXRBoon7J8BC8z%2BArIU", - "name": "sails.sid" - } - ], - "request": "f1fa7622-e735-49ca-be43-3daaf3865fe9", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "rawModeData": "{\n \"email\": \"dom@gmail.com\",\n \"amount\": 2500\n}", - "headers": "Content-Type: application/json\nAuthorization: Bearer sk_live_88bd6582eccfbd5801bc4f878e572ae52b4862de\n", - "pathVariables": {} - }, - { - "id": "f411a75a-4e79-4248-b6b1-6bb2bc521a65", - "name": "Create Page", - "url": "https://api.paystack.co/page", - "description": "**Body Params**\n- **name** (_required_) - Name of page\n- **description** - Short description of page\n- **amount** - Default amount you want to accept using this page. If none is set, customer is free to provide any amount of their choice. The latter scenario is useful for accepting donations\n- **slug** - URL slug you would like to be associated with this page. Page will be accessible at https://paystack.com/pay/[slug]\n- **redirect_url** - If you would like Paystack to redirect someplace upon successful payment, specify the URL here.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers\n- **custom_fields** - If you would like to accept custom fields, specify them here. See sample code for details.\n\nSend pages created to your customers by giving out a link in this format https://paystack.com/pay/:slug. For instance, a valid link for the page above would be https://paystack.com/pay/5nApBwZkvY", - "data": [ - { - "key": "name", - "value": "", - "type": "text" - }, - { - "key": "description", - "value": "", - "type": "text" - }, - { - "key": "amount", - "value": "500000", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "084139a8-b034-4bc7-97af-8a9d6a6022b9", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "f463ae2f-e633-4833-a686-a392a87e24b8", - "name": "Fetch Transaction", - "url": "https://api.paystack.co/transaction/id", - "description": "**Path Params**\n- **id** (_required_) - An ID for the transaction to fetch", - "data": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "e446091c-eefd-4073-a582-4299e3c577de", - "headers": "Authorization: Bearer SECRET_KEY\n", - "pathVariables": {} - }, - { - "id": "f7be8d7c-4cd9-4741-8f05-da42f0864ed6", - "name": "Resend OTP for Transfer", - "url": "https://api.paystack.co/transfer/resend_otp", - "description": "Creates a new recipient. An duplicate account number will lead to the retrieval of the existing record.\n\n**Body Params**\n- **transfer_code** (_required_) - Transfer code\n- **reason** (_required_) - either `resend_otp` or `transfer`", - "data": [ - { - "key": "transfer_code", - "value": "TRF_vsyqdmlzble3uii", - "type": "text" - } - ], - "dataMode": "urlencoded", - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET_KEY" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", - "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", - "pathVariables": {} - }, - { - "id": "fd878edc-b34c-4552-b166-d3d06ccd4d97", - "name": "List Refunds", - "url": "https://api.paystack.co/refund", - "description": "**Query Parameters**\n\n- **transaction**\n- **currency**", - "data": null, - "dataOptions": null, - "dataMode": null, - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET KEY" - } - ], - "method": "GET", - "pathVariableData": [], - "queryParams": [], - "auth": null, - "events": null, - "folder": "588455d8-920a-4aec-a63c-b29486d03e4f", - "responses": [ - { - "id": "015c8220-b629-4657-834c-824819924cc3", - "name": "List Refunds", - "status": "Unauthorized", - "mime": "", - "language": "json", - "text": "\n{\n \"status\": true,\n \"message\": \"Refunds retrieved\",\n \"data\": [\n {\n \"id\": 1,\n \"integration\": 100982,\n \"domain\": \"live\",\n \"transaction\": 1641,\n \"dispute\": 20,\n \"amount\": 500000,\n \"deducted_amount\": 500000,\n \"currency\": \"NGN\",\n \"channel\": \"migs\",\n \"fully_deducted\": 1,\n \"refunded_by\": \"customer@gmail.com\",\n \"refunded_at\": \"2018-01-12T10:54:47.000Z\",\n \"expected_at\": \"2017-10-01T21:10:59.000Z\",\n \"settlement\": null,\n \"customer_note\": \"xxx\",\n \"merchant_note\": \"xxx\",\n \"created_at\": \"2017-09-24T21:10:59.000Z\",\n \"updated_at\": \"2018-01-18T11:59:56.000Z\",\n \"status\": \"processed\"\n },\n {\n \"id\": 2,\n \"integration\": 100982,\n \"domain\": \"test\",\n \"transaction\": 323896,\n \"dispute\": 45,\n \"amount\": 500000,\n \"deducted_amount\": null,\n \"currency\": \"NGN\",\n \"channel\": \"migs\",\n \"fully_deducted\": null,\n \"refunded_by\": \"customer@gmail.com\",\n \"refunded_at\": \"2017-09-24T21:11:53.000Z\",\n \"expected_at\": \"2017-10-01T21:11:53.000Z\",\n \"settlement\": null,\n \"customer_note\": \"xxx\",\n \"merchant_note\": \"xxx\",\n \"created_at\": \"2017-09-24T21:11:53.000Z\",\n \"updated_at\": \"2017-09-24T21:11:53.000Z\",\n \"status\": \"pending\"\n }\n ]\n}", - "responseCode": { - "code": 401, - "name": "Unauthorized", - "detail": "" - }, - "requestObject": { - "id": "0ac5c3bc-7f31-4603-ab19-7ecb1617ddb1", - "method": "GET", - "headers": "Authorization: Bearer SECRET KEY", - "dataMode": null, - "data": null, - "rawModeData": "", - "url": "https://api.paystack.co/refund", - "pathVariableData": [], - "queryParams": [], - "headerData": [ - { - "key": "Authorization", - "value": "Bearer SECRET KEY" - } - ] - }, - "headers": [ - { - "key": "CF-RAY", - "value": "3ebe8d2f6d760a90-LHR", - "name": "CF-RAY", - "description": "" - }, - { - "key": "Connection", - "value": "keep-alive", - "name": "Connection", - "description": "" - }, - { - "key": "Content-Length", - "value": "82", - "name": "Content-Length", - "description": "" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8", - "name": "Content-Type", - "description": "" - }, - { - "key": "Date", - "value": "Mon, 12 Feb 2018 09:34:20 GMT", - "name": "Date", - "description": "" - }, - { - "key": "ETag", - "value": "W/\"52-hNi7udIfPKyFcTWyPMlgkw\"", - "name": "ETag", - "description": "" - }, - { - "key": "Expect-CT", - "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", - "name": "Expect-CT", - "description": "" - }, - { - "key": "Server", - "value": "cloudflare", - "name": "Server", - "description": "" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=15552000; includeSubDomains; preload", - "name": "Strict-Transport-Security", - "description": "" - }, - { - "key": "X-Content-Type-Options", - "value": "nosniff", - "name": "X-Content-Type-Options", - "description": "" - }, - { - "key": "X-Powered-By", - "value": "Sails ", - "name": "X-Powered-By", - "description": "" - }, - { - "key": "set-cookie", - "value": "sails.sid=s%3A9Ws_2f_T7wJ-hiQHjkSOfnBEuZjWp-Yq.ubKRlmVDHufn8fem8Ej2YOKlZjq75CgSJh%2Fx5Dg366Q; Path=/; HttpOnly; Secure", - "name": "set-cookie", - "description": "" - } - ], - "cookies": [ - { - "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "paystack.co", - "path": "/", - "secure": false, - "value": "d112058215f7178c3149e857f0b1346371505483302", - "name": "__cfduid" - }, - { - "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", - "httpOnly": true, - "domain": "api.paystack.co", - "path": "/", - "secure": true, - "value": "s%3A9Ws_2f_T7wJ-hiQHjkSOfnBEuZjWp-Yq.ubKRlmVDHufn8fem8Ej2YOKlZjq75CgSJh%2Fx5Dg366Q", - "name": "sails.sid" - } - ], - "request": "fd878edc-b34c-4552-b166-d3d06ccd4d97", - "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" - } - ], - "headers": "Authorization: Bearer SECRET KEY\n", - "pathVariables": {} - } - ] -} \ No newline at end of file + "id": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "name": "Paystack API", + "description": "The **Paystack** API Collection is a collection of all endpoints that merchants and developers can take advantage of to build financial solutions in Nigeria", + "auth": null, + "events": null, + "variables": [], + "order": [], + "folders_order": [ + "e446091c-eefd-4073-a582-4299e3c577de", + "4abcb36b-0005-4397-8452-1ad6f66e8ec3", + "886b67bc-06de-485b-8b9f-0297310ee7db", + "2bfdf110-b72e-4cc1-a7ba-73fa32369750", + "958cdff8-98b1-4e14-93c5-512ae20a253e", + "084139a8-b034-4bc7-97af-8a9d6a6022b9", + "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", + "b34521bd-87df-49f6-b11a-7b8da3a2ffc3", + "058c5fce-45d9-49b3-b243-2bd3489f42e9", + "4c6d8917-6047-41ca-9df7-153ba844f275", + "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", + "56062893-9ab5-40f0-a017-17072c219217", + "1696a2d4-2391-4f80-a929-4e7041df44cc", + "08b275ca-4233-4ac3-92a2-5224a4f63146", + "588455d8-920a-4aec-a63c-b29486d03e4f", + "9b923444-b195-452e-b534-8dbb98905930", + "65cf7432-1b38-403b-9d51-4d77aed89f7c", + "72fc0747-0dfd-4d95-9967-d2eec04a1d47" + ], + "folders": [ + { + "id": "1696a2d4-2391-4f80-a929-4e7041df44cc", + "name": "Bulk Charges", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "29f698b8-6ab0-4f0a-ae6e-c219c24d4581", + "ec7d7877-1d7f-417c-81a5-b1d01663ec46", + "107de35f-6a2d-4640-b708-360b260b4b9b", + "277970a1-0b1e-4431-90ba-c7b039b59070", + "c7bd8231-6b4b-49de-b549-c7282211e495", + "bc53767a-f68a-44a7-ac3f-0ba03ece6c3f" + ], + "folders_order": [] + }, + { + "id": "56062893-9ab5-40f0-a017-17072c219217", + "name": "Charge", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "a6755315-7c75-4c11-8709-1447ad19c2d2", + "d128d8bb-eb52-43dd-8545-4f9faf38cadf", + "82798ee0-0592-41fe-b2e8-e267a7e5b39b", + "25333027-4fdd-4454-bf65-536c40809cef", + "ea31deed-604d-4ed8-9c9e-553754a93654", + "99dc16de-6c99-4ea7-8254-fa57f73bfbe2", + "c168c418-43d0-4ceb-80e4-a4f6824754d9" + ], + "folders_order": [] + }, + { + "id": "9b923444-b195-452e-b534-8dbb98905930", + "name": "Control Panel", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "ad2d4a15-d9a5-4e10-ab8a-a77482e8ef2e", + "56989ea8-1cd4-4a11-a2e1-003f3d9b118b" + ], + "folders_order": [] + }, + { + "id": "4abcb36b-0005-4397-8452-1ad6f66e8ec3", + "name": "Customers", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "aa38750f-21b0-4cba-8864-24812685435d", + "9bdce8ac-0d49-46bc-a4cb-c1116a1dcf2c", + "b2833b4e-91e8-4f4c-8a0f-6fb97c130a1e", + "42d4a271-8b1e-4297-95d9-69e0727c2e9a", + "b2c99087-3afa-4310-99d8-549ec6ee1440" + ], + "folders_order": [] + }, + { + "id": "588455d8-920a-4aec-a63c-b29486d03e4f", + "name": "Disputes", + "description": "A chargeback(dispute) is a reversal of a payment made to a merchant, back to the customer's bank account. The reversal is done by the customer’s bank, at the request of the customer and it is used as a form of consumer protection to secure the customer's interest in wrongful transactions. This means a customer has a right to file a chargeback for a transaction if there is a valid reason to do so.\n\nChargebacks are different from refunds. In the case of a refund, the customer reaches out to the business to ask for a refund, which may or may not be honored depending on the business' policy. However, for a chargeback, the customer contacts their bank directly to forcibly reverse the transaction.", + "auth": null, + "events": [ + { + "listen": "prerequest", + "script": { + "id": "78233250-a60b-4f48-a000-d22290246c73", + "type": "text/javascript", + "exec": [""] + } + }, + { + "listen": "test", + "script": { + "id": "82318060-f724-4753-9c33-9a64500f0ef1", + "type": "text/javascript", + "exec": [""] + } + } + ], + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "8c42b41f-1b9a-43f3-80bf-7094c6cbb1e6", + "fd878edc-b34c-4552-b166-d3d06ccd4d97", + "77203a76-a23a-45a4-ac6f-61f6f6d46f35" + ], + "folders_order": [], + "protocolProfileBehavior": {} + }, + { + "id": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", + "name": "Invoices", + "description": "Send out payment requests and invoices to your customers to supercharge your sales process\n", + "auth": null, + "events": [ + { + "listen": "prerequest", + "script": { + "id": "10c79117-a373-4bc3-9f0c-711fc802c996", + "type": "text/javascript", + "exec": [""] + } + }, + { + "listen": "test", + "script": { + "id": "f897e80c-6cca-439a-960f-e8d2d3ebbe98", + "type": "text/javascript", + "exec": [""] + } + } + ], + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "0d31a07b-9c51-4afa-b47d-d5705bf88c81", + "3f87dee8-ad19-4f7a-8861-ae5220497c0b", + "50c32a6c-8e70-486a-9468-ad0694a0dce9", + "c2796b87-1b90-4bb3-a0e0-f176854bda18", + "3134838c-e543-47cb-9338-90e4868a1e70", + "773461c5-9baa-4c38-92f1-68f9e55f4bd0", + "219a3e30-67e1-4e60-80cf-ab352e3ee9d2", + "7f24265a-4e43-4839-8b59-b3b6758532ae", + "dd2df05a-3d7f-477a-8a44-180e42f62288" + ], + "folders_order": [] + }, + { + "id": "72fc0747-0dfd-4d95-9967-d2eec04a1d47", + "name": "Miscellaneous", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": ["1d6a47ee-9b08-4305-a597-c0e11c4c5cf9"], + "folders_order": [] + }, + { + "id": "084139a8-b034-4bc7-97af-8a9d6a6022b9", + "name": "Payment Pages", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "f411a75a-4e79-4248-b6b1-6bb2bc521a65", + "268b9f2f-013c-4380-9d69-b5b764da18a5", + "240f6fde-40da-4305-9dbe-9c4280ea3c21", + "092a52ea-294c-4943-a20a-f0a43e13d2a5", + "e67ba043-51d0-4ef4-a49e-e652482393ac" + ], + "folders_order": [] + }, + { + "id": "2bfdf110-b72e-4cc1-a7ba-73fa32369750", + "name": "Plans", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "8c25557c-11ce-45e7-9970-3b2eb9666a6b", + "8d605bc9-6eb8-4ee2-9180-ad3683f00ff7", + "9aa0cd8c-a4aa-4400-b9f9-3423dd4e759a", + "34e85546-128d-426c-8e55-980de4889852" + ], + "folders_order": [] + }, + { + "id": "08b275ca-4233-4ac3-92a2-5224a4f63146", + "name": "Refunds", + "description": "A Refund is an object created on a disputed transaction requesting for a refund. Credit/Debit card originally charged will be refunded.", + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "4a66b2b2-6a4b-4fb7-85ae-0a296263359d", + "a76c83a3-dde8-44b9-8f37-0d796b3c449b", + "9b543458-0505-4a68-acdb-68d55c9b1943" + ], + "folders_order": [] + }, + { + "id": "b34521bd-87df-49f6-b11a-7b8da3a2ffc3", + "name": "Settlements", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": ["b35664d5-a14f-4d8a-b959-3ea6ee821aba"], + "folders_order": [] + }, + { + "id": "886b67bc-06de-485b-8b9f-0297310ee7db", + "name": "Subaccounts", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "d19e26d4-7593-4af7-893a-ae45dfc43887", + "b2aca7dd-5390-4348-b690-f2d81673a39c", + "311bde2d-4b78-4710-8331-a5d8b60fb3dd", + "03b3abd7-77f0-4854-8ced-0c507ae0045b" + ], + "folders_order": [] + }, + { + "id": "958cdff8-98b1-4e14-93c5-512ae20a253e", + "name": "Subscriptions", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "68981e59-4687-4cfd-993a-140725f16582", + "beb2a320-ba1f-41d0-be71-49c783438d7c", + "455653a6-e83a-4170-b1c5-26c10c521be8", + "10107e5f-59b6-47bb-ac01-0a4b444f6fd2", + "c5b698c9-f2f2-431f-aef5-6f68d4497678" + ], + "folders_order": [] + }, + { + "id": "e446091c-eefd-4073-a582-4299e3c577de", + "name": "Transactions", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "f1fa7622-e735-49ca-be43-3daaf3865fe9", + "30aedfb9-716d-4c04-a9d8-d9917a5671fb", + "3828fd62-ac56-4173-b1f7-4e7a9736a07d", + "f463ae2f-e633-4833-a686-a392a87e24b8", + "7aa585e2-2e5c-4915-a9a5-01cb22cd2070", + "c6597500-7281-44c3-96c3-49e45ac0cc8f", + "db65eb06-772f-4987-bb35-94fc0d5840b7", + "6643a92f-c2ee-4010-8f50-cbe07103ffae", + "e578399d-00d7-4711-b088-9d8049b9f4a2", + "a7300540-a900-485e-8c90-7f20cf937bba" + ], + "folders_order": [] + }, + { + "id": "4c6d8917-6047-41ca-9df7-153ba844f275", + "name": "Transfers", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "2eb46d8f-c694-4ce1-ae2d-ea3a3e8e89a3", + "0c2d6ec3-cf3e-413e-bdd6-91014d702310", + "475a22fa-d9d9-4aad-9daa-551aac93df21", + "d2cdaab4-09a7-48e9-9cb9-34fef87c28bc", + "288745a8-e595-42c8-8a74-cc2c4dbc4949", + "9f56c0a9-ef8e-4fcc-9886-48b75966cf9f" + ], + "folders_order": [] + }, + { + "id": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", + "name": "Transfers Control", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "b1ce4f06-38b5-4b81-a7c5-8858c05a5274", + "c8ece9ee-69b2-4610-b925-3dc8de6487ca", + "f7be8d7c-4cd9-4741-8f05-da42f0864ed6", + "809a38f9-979d-4db7-b997-30709de84dad", + "b54289de-5afd-454c-84ce-6dc23e331579", + "847209c5-9d03-4364-9f44-c8fa666371c8" + ], + "folders_order": [] + }, + { + "id": "058c5fce-45d9-49b3-b243-2bd3489f42e9", + "name": "Transfers Recipients", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "0ea26c65-76af-4044-90d9-a20e480f6cd9", + "b77b4e4e-f9f5-4435-b19c-2f3bcf4e68a6", + "b93a1dc1-27ca-422c-8f4d-97bd62607c08", + "696647d0-b1f2-4746-a238-7ac1f1d41514" + ], + "folders_order": [] + }, + { + "id": "65cf7432-1b38-403b-9d51-4d77aed89f7c", + "name": "Verification", + "description": null, + "auth": null, + "events": null, + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4", + "folder": null, + "order": [ + "6a02589a-001b-4c16-bd7f-d1ad880ef207", + "be833eaf-47a2-408a-95c5-6ab7d00e0798", + "4aac7fb7-2f46-4f47-80ff-3215dae57f94", + "ccd6fec1-02b7-4fa7-a602-2a8803c250cd", + "e2898759-e26f-4c26-9701-f8c3822c3b3d" + ], + "folders_order": [] + } + ], + "requests": [ + { + "id": "03b3abd7-77f0-4854-8ced-0c507ae0045b", + "name": "Update Subaccount", + "url": "https://api.paystack.co/subaccount/:id_or_slug", + "description": null, + "data": [ + { + "key": "primary_contact_email", + "value": "customer@newemail.com", + "type": "text" + }, + { + "key": "percentage_charge", + "value": "18.9", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "PUT", + "pathVariableData": [ + { + "key": "id_or_slug", + "value": "" + } + ], + "queryParams": [], + "auth": null, + "events": null, + "folder": "886b67bc-06de-485b-8b9f-0297310ee7db", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": { + "id_or_slug": "" + } + }, + { + "id": "092a52ea-294c-4943-a20a-f0a43e13d2a5", + "name": "Update Page", + "url": "https://api.paystack.co/page/:id_or_plan_code", + "description": "**Body Params**\n- **name** - Name of page\n- **description** - Short description of page\n- **amount** - Amount to be charged in kobo. Will override the amount for existing subscriptions.\n- **active** - Set to false to deactivate page url.", + "data": [ + { + "key": "description", + "value": "Give unto the Lord, and it shall be multiplied 10-fold to you.", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "PUT", + "pathVariableData": [ + { + "key": "id_or_plan_code", + "value": "" + } + ], + "queryParams": [], + "auth": null, + "events": null, + "folder": "084139a8-b034-4bc7-97af-8a9d6a6022b9", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": { + "id_or_plan_code": "" + } + }, + { + "id": "0c2d6ec3-cf3e-413e-bdd6-91014d702310", + "name": "List Transfers", + "url": "https://api.paystack.co/transfer", + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "4c6d8917-6047-41ca-9df7-153ba844f275", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "0d31a07b-9c51-4afa-b47d-d5705bf88c81", + "name": "Create Invoice", + "url": "https://api.paystack.co/paymentrequest", + "description": "**Body Params**\n- **customer** (_required_) - Customer ID or code\n- **due_date** (_required_) - ISO 8601 representation of request due date\n- **amount** (_required_) - Invoice amount. Only useful if line items and tax values are ignored. endpoint will throw a friendly warning if neither is available.\n- **description**\n- **line_items** - Array of line items in the format `[{\"name\":\"item 1\", \"amount\":2000}]`\n- **tax** - Array of taxes to be charged in the format `[{\"name\":\"VAT\", \"amount\":2000}]`\n- **currency** - Defaults to Naira\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`.\n- **draft** - Indicate if request should be saved as draft. Defaults to `false` and overrides send_notification.\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`.\n- **has_invoice** - Set to `true` to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no `line_items` or `tax` passed.\n- **invoice_number** - Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point.", + "data": [], + "dataMode": "raw", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", + "responses": [ + { + "id": "c34c8e52-f905-47e9-bab3-06fefcf3227b", + "name": "Successful 200", + "status": "OK", + "mime": "", + "language": "json", + "text": "{\n \"status\": true,\n \"message\": \"Payment request created\",\n \"data\": {\n \"id\": 23902,\n \"domain\": \"test\",\n \"amount\": 42000,\n \"currency\": \"NGN\",\n \"due_date\": \"2017-05-08T00:00:00.000Z\",\n \"has_invoice\": true,\n \"invoice_number\": 6,\n \"description\": \"a test invoice\",\n \"line_items\": [\n {\n \"name\": \"item 1\",\n \"amount\": 20000\n },\n {\n \"name\": \"item 2\",\n \"amount\": 20000\n }\n ],\n \"tax\": [\n {\n \"name\": \"VAT\",\n \"amount\": 2000\n }\n ],\n \"request_code\": \"PRQ_3z3cfcsee63r16w\",\n \"status\": \"pending\",\n \"paid\": false,\n \"metadata\": null,\n \"notifications\": [],\n \"offline_reference\": \"119333023902\",\n \"customer\": 2396797,\n \"created_at\": \"2018-06-21T09:08:43.745Z\"\n }\n}", + "responseCode": { + "code": 200, + "name": "OK", + "detail": "" + }, + "requestObject": { + "id": "f9679dbf-da14-4312-a9ca-a22e43e480be", + "method": "POST", + "headers": "Content-Type: application/json\nAuthorization: Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", + "dataMode": "raw", + "data": [], + "url": "https://api.paystack.co/paymentrequest", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Content-Type", + "value": "application/json", + "enabled": true + }, + { + "key": "Authorization", + "value": "Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", + "type": "text", + "enabled": true + } + ], + "rawModeData": "{\n\t\"description\": \"a test invoice\",\n\t\"line_items\": [\n\t\t{\"name\": \"item 1\", \"amount\": 20000},\n\t\t{\"name\": \"item 2\", \"amount\": 20000}\n\t],\n\t\"tax\": [\n\t\t{\"name\": \"VAT\", \"amount\": 2000}\n\t],\n\t\"customer\": \"CUS_lvsdks3lllw3ure\",\n\t\"due_date\": \"2017-05-08\"\n}" + }, + "headers": [ + { + "key": "Access-Control-Allow-Origin", + "value": "*", + "name": "Access-Control-Allow-Origin", + "description": "Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource." + }, + { + "key": "CF-RAY", + "value": "42e5550cee6635ba-LHR", + "name": "CF-RAY", + "description": "Custom header" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "Options that are desired for the connection" + }, + { + "key": "Content-Encoding", + "value": "gzip", + "name": "Content-Encoding", + "description": "The type of encoding used on the data." + }, + { + "key": "Content-Length", + "value": "389", + "name": "Content-Length", + "description": "The length of the response body in octets (8-bit bytes)" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "The mime type of this content" + }, + { + "key": "Date", + "value": "Thu, 21 Jun 2018 09:08:43 GMT", + "name": "Date", + "description": "The date and time that the message was sent" + }, + { + "key": "ETag", + "value": "W/\"30a-IawJd2wFpUB2pAD/gWgjNA\"", + "name": "ETag", + "description": "An identifier for a specific version of a resource, often a message digest" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "Custom header" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "A name for the server" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains." + }, + { + "key": "Vary", + "value": "X-HTTP-Method-Override", + "name": "Vary", + "description": "Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server." + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "The only defined value, \"nosniff\", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "Specifies the technology (ASP.NET, PHP, JBoss, e.g.) supporting the web application (version details are often in X-Runtime, X-Version, or X-AspNet-Version)" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3ASgBvFKkNMl9LqoQn61BYPQv0FGo7Px_8.6r7HOko5VFuXL%2FqOBe9zJdEr29%2BhgowKdBy8bulmAaw; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "an HTTP cookie" + } + ], + "cookies": [ + { + "expirationDate": "Fri Apr 19 2019 18:10:52 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d70b94619eafb5cf44f6917a3e277cbc11524161452", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3ASgBvFKkNMl9LqoQn61BYPQv0FGo7Px_8.6r7HOko5VFuXL%2FqOBe9zJdEr29%2BhgowKdBy8bulmAaw", + "name": "sails.sid" + } + ], + "request": "0d31a07b-9c51-4afa-b47d-d5705bf88c81", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "rawModeData": "{\n\t\"description\": \"a test invoice\",\n\t\"line_items\": [\n\t\t{\"name\": \"item 1\", \"amount\": 20000},\n\t\t{\"name\": \"item 2\", \"amount\": 20000}\n\t],\n\t\"tax\": [\n\t\t{\"name\": \"VAT\", \"amount\": 2000}\n\t],\n\t\"customer\": \"CUS_je02lbimlqixzax\",\n\t\"due_date\": \"2017-05-08\"\n}", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "0ea26c65-76af-4044-90d9-a20e480f6cd9", + "name": "Create Transfer Recipient", + "url": "https://api.paystack.co/transferrecipient", + "description": "Creates a new recipient. An duplicate account number will lead to the retrieval of the existing record.\n\n**Body Params**\n- **type** (_required_) - Recipient Type (Only nuban at this time)\n- **name** (_required_) - A name for the recipient\n- **metadata** - Store additional information about your recipient in a structured format. JSON\n- **bank_code** (_required_) - Required if type is nuban. You can find a list of bank codes at [api.paystack.co/bank](https://api.paystack.co/bank)\n- **account_number** (_required_) - Required if type is `nuban`\n- **currency** - Currency for the account receiving the transfer.\n- **description**", + "data": [ + { + "key": "type", + "value": "nuban", + "type": "text" + }, + { + "key": "name", + "value": "Zombie", + "type": "text" + }, + { + "key": "description", + "value": "Zombier", + "type": "text" + }, + { + "key": "account_number", + "value": "01000000010", + "type": "text" + }, + { + "key": "bank_code", + "value": "044", + "type": "text" + }, + { + "key": "currency", + "value": "NGN", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "058c5fce-45d9-49b3-b243-2bd3489f42e9", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "10107e5f-59b6-47bb-ac01-0a4b444f6fd2", + "name": "Disable Subscription", + "url": "https://api.paystack.co/subscription/disable", + "description": "**Body Params**\n- **code** (_required_) - Subscription code\n- **token** (_required_) - Email token", + "data": [ + { + "key": "code", + "value": "SUB_vsyqdmlzble3uii", + "type": "text" + }, + { + "key": "token", + "value": "d7gofp6yppn3qz7", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "958cdff8-98b1-4e14-93c5-512ae20a253e", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "107de35f-6a2d-4640-b708-360b260b4b9b", + "name": "Fetch Bulk Charge Batch", + "url": "https://api.paystack.co/bulkcharge/id_or_code", + "description": "This endpoint retrieves a specific batch code. It also returns useful information on its progress by way of the `total_charges` and `pending_charges` attributes.\n\n**Path Params**\n- **id_or_code** (_required_) - An ID or code for the transfer whose details you want to retrieve.", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "1696a2d4-2391-4f80-a929-4e7041df44cc", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "1d6a47ee-9b08-4305-a597-c0e11c4c5cf9", + "name": "List Banks", + "url": "https://api.paystack.co/bank", + "description": null, + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "72fc0747-0dfd-4d95-9967-d2eec04a1d47", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "219a3e30-67e1-4e60-80cf-ab352e3ee9d2", + "name": "Finalize Invoice", + "url": "https://api.paystack.co/paymentrequest/finalize/ID_OR_CODE", + "description": "Publishes invoice that is draft by sending customer the invoice via email\n\n**Body Params**\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`", + "data": [], + "dataMode": "params", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "240f6fde-40da-4305-9dbe-9c4280ea3c21", + "name": "Fetch Page", + "url": "https://api.paystack.co/page/id_or_plan_code", + "description": null, + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "084139a8-b034-4bc7-97af-8a9d6a6022b9", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "25333027-4fdd-4454-bf65-536c40809cef", + "name": "Submit OTP", + "url": "https://api.paystack.co/charge/submit_otp", + "description": "Submit OTP to complete a charge\n\n**Body Params**\n- **otp** (_required_) - OTP submitted by user\n- **reference** (_required_) - reference for ongoing transaction", + "data": [ + { + "key": "otp", + "value": "123456", + "type": "text" + }, + { + "key": "reference", + "value": "5bwib5v6anhe9xa", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "56062893-9ab5-40f0-a017-17072c219217", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "268b9f2f-013c-4380-9d69-b5b764da18a5", + "name": "List Pages", + "url": "https://api.paystack.co/page", + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **interval** - Filter list by plans with specified interval\n- **amount** - Filter list by plans with specified amount (in kobo)", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "https://api.paystack.co/plan" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "084139a8-b034-4bc7-97af-8a9d6a6022b9", + "headers": "Authorization: https://api.paystack.co/plan\n", + "pathVariables": {} + }, + { + "id": "277970a1-0b1e-4431-90ba-c7b039b59070", + "name": "Fetch Charges in a Batch", + "url": "https://api.paystack.co/bulkcharge/id_or_code/charges", + "description": "This endpoint retrieves the charges associated with a specified batch code. Pagination parameters are available. You can also filter by status. Charge statuses can be `pending`, `success` or `failed`.\n\n**Path Params**\n- **id_or_code** (_required_) - An ID or code for the batch whose charges you want to retrieve.\n\n**Query Params**\n- **status** - `pending`, `success` or `failed`\n- **perPage**\n- **page**\n", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "1696a2d4-2391-4f80-a929-4e7041df44cc", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "288745a8-e595-42c8-8a74-cc2c4dbc4949", + "name": "Finalize Transfer", + "url": "https://api.paystack.co/transfer/finalize_transfer", + "description": "**Body Params**\n- **transfer_code** (_required_) - Transfer code\n- **otp** (_required_) - OTP sent to business phone to verify transfer.", + "data": [ + { + "key": "transfer_code", + "value": "TRF_vsyqdmlzble3uii", + "type": "text" + }, + { + "key": "otp", + "value": "928783", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "4c6d8917-6047-41ca-9df7-153ba844f275", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "29f698b8-6ab0-4f0a-ae6e-c219c24d4581", + "name": "Initiate Bulk Charge", + "url": "https://api.paystack.co/bulkcharge", + "description": "Send an array of objects with authorization codes and amount in kobo so we can process transactions as a batch.\n\n**Body Params**\n- **(no_name)**", + "data": [], + "dataMode": "raw", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "1696a2d4-2391-4f80-a929-4e7041df44cc", + "rawModeData": "[{\n\t\"authorization\": \"AUTH_n95vpedf\", \n\t\"amount\": 2500\n}, \n{\n\t\"authorization\": \"AUTH_ljdt4e4j\", \n\t\"amount\": 1500\n}]", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "2eb46d8f-c694-4ce1-ae2d-ea3a3e8e89a3", + "name": "Initiate Transfer", + "url": "https://api.paystack.co/transfer", + "description": "Status of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’.\n\n**Body Params**\n- **source** (_required_) - Where should we transfer from? Only balance for now\n- **amount** - Amount to transfer in kobo\n- **currency** - NGN\n- **reason**\n- **recipient** (_required_) - Code for transfer recipient\n- **reference** - If specified, the field should be a unique identifier (in lowercase) for the object. Only `-` `,` `_` and alphanumeric characters allowed.", + "data": [ + { + "key": "source", + "value": "balance", + "type": "text" + }, + { + "key": "reason", + "value": "E go better for you", + "type": "text" + }, + { + "key": "amount", + "value": "3794800", + "type": "text" + }, + { + "key": "recipient", + "value": "RCP_gx2wn530m0i3w3m", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "4c6d8917-6047-41ca-9df7-153ba844f275", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "30aedfb9-716d-4c04-a9d8-d9917a5671fb", + "name": "Verify Transaction", + "url": "https://api.paystack.co/transaction/verify/{REFERENCE}", + "description": "**Path Params**\n- **reference** (_required_)", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "e446091c-eefd-4073-a582-4299e3c577de", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "311bde2d-4b78-4710-8331-a5d8b60fb3dd", + "name": "Fetch Subaccount", + "url": "https://api.paystack.co/subaccount/:id_or_slug", + "description": null, + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json", + "enabled": false + } + ], + "method": "GET", + "pathVariableData": [ + { + "key": "id_or_slug", + "value": "" + } + ], + "queryParams": [], + "auth": null, + "events": null, + "folder": "886b67bc-06de-485b-8b9f-0297310ee7db", + "headers": "Authorization: Bearer SECRET_KEY\n//Content-Type: application/json\n", + "pathVariables": { + "id_or_slug": "" + } + }, + { + "id": "3134838c-e543-47cb-9338-90e4868a1e70", + "name": "Send Notification", + "url": "https://api.paystack.co/paymentrequest/notify/ID_OR_CODE", + "description": "**Path Params**\n- **id** - Invoice code for which you want to send a notification for", + "data": [], + "dataMode": "params", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "34e85546-128d-426c-8e55-980de4889852", + "name": "Update Plan", + "url": "https://api.paystack.co/plan/:id_or_plan_code", + "description": "**Body Params**\n- **name** - Name of plan\n- **description** - Short description of plan\n- **amount** - Amount to be charged in kobo. Will override the amount for existing subscriptions.\n- **interval** - Interval in words. Valid intervals are `hourly`, `daily`, `weekly`, `monthly`, `annually`.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers.\n- **send_sms** - Set to false if you don't want text messages to be sent to your customers\n- **currency** - Currency in which amount is set\n- **invoice_limit** - Number of invoices to raise during subscription to this plan. Will not override `invoice_limit` set on active subscriptions.", + "data": [ + { + "key": "name", + "value": "Monthly retainer (renamed)", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "PUT", + "pathVariableData": [ + { + "key": "id_or_plan_code", + "value": "" + } + ], + "queryParams": [], + "auth": null, + "events": null, + "folder": "2bfdf110-b72e-4cc1-a7ba-73fa32369750", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": { + "id_or_plan_code": "" + } + }, + { + "id": "3828fd62-ac56-4173-b1f7-4e7a9736a07d", + "name": "List Transactions", + "url": "https://api.paystack.co/transaction", + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **customer** - Specify an ID for the customer whose transactions you want to retrieve\n- **status** - Filter transactions by status ('failed', 'success', 'abandoned')\n- **from** - A timestamp from which to start listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21\n- **to** - A timestamp at which to stop listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21\n- **amount** - Filter transactions by amount. Specify the amount in kobo.", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "e446091c-eefd-4073-a582-4299e3c577de", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "3f87dee8-ad19-4f7a-8861-ae5220497c0b", + "name": "List Invoices", + "url": "https://api.paystack.co/paymentrequest", + "description": "**Query Params**\n- **customer** - Specify an ID for the customer whose requests you want to retrieve\n- **status** - Filter requests by status ('failed', 'success', 'abandoned')\n- **currency** - Filter requests sent in a particular currency.\n- **paid** - Filter requests that have been paid for \n- **include_archive** - Includes archived requests in the response\n- **payment_request** - Filter specific invoice by passing invoice code", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEYS" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", + "headers": "Authorization: Bearer SECRET_KEYS\n", + "pathVariables": {} + }, + { + "id": "42d4a271-8b1e-4297-95d9-69e0727c2e9a", + "name": "Update Customer", + "url": "https://api.paystack.co/customer/:ID_OR_CUSTOMER_CODE", + "description": "**Body Params**\n- **first_name** - Customer's first name\n- **last_name** - Customer's last name\n- **phone** - Customer's phone number\n- **metadata** - A set of key/value pairs that you can attach to the customer. It can be used to store additional information in a structured format.", + "data": [ + { + "key": "email", + "value": "customer@email.com", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "PUT", + "pathVariableData": [ + { + "key": "ID_OR_CUSTOMER_CODE", + "value": "" + } + ], + "queryParams": [], + "auth": null, + "events": null, + "folder": "4abcb36b-0005-4397-8452-1ad6f66e8ec3", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": { + "ID_OR_CUSTOMER_CODE": "" + } + }, + { + "id": "455653a6-e83a-4170-b1c5-26c10c521be8", + "name": "Fetch Subscription", + "url": "https://api.paystack.co/subscription/:id_or_subscription_code", + "description": null, + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [ + { + "key": "id_or_subscription_code", + "value": "" + } + ], + "queryParams": [], + "auth": null, + "events": null, + "folder": "958cdff8-98b1-4e14-93c5-512ae20a253e", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": { + "id_or_subscription_code": "" + } + }, + { + "id": "475a22fa-d9d9-4aad-9daa-551aac93df21", + "name": "Verify Transfer", + "url": "https://api.paystack.co/transfer/verify/{reference}", + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "4c6d8917-6047-41ca-9df7-153ba844f275", + "responses": [ + { + "id": "70d3564d-bcdf-4f53-b579-80eea2209e67", + "name": "200 OK", + "status": "OK", + "mime": "", + "language": "json", + "text": "{\n \"status\": true,\n \"message\": \"Transfer retrieved\",\n \"data\": {\n \"integration\": 119333,\n \"recipient\": {\n \"domain\": \"test\",\n \"type\": \"nuban\",\n \"currency\": \"NGN\",\n \"name\": \"Zombie\",\n \"details\": {\n \"account_number\": \"0100000001\",\n \"account_name\": null,\n \"bank_code\": \"044\",\n \"bank_name\": \"Access Bank\"\n },\n \"description\": \"Zombier\",\n \"metadata\": \"\",\n \"recipient_code\": \"RCP_c2mty1w1uvd4av4\",\n \"active\": true,\n \"email\": null,\n \"id\": 31911,\n \"integration\": 119333,\n \"createdAt\": \"2017-10-13T20:35:51.000Z\",\n \"updatedAt\": \"2017-10-13T20:35:51.000Z\"\n },\n \"domain\": \"test\",\n \"amount\": 50000,\n \"currency\": \"NGN\",\n \"reference\": \"ref_demo\",\n \"source\": \"balance\",\n \"source_details\": null,\n \"reason\": \"Test for reference\",\n \"status\": \"success\",\n \"failures\": null,\n \"transfer_code\": \"TRF_kjati32r73poyt5\",\n \"titan_code\": null,\n \"transferred_at\": null,\n \"id\": 476948,\n \"createdAt\": \"2018-07-22T10:29:33.000Z\",\n \"updatedAt\": \"2018-07-22T10:29:33.000Z\"\n }\n}", + "responseCode": { + "code": 200, + "name": "OK", + "detail": "" + }, + "requestObject": { + "id": "31563353-eef7-4edf-84fc-f3746ca31900", + "method": "GET", + "headers": "Authorization: Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", + "dataMode": null, + "data": null, + "rawModeData": "", + "url": "https://api.paystack.co/transfer/verify/ref_demo", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", + "type": "text", + "enabled": true + } + ] + }, + "headers": [ + { + "key": "Access-Control-Allow-Origin", + "value": "*", + "name": "Access-Control-Allow-Origin", + "description": "Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource." + }, + { + "key": "CF-RAY", + "value": "43e53a928e146aa3-LHR", + "name": "CF-RAY", + "description": "Custom header" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "Options that are desired for the connection" + }, + { + "key": "Content-Encoding", + "value": "gzip", + "name": "Content-Encoding", + "description": "The type of encoding used on the data." + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "The mime type of this content" + }, + { + "key": "Date", + "value": "Sun, 22 Jul 2018 10:29:53 GMT", + "name": "Date", + "description": "The date and time that the message was sent" + }, + { + "key": "ETag", + "value": "W/\"44d-4mT+Xrgu45ptaJZbn63klw\"", + "name": "ETag", + "description": "An identifier for a specific version of a resource, often a message digest" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "Custom header" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "A name for the server" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains." + }, + { + "key": "Transfer-Encoding", + "value": "chunked", + "name": "Transfer-Encoding", + "description": "The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity." + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "The only defined value, \"nosniff\", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "Specifies the technology (ASP.NET, PHP, JBoss, e.g.) supporting the web application (version details are often in X-Runtime, X-Version, or X-AspNet-Version)" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3Acb7Xs6Sj6FPGDaV8tKBz7NLBoo97xD_Z.oTz8CdXKHPnva4Do7jCswOt4s5mkOQsSG52PMkr%2Fpb0; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "an HTTP cookie" + } + ], + "cookies": [ + { + "expirationDate": "Fri Apr 19 2019 18:10:52 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d70b94619eafb5cf44f6917a3e277cbc11524161452", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3Acb7Xs6Sj6FPGDaV8tKBz7NLBoo97xD_Z.oTz8CdXKHPnva4Do7jCswOt4s5mkOQsSG52PMkr%2Fpb0", + "name": "sails.sid" + } + ], + "request": "475a22fa-d9d9-4aad-9daa-551aac93df21", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "4a66b2b2-6a4b-4fb7-85ae-0a296263359d", + "name": "Create Refund", + "url": "https://api.paystack.co/refund", + "description": "This creates a refund which is then processed by the Paystack team\n\n**Body Params**\n- **transaction** _(required)_: Identifier for transaction to be refunded\n- **amount** _(optional)_: How much in kobo to be refunded to the customer. Amount is optional(defaults to original transaction amount) and cannot be more than the original transaction amount.\n- **currency**: Three-letter ISO currency\n- **customer_note** _(optional)_: customer reason\n- **merchant_note** _(optional)_: merchant reason", + "data": [ + { + "key": "transaction", + "value": "12794872", + "type": "text" + }, + { + "key": "amount", + "value": "50000", + "type": "text" + }, + { + "key": "currency", + "value": "NGN", + "type": "text" + }, + { + "key": "merchant_note", + "value": "yada yada", + "type": "text" + }, + { + "key": "customer_note", + "value": "blah blah", + "type": "text" + } + ], + "dataMode": "params", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "08b275ca-4233-4ac3-92a2-5224a4f63146", + "responses": [ + { + "id": "8260595a-9152-45f6-a700-62618dbd9461", + "name": "Create Refund", + "status": "Created", + "mime": "", + "language": "json", + "text": "{\n \"status\": true,\n \"message\": \"Refund created successfully\",\n \"data\": {\n \"dispute\": 5238,\n \"transaction\": {\n \"reference\": \"1517474242_6122RNV2MR\",\n \"domain\": \"test\",\n \"status\": \"reversed\",\n \"message\": null,\n \"original_amount\": 50750,\n \"amount\": 50750,\n \"authorized_amount\": null,\n \"captured_amount\": null,\n \"gateway\": \"\",\n \"otp_identifier\": null,\n \"quantity\": 1,\n \"channel\": \"card\",\n \"gateway_response\": \"Successful\",\n \"receipt_number\": null,\n \"merchant_transaction_reference\": null,\n \"authorization_code\": \"AUTH_jryeoytyxx\",\n \"authorization_url\": null,\n \"authorization_url_valid\": null,\n \"authorization_url_accessed_at\": null,\n \"authorization_url_access_count\": null,\n \"currency\": \"NGN\",\n \"logged_for_settlement\": \"ignored\",\n \"settled\": true,\n \"metadata\": {\n \"custom_fields\": [\n {\n \"display_name\": \"Full Name\",\n \"variable_name\": \"Full_Name\",\n \"type\": \"text\",\n \"value\": \"Stephen Amaza\"\n },\n {\n \"display_name\": \"Quantity\",\n \"variable_name\": \"Quantity\",\n \"type\": \"text\",\n \"value\": 1\n },\n {\n \"display_name\": \"Phone Number\",\n \"variable_name\": \"Phone_Number\",\n \"type\": \"text\",\n \"value\": 9085662909\n },\n {\n \"display_name\": \"Address\",\n \"variable_name\": \"Address\",\n \"type\": \"text\",\n \"value\": \"3 Ladoke Akintola Rd, GRA\"\n },\n {\n \"display_name\": \"Datepicker Title\",\n \"variable_name\": \"Datepicker_Title\",\n \"type\": \"text\",\n \"value\": \"02/23/2018\"\n },\n {\n \"display_name\": \"Unit Price\",\n \"variable_name\": \"Unit_Price\",\n \"type\": \"text\",\n \"value\": \"NGN500\"\n }\n ],\n \"referrer\": \"http://localhost:8888/page/\"\n },\n \"additional_parameters\": null,\n \"response\": null,\n \"transaction_number\": null,\n \"payment_page\": \"0\",\n \"bin\": \"408408\",\n \"country_code\": null,\n \"ip_address\": \"41.184.178.86\",\n \"ip_address_geo\": null,\n \"paidAt\": \"2018-02-01T08:38:08.000Z\",\n \"fees\": 761,\n \"deviceid\": \"648cbc1f3cd6f5cfc8e0fc621d33c06e\",\n \"callback_url\": null,\n \"label\": \"0\",\n \"dss_verdict\": null,\n \"log\": {\n \"time_spent\": 48,\n \"attempts\": 1,\n \"authentication\": null,\n \"errors\": 0,\n \"success\": true,\n \"mobile\": false,\n \"input\": [],\n \"channel\": null,\n \"history\": [\n {\n \"type\": \"input\",\n \"message\": \"Filled these fields: card number, card expiry, card cvv\",\n \"time\": 45\n },\n {\n \"type\": \"action\",\n \"message\": \"Attempted to pay\",\n \"time\": 45\n },\n {\n \"type\": \"success\",\n \"message\": \"Successfully paid\",\n \"time\": 47\n },\n {\n \"type\": \"close\",\n \"message\": \"Page closed\",\n \"time\": 48\n }\n ]\n },\n \"subaccount_code\": null,\n \"fees_split\": null,\n \"errorcategory\": null,\n \"errorcode\": null,\n \"id\": 12794872,\n \"integration\": 119333,\n \"customer\": 834733,\n \"coupon\": 0,\n \"plan\": 0,\n \"subscription\": null,\n \"invoice\": null,\n \"payment_request\": 0,\n \"authorization\": 3878861,\n \"settlement\": null,\n \"subaccount\": null,\n \"createdAt\": \"2018-02-01T08:37:24.000Z\",\n \"updatedAt\": \"2018-02-13T13:57:56.000Z\"\n },\n \"currency\": \"NGN\",\n \"amount\": 50000,\n \"channel\": \"\",\n \"customer_note\": \"blah blah\",\n \"merchant_note\": \"yada yada\",\n \"integration\": 119333,\n \"domain\": \"test\",\n \"status\": \"pending\",\n \"refunded_by\": \"steve@paystack.com\",\n \"refunded_at\": \"2018-02-13T13:57:56.549Z\",\n \"expected_at\": \"2018-02-20T13:57:56.000Z\",\n \"fully_deducted\": false,\n \"id\": 763,\n \"createdAt\": \"2018-02-13T13:57:56.551Z\",\n \"updatedAt\": \"2018-02-13T13:57:56.551Z\"\n }\n}", + "responseCode": { + "code": 201, + "name": "Created", + "detail": "" + }, + "requestObject": { + "id": "01464721-62f6-4dad-98c0-f2f2b48cbe6c", + "method": "POST", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json", + "dataMode": "params", + "data": [ + { + "key": "transaction", + "value": "12794872", + "type": "text" + }, + { + "key": "amount", + "value": "50000", + "type": "text" + }, + { + "key": "currency", + "value": "NGN", + "type": "text" + }, + { + "key": "merchant_note", + "value": "yada yada", + "type": "text" + }, + { + "key": "customer_note", + "value": "blah blah", + "type": "text" + } + ], + "rawModeData": "", + "url": "https://api.paystack.co/refund", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ] + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3ec84cb3ced506f4-LHR", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Length", + "value": "4189", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Tue, 13 Feb 2018 13:57:56 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"105d-5iUBG4flE1Tc2HYDTeyHIw\"", + "name": "ETag", + "description": "" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "Vary", + "value": "X-HTTP-Method-Override", + "name": "Vary", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3AvpsEWq6L5AUz3A8uLCZNFSPK7kEtBNbN.BxOcb504gxj4FQ09n9CmxWYSoEPViK5AUXt68C8zkZ8; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3AvpsEWq6L5AUz3A8uLCZNFSPK7kEtBNbN.BxOcb504gxj4FQ09n9CmxWYSoEPViK5AUXt68C8zkZ8", + "name": "sails.sid" + } + ], + "request": "4a66b2b2-6a4b-4fb7-85ae-0a296263359d", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "4aac7fb7-2f46-4f47-80ff-3215dae57f94", + "name": "Resolve Account Number", + "url": "https://api.paystack.co/bank/resolve?account_number=ACCOUNT_NUMBER&bank_code=BANK_CODE", + "description": "**Path Params**\n- **account_number** - Account Number\n- **bank_code** - Bank Code", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [ + { + "key": "account_number", + "value": "ACCOUNT_NUMBER" + }, + { + "key": "bank_code", + "value": "BANK_CODE" + } + ], + "auth": null, + "events": null, + "folder": "65cf7432-1b38-403b-9d51-4d77aed89f7c", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "50c32a6c-8e70-486a-9468-ad0694a0dce9", + "name": "View Invoice", + "url": "https://api.paystack.co/paymentrequest/REQUEST_ID_OR_CODE", + "description": "**Path Params**\n- **id** _(required)_ - An ID for the Invoice", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "56989ea8-1cd4-4a11-a2e1-003f3d9b118b", + "name": "Update Payment Session Timeout", + "url": "https://api.paystack.co/integration/payment_session_timeout", + "description": "**Query Params**\n- **timeout** - Time before stopping session (in seconds). Set to 0 to cancel session timeouts", + "data": [], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "PUT", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "9b923444-b195-452e-b534-8dbb98905930", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "6643a92f-c2ee-4010-8f50-cbe07103ffae", + "name": "View Transaction Timeline", + "url": "https://api.paystack.co/transaction/timeline/:id_or_reference", + "description": null, + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [ + { + "key": "id_or_reference", + "value": "" + } + ], + "queryParams": [], + "auth": null, + "events": null, + "folder": "e446091c-eefd-4073-a582-4299e3c577de", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": { + "id_or_reference": "" + } + }, + { + "id": "68981e59-4687-4cfd-993a-140725f16582", + "name": "Create Subscription", + "url": "https://api.paystack.co/subscription", + "description": "**Body Params**\n- **customer** (_required_) - Customer's email address or customer code\n- **plan** (_required_) - Plan code\n- **authorization** - If customer has multiple authorizations, you can set the desired authorization you wish to use for this subscription here. If this is not supplied, the customer's most recent authorization would be used\n- **start_date** - Set the date for the first debit. (ISO 8601 format)\n\nNote the `email_token` attribute for the subscription object. We create one on each subscription so customers can cancel their subscriptions from within the invoices sent to their mailboxes. Since they are not authorized, the email tokens are what we use to authenticate the requests over the API.", + "data": [ + { + "key": "customer", + "value": "CUS_xnxdt6s1zg1f4nx", + "type": "text" + }, + { + "key": "plan", + "value": "PLN_gx2wn530m0i3w3m", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "958cdff8-98b1-4e14-93c5-512ae20a253e", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "696647d0-b1f2-4746-a238-7ac1f1d41514", + "name": "Delete Transfer Receipient", + "url": "https://api.paystack.co/transferrecipient/{recipient_code_or_id}", + "description": null, + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "DELETE", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "058c5fce-45d9-49b3-b243-2bd3489f42e9", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "6a02589a-001b-4c16-bd7f-d1ad880ef207", + "name": "Resolve BVN", + "url": "https://api.paystack.co/bank/resolve_bvn/{BVN}", + "description": "**Path Params**\n- **bvn** (_required_) - 11 digit BVN", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "65cf7432-1b38-403b-9d51-4d77aed89f7c", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "77203a76-a23a-45a4-ac6f-61f6f6d46f35", + "name": "Fetch Refund", + "url": "https://api.paystack.co/refund/:id", + "description": "**Path Params**\n- **id** - ID of the transaction to be refunded", + "data": null, + "dataOptions": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [ + { + "key": "id", + "value": "" + } + ], + "queryParams": [], + "auth": null, + "events": null, + "folder": "588455d8-920a-4aec-a63c-b29486d03e4f", + "responses": [ + { + "id": "c097db1e-f81a-4651-a7af-a1944ddfe434", + "name": "Fetch Refund", + "status": "Unauthorized", + "mime": "", + "language": "json", + "text": "\n{\n \"status\": true,\n \"message\": \"Refund retrieved\",\n \"data\": {\n \"integration\": 100982,\n \"transaction\": 1641,\n \"dispute\": null,\n \"settlement\": null,\n \"domain\": \"live\",\n \"amount\": 500000,\n \"deducted_amount\": 500000,\n \"fully_deducted\": true,\n \"currency\": \"NGN\",\n \"channel\": \"migs\",\n \"status\": \"processed\",\n \"refunded_by\": \"eseyinwale@gmail.com\",\n \"refunded_at\": \"2018-01-12T10:54:47.000Z\",\n \"expected_at\": \"2017-10-01T21:10:59.000Z\",\n \"customer_note\": \"xxx\",\n \"merchant_note\": \"xxx\",\n \"id\": 1,\n \"createdAt\": \"2017-09-24T21:10:59.000Z\",\n \"updatedAt\": \"2018-01-18T11:59:56.000Z\"\n }\n}", + "responseCode": { + "code": 401, + "name": "Unauthorized", + "detail": "" + }, + "requestObject": { + "id": "963c2fb9-5ccd-4abf-85d3-9c6495af161d", + "method": "GET", + "headers": "Authorization: Bearer SECRET_KEY", + "dataMode": null, + "data": null, + "rawModeData": "", + "pathVariables": { + "id": "" + }, + "url": "https://api.paystack.co/refund/:id", + "pathVariableData": [ + { + "key": "id", + "value": "" + } + ], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY", + "enabled": true + } + ] + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3ebe98edefd50a84-LHR", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Length", + "value": "49", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Mon, 12 Feb 2018 09:42:21 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"31-TcCODO2pQ5hz9TTU0Rc5Eg\"", + "name": "ETag", + "description": "" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3A9hOGFH6HMzoKQ7SDjRZ2DDLIqdtnTyWJ.gz9UiPJ0Y%2BOxSf7xuav9YvSLw951S%2BBg%2BoB7pFBBi%2FI; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3A9hOGFH6HMzoKQ7SDjRZ2DDLIqdtnTyWJ.gz9UiPJ0Y%2BOxSf7xuav9YvSLw951S%2BBg%2BoB7pFBBi%2FI", + "name": "sails.sid" + } + ], + "request": "77203a76-a23a-45a4-ac6f-61f6f6d46f35", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": { + "id": "" + } + }, + { + "id": "773461c5-9baa-4c38-92f1-68f9e55f4bd0", + "name": "Invoice Total", + "url": "https://api.paystack.co/paymentrequest/totals", + "description": null, + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "7aa585e2-2e5c-4915-a9a5-01cb22cd2070", + "name": "Charge Authorization", + "url": "https://api.paystack.co/transaction/charge_authorization", + "description": "**Body Params**\n- **reference** - Unique transaction reference. Only `-` `,` `.` `,` `=` and alphanumeric characters allowed. System will generate one if none is provided\n- **authorization_code** - (_required_) Valid authorization code to charge\n- **amount** - (_required_) Amount in kobo\n- **plan** - If transaction is to create a subscription to a predefined plan, provide plan code here\n- **currency** - Currency in which amount should be charged\n- ** email** (_required_) - Customer's email address\n- **metadata** - Add a `custom_fields` attribute which has an array of objects if you would like the fields to be added to your transaction when displayed on the dashboard.\n- **subaccount** - The code for the subaccount that owns the payment.\n- **transaction_charge** - A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split).\n- **bearer** - Who bears Paystack charges? `account` or `subaccount`?\n- **invoice_limit** - Number of invoices to raise during the subscription. Overrides `invoice_limit` set on plan.", + "data": [ + { + "key": "authorization_code", + "value": "AUTH_CODE", + "type": "text" + }, + { + "key": "email", + "value": "customer@email.com", + "type": "text" + }, + { + "key": "amount", + "value": "500000", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "e446091c-eefd-4073-a582-4299e3c577de", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "7f24265a-4e43-4839-8b59-b3b6758532ae", + "name": "Update Invoice", + "url": "https://api.paystack.co/paymentrequest/ID_OR_CODE", + "description": "**Body Params**\n- **description**\n- **amount**\n- **line_item**\n- **tax**\n- **due_date**\n- **metadata**\n- **send_notification**\n- **currency** - only works in draft mode\n- **customer** - only works in draft mode", + "data": [ + { + "key": "amount", + "value": "100000", + "type": "text" + } + ], + "dataMode": "params", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "PUT", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "809a38f9-979d-4db7-b997-30709de84dad", + "name": "Disable OTP requirement for Transfers", + "url": "https://api.paystack.co/transfer/disable_otp", + "description": "In the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. You will get an OTP.\n\nIn the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. An OTP is sent to you on your business phone.", + "data": [], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "82798ee0-0592-41fe-b2e8-e267a7e5b39b", + "name": "Submit PIN", + "url": "https://api.paystack.co/charge/submit_pin", + "description": "**Body Params**\n- **pin** (_required_) - PIN submitted by user\n- **reference** (_required_) - reference for transaction that requested pin", + "data": [ + { + "key": "pin", + "value": "", + "type": "text" + }, + { + "key": "reference", + "value": "", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "56062893-9ab5-40f0-a017-17072c219217", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "847209c5-9d03-4364-9f44-c8fa666371c8", + "name": "Enable OTP requirement for Transfers", + "url": "https://api.paystack.co/transfer/enable_otp", + "description": "In the event that a customer wants to stop being able to complete transfers programmatically, this endpoint helps turn OTP requirement back on. No arguments required.", + "data": [], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "8c25557c-11ce-45e7-9970-3b2eb9666a6b", + "name": "Create Plan", + "url": "https://api.paystack.co/plan", + "description": "**Body Params**\n- **name** (_required_) - Name of plan\n- **description** - Short description of plan\n- **amount** (_required_) - Amount to be charged in kobo\n- **interval** (_required_) - Interval in words. Valid intervals are `hourly`, `daily`, `weekly`, `monthly`, `annually`.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers\n- **currency** - Currency in which amount is set\n- **invoice_limit** - Number of invoices to raise during subscription to this plan. Can be overridden by specifying an `invoice_limit` while subscribing.", + "data": [ + { + "key": "name", + "value": "Monthly retainer", + "type": "text" + }, + { + "key": "interval", + "value": "monthly", + "type": "text" + }, + { + "key": "amount", + "value": "500000", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "2bfdf110-b72e-4cc1-a7ba-73fa32369750", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "8c42b41f-1b9a-43f3-80bf-7094c6cbb1e6", + "name": "List Disputes", + "url": "https://api.paystack.co/refund?from&to&page&perPage&transaction&status", + "description": "This lists all the disputes logged against your transactions\n\n**Query Params**\n- **transaction** _(required)_: Identifier for transaction to be refunded\n- **amount** _(optional)_: How much in kobo to be refunded to the customer. Amount is optional(defaults to original transaction amount) and cannot be more than the original transaction amount.\n- **currency**: Three-letter ISO currency\n- **customer_note** _(optional)_: customer reason\n- **merchant_note** _(optional)_: merchant reason", + "data": [ + { + "key": "transaction", + "value": "12794872", + "type": "text" + }, + { + "key": "amount", + "value": "50000", + "type": "text" + }, + { + "key": "currency", + "value": "NGN", + "type": "text" + }, + { + "key": "merchant_note", + "value": "yada yada", + "type": "text" + }, + { + "key": "customer_note", + "value": "blah blah", + "type": "text" + } + ], + "dataOptions": null, + "dataMode": "params", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [ + { + "key": "from", + "value": "", + "equals": false, + "description": "Start date", + "enabled": true + }, + { + "key": "to", + "value": "", + "equals": false, + "description": "End date", + "enabled": true + }, + { + "key": "page", + "value": "", + "equals": false, + "description": "Page Number", + "enabled": true + }, + { + "key": "perPage", + "value": "", + "equals": false, + "description": "Number of records to show per page", + "enabled": true + }, + { + "key": "transaction", + "value": "", + "equals": false, + "description": "Transaction Id", + "enabled": true + }, + { + "key": "status", + "value": "", + "equals": false, + "description": "Dispute Status. Acceptable values: { awaiting-merchant-feedback | awaiting-bank-feedback | pending | resolved }", + "enabled": true + } + ], + "auth": null, + "events": null, + "folder": "588455d8-920a-4aec-a63c-b29486d03e4f", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "responses": [ + { + "id": "7d4dee7f-c9d7-456b-8777-6dc7c5cbccf3", + "name": "Create Refund", + "status": "Created", + "mime": "", + "language": "json", + "text": "{\n \"status\": true,\n \"message\": \"Refund created successfully\",\n \"data\": {\n \"dispute\": 5238,\n \"transaction\": {\n \"reference\": \"1517474242_6122RNV2MR\",\n \"domain\": \"test\",\n \"status\": \"reversed\",\n \"message\": null,\n \"original_amount\": 50750,\n \"amount\": 50750,\n \"authorized_amount\": null,\n \"captured_amount\": null,\n \"gateway\": \"\",\n \"otp_identifier\": null,\n \"quantity\": 1,\n \"channel\": \"card\",\n \"gateway_response\": \"Successful\",\n \"receipt_number\": null,\n \"merchant_transaction_reference\": null,\n \"authorization_code\": \"AUTH_jryeoytyxx\",\n \"authorization_url\": null,\n \"authorization_url_valid\": null,\n \"authorization_url_accessed_at\": null,\n \"authorization_url_access_count\": null,\n \"currency\": \"NGN\",\n \"logged_for_settlement\": \"ignored\",\n \"settled\": true,\n \"metadata\": {\n \"custom_fields\": [\n {\n \"display_name\": \"Full Name\",\n \"variable_name\": \"Full_Name\",\n \"type\": \"text\",\n \"value\": \"Stephen Amaza\"\n },\n {\n \"display_name\": \"Quantity\",\n \"variable_name\": \"Quantity\",\n \"type\": \"text\",\n \"value\": 1\n },\n {\n \"display_name\": \"Phone Number\",\n \"variable_name\": \"Phone_Number\",\n \"type\": \"text\",\n \"value\": 9085662909\n },\n {\n \"display_name\": \"Address\",\n \"variable_name\": \"Address\",\n \"type\": \"text\",\n \"value\": \"3 Ladoke Akintola Rd, GRA\"\n },\n {\n \"display_name\": \"Datepicker Title\",\n \"variable_name\": \"Datepicker_Title\",\n \"type\": \"text\",\n \"value\": \"02/23/2018\"\n },\n {\n \"display_name\": \"Unit Price\",\n \"variable_name\": \"Unit_Price\",\n \"type\": \"text\",\n \"value\": \"NGN500\"\n }\n ],\n \"referrer\": \"http://localhost:8888/page/\"\n },\n \"additional_parameters\": null,\n \"response\": null,\n \"transaction_number\": null,\n \"payment_page\": \"0\",\n \"bin\": \"408408\",\n \"country_code\": null,\n \"ip_address\": \"41.184.178.86\",\n \"ip_address_geo\": null,\n \"paidAt\": \"2018-02-01T08:38:08.000Z\",\n \"fees\": 761,\n \"deviceid\": \"648cbc1f3cd6f5cfc8e0fc621d33c06e\",\n \"callback_url\": null,\n \"label\": \"0\",\n \"dss_verdict\": null,\n \"log\": {\n \"time_spent\": 48,\n \"attempts\": 1,\n \"authentication\": null,\n \"errors\": 0,\n \"success\": true,\n \"mobile\": false,\n \"input\": [],\n \"channel\": null,\n \"history\": [\n {\n \"type\": \"input\",\n \"message\": \"Filled these fields: card number, card expiry, card cvv\",\n \"time\": 45\n },\n {\n \"type\": \"action\",\n \"message\": \"Attempted to pay\",\n \"time\": 45\n },\n {\n \"type\": \"success\",\n \"message\": \"Successfully paid\",\n \"time\": 47\n },\n {\n \"type\": \"close\",\n \"message\": \"Page closed\",\n \"time\": 48\n }\n ]\n },\n \"subaccount_code\": null,\n \"fees_split\": null,\n \"errorcategory\": null,\n \"errorcode\": null,\n \"id\": 12794872,\n \"integration\": 119333,\n \"customer\": 834733,\n \"coupon\": 0,\n \"plan\": 0,\n \"subscription\": null,\n \"invoice\": null,\n \"payment_request\": 0,\n \"authorization\": 3878861,\n \"settlement\": null,\n \"subaccount\": null,\n \"createdAt\": \"2018-02-01T08:37:24.000Z\",\n \"updatedAt\": \"2018-02-13T13:57:56.000Z\"\n },\n \"currency\": \"NGN\",\n \"amount\": 50000,\n \"channel\": \"\",\n \"customer_note\": \"blah blah\",\n \"merchant_note\": \"yada yada\",\n \"integration\": 119333,\n \"domain\": \"test\",\n \"status\": \"pending\",\n \"refunded_by\": \"steve@paystack.com\",\n \"refunded_at\": \"2018-02-13T13:57:56.549Z\",\n \"expected_at\": \"2018-02-20T13:57:56.000Z\",\n \"fully_deducted\": false,\n \"id\": 763,\n \"createdAt\": \"2018-02-13T13:57:56.551Z\",\n \"updatedAt\": \"2018-02-13T13:57:56.551Z\"\n }\n}", + "responseCode": { + "code": 201, + "name": "Created", + "detail": "" + }, + "requestObject": { + "id": "01464721-62f6-4dad-98c0-f2f2b48cbe6c", + "method": "POST", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json", + "dataMode": "params", + "data": [ + { + "key": "transaction", + "value": "12794872", + "type": "text" + }, + { + "key": "amount", + "value": "50000", + "type": "text" + }, + { + "key": "currency", + "value": "NGN", + "type": "text" + }, + { + "key": "merchant_note", + "value": "yada yada", + "type": "text" + }, + { + "key": "customer_note", + "value": "blah blah", + "type": "text" + } + ], + "rawModeData": "", + "url": "https://api.paystack.co/refund", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ] + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3ec84cb3ced506f4-LHR", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Length", + "value": "4189", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Tue, 13 Feb 2018 13:57:56 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"105d-5iUBG4flE1Tc2HYDTeyHIw\"", + "name": "ETag", + "description": "" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "Vary", + "value": "X-HTTP-Method-Override", + "name": "Vary", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3AvpsEWq6L5AUz3A8uLCZNFSPK7kEtBNbN.BxOcb504gxj4FQ09n9CmxWYSoEPViK5AUXt68C8zkZ8; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3AvpsEWq6L5AUz3A8uLCZNFSPK7kEtBNbN.BxOcb504gxj4FQ09n9CmxWYSoEPViK5AUXt68C8zkZ8", + "name": "sails.sid" + } + ], + "request": "8c42b41f-1b9a-43f3-80bf-7094c6cbb1e6", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "8d605bc9-6eb8-4ee2-9180-ad3683f00ff7", + "name": "List Plans", + "url": "https://api.paystack.co/plan", + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **interval** - Filter list by plans with specified interval\n- **amount** - Filter list by plans with specified amount (in kobo)", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "2bfdf110-b72e-4cc1-a7ba-73fa32369750", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "99dc16de-6c99-4ea7-8254-fa57f73bfbe2", + "name": "Submit Birthday", + "url": "https://api.paystack.co/charge/submit_birthday", + "description": "Submit Birthday when requested\n\n**Body Params**\n- **birthday** (_required_) - Birthday number submitted by user\n- **reference** (_required_) - reference for ongoing transaction", + "data": [], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "56062893-9ab5-40f0-a017-17072c219217", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "9aa0cd8c-a4aa-4400-b9f9-3423dd4e759a", + "name": "Fetch Plan", + "url": "https://api.paystack.co/plan/id_or_plan_code", + "description": null, + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "2bfdf110-b72e-4cc1-a7ba-73fa32369750", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "9b543458-0505-4a68-acdb-68d55c9b1943", + "name": "Fetch Refund", + "url": "https://api.paystack.co/refund/:id", + "description": "**Path Params**\n- **id** - ID of the transaction to be refunded", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [ + { + "key": "id", + "value": "" + } + ], + "queryParams": [], + "auth": null, + "events": null, + "folder": "08b275ca-4233-4ac3-92a2-5224a4f63146", + "responses": [ + { + "id": "8c33f6fb-089d-4df4-8abf-3e73e4ff2a71", + "name": "Fetch Refund", + "status": "Unauthorized", + "mime": "", + "language": "json", + "text": "\n{\n \"status\": true,\n \"message\": \"Refund retrieved\",\n \"data\": {\n \"integration\": 100982,\n \"transaction\": 1641,\n \"dispute\": null,\n \"settlement\": null,\n \"domain\": \"live\",\n \"amount\": 500000,\n \"deducted_amount\": 500000,\n \"fully_deducted\": true,\n \"currency\": \"NGN\",\n \"channel\": \"migs\",\n \"status\": \"processed\",\n \"refunded_by\": \"eseyinwale@gmail.com\",\n \"refunded_at\": \"2018-01-12T10:54:47.000Z\",\n \"expected_at\": \"2017-10-01T21:10:59.000Z\",\n \"customer_note\": \"xxx\",\n \"merchant_note\": \"xxx\",\n \"id\": 1,\n \"createdAt\": \"2017-09-24T21:10:59.000Z\",\n \"updatedAt\": \"2018-01-18T11:59:56.000Z\"\n }\n}", + "responseCode": { + "code": 401, + "name": "Unauthorized", + "detail": "" + }, + "requestObject": { + "id": "963c2fb9-5ccd-4abf-85d3-9c6495af161d", + "method": "GET", + "headers": "Authorization: Bearer SECRET_KEY", + "dataMode": null, + "data": null, + "rawModeData": "", + "pathVariables": { + "id": "" + }, + "url": "https://api.paystack.co/refund/:id", + "pathVariableData": [ + { + "key": "id", + "value": "" + } + ], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY", + "enabled": true + } + ] + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3ebe98edefd50a84-LHR", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Length", + "value": "49", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Mon, 12 Feb 2018 09:42:21 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"31-TcCODO2pQ5hz9TTU0Rc5Eg\"", + "name": "ETag", + "description": "" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3A9hOGFH6HMzoKQ7SDjRZ2DDLIqdtnTyWJ.gz9UiPJ0Y%2BOxSf7xuav9YvSLw951S%2BBg%2BoB7pFBBi%2FI; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3A9hOGFH6HMzoKQ7SDjRZ2DDLIqdtnTyWJ.gz9UiPJ0Y%2BOxSf7xuav9YvSLw951S%2BBg%2BoB7pFBBi%2FI", + "name": "sails.sid" + } + ], + "request": "9b543458-0505-4a68-acdb-68d55c9b1943", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": { + "id": "" + } + }, + { + "id": "9bdce8ac-0d49-46bc-a4cb-c1116a1dcf2c", + "name": "List Customers", + "url": "https://api.paystack.co/customer", + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "4abcb36b-0005-4397-8452-1ad6f66e8ec3", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "9f56c0a9-ef8e-4fcc-9886-48b75966cf9f", + "name": "Initiate Bulk Transfer", + "url": "https://api.paystack.co/transfer/bulk", + "description": "You need to disable the Transfers OTP requirement to use this endpoint.\n\n**Body Params**\n- **(no name)**\n\nStatus of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’.", + "data": [], + "dataMode": "raw", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "4c6d8917-6047-41ca-9df7-153ba844f275", + "rawModeData": "{\n\t\"currency\": \"NGN\",\n\t\"source\": \"balance\",\n\t\"transfers\": [\n\t\t{\n\t\t\"amount\": 50000,\n\t\t\"recipient\": \"RCP_db342dvqvz9qcrn\"\n\t\t},\n\t\t{\n\t\t\"amount\": 50000,\n\t\t\"recipient\": \"RCP_db342dvqvz9qcrn\"\n\t\t}\n\t]\n}", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "a6755315-7c75-4c11-8709-1447ad19c2d2", + "name": "Tokenize payment instrument before a charge", + "url": "https://api.paystack.co/charge/tokenize", + "description": "Send an array of objects with authorization codes and amount in kobo so we can process transactions as a batch.\n\n**Body Params**\n- **email** (_required_) - Customer's email address\n- **card** (_required_) - Card to tokenize\n- **card.number** (_required_) - Card to tokenize\n- **card.cvv** (_required_) - Card security code\n- **card.expiry_month** (_required_) - Expiry month of card\n- **card.expiry_year** (_required_) - Expiry year of card\n", + "data": [], + "dataMode": "raw", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "56062893-9ab5-40f0-a017-17072c219217", + "responses": [ + { + "id": "fbe0559b-b1b4-4d1d-a35a-3a270db51e87", + "name": "Success", + "status": "OK", + "mime": "", + "language": "json", + "text": "{\n \"status\": true,\n \"message\": \"Tokenization attempted\",\n \"data\": {\n \"authorization_code\": \"AUTH_2pnazdd1ij\",\n \"bin\": \"408408\",\n \"last4\": \"4081\",\n \"exp_month\": \"11\",\n \"exp_year\": \"2018\",\n \"channel\": \"card\",\n \"card_type\": \"visa DEBIT\",\n \"bank\": \"Test Bank\",\n \"country_code\": \"NG\",\n \"brand\": \"visa\",\n \"reusable\": true,\n \"signature\": \"SIG_blOoJX5KN0BjJOQT7Vwp\",\n \"customer\": {\n \"id\": 1541151,\n \"first_name\": null,\n \"last_name\": null,\n \"email\": \"sdhiman@kumenu.com\",\n \"customer_code\": \"CUS_87hd55av8vp8c1r\",\n \"phone\": null,\n \"metadata\": null,\n \"risk_action\": \"default\"\n }\n }\n}", + "responseCode": { + "code": 200, + "name": "OK", + "detail": "" + }, + "requestObject": { + "id": "21e42a01-3fd4-42f6-be39-e7b85558b572", + "method": "POST", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json", + "dataMode": "raw", + "data": [], + "url": "https://api.paystack.co/charge/tokenize", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "rawModeData": "{\n \"card\": {\n \"cvv\": \"408\",\n \"expiry_month\": 11,\n \"expiry_year\": 18,\n \"number\": \"4084084084084081\",\n \"type\": \"Visa\"\n },\n \"email\": \"sdhiman@kumenu.com\"\n}" + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3e9ef8386acd69d7-LHR", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Encoding", + "value": "gzip", + "name": "Content-Encoding", + "description": "" + }, + { + "key": "Content-Length", + "value": "371", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Thu, 08 Feb 2018 13:35:00 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"292-btfaNY0/ISQBtIbrUmgVsA\"", + "name": "ETag", + "description": "" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "Vary", + "value": "X-HTTP-Method-Override", + "name": "Vary", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3AdlNwFsasJLu_CoCCkWq3zgina43MhsMS.n%2F9pwEC2XYANjFfF7rctQdvlt71aAwxp%2BNTzu3PgKnI; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3AdlNwFsasJLu_CoCCkWq3zgina43MhsMS.n%2F9pwEC2XYANjFfF7rctQdvlt71aAwxp%2BNTzu3PgKnI", + "name": "sails.sid" + } + ], + "request": "a6755315-7c75-4c11-8709-1447ad19c2d2", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "rawModeData": "{\n \"card\": {\n \"cvv\": \"408\",\n \"expiry_month\": 11,\n \"expiry_year\": 18,\n \"number\": \"4084084084084081\",\n \"type\": \"Visa\"\n },\n \"email\": \"customer@email.com\"\n}", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "a7300540-a900-485e-8c90-7f20cf937bba", + "name": "Export Transactions", + "url": "https://api.paystack.co/transaction/export", + "description": "**Query Params**\n- **from** - Lower bound of date range. Leave undefined to export transactions from day one.\n- **to** - Upper bound of date range. Leave undefined to export transactions till date.\n- **settled** - Set to `true` to export only settled transactions. `false` for pending transactions. Leave undefined to export all transactions\n- **payment_page** - Specify a payment page's id to export only transactions conducted on said page\n- **customer** - Specify customer id.\n- **currency** - Currency in which you are charging the customer in.\n- **settlement** - An ID for the settlement whose transactions we should export\n- **amount** - Amount for transactions to export\n- **status** - Status for transactions to export", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "e446091c-eefd-4073-a582-4299e3c577de", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "a76c83a3-dde8-44b9-8f37-0d796b3c449b", + "name": "List Refunds", + "url": "https://api.paystack.co/refund", + "description": "**Query Parameters**\n\n- **transaction**\n- **currency**", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "08b275ca-4233-4ac3-92a2-5224a4f63146", + "responses": [ + { + "id": "3a80351f-4668-4bc9-a9f6-47dfb8de3702", + "name": "List Refunds", + "status": "Unauthorized", + "mime": "", + "language": "json", + "text": "\n{\n \"status\": true,\n \"message\": \"Refunds retrieved\",\n \"data\": [\n {\n \"id\": 1,\n \"integration\": 100982,\n \"domain\": \"live\",\n \"transaction\": 1641,\n \"dispute\": 20,\n \"amount\": 500000,\n \"deducted_amount\": 500000,\n \"currency\": \"NGN\",\n \"channel\": \"migs\",\n \"fully_deducted\": 1,\n \"refunded_by\": \"customer@gmail.com\",\n \"refunded_at\": \"2018-01-12T10:54:47.000Z\",\n \"expected_at\": \"2017-10-01T21:10:59.000Z\",\n \"settlement\": null,\n \"customer_note\": \"xxx\",\n \"merchant_note\": \"xxx\",\n \"created_at\": \"2017-09-24T21:10:59.000Z\",\n \"updated_at\": \"2018-01-18T11:59:56.000Z\",\n \"status\": \"processed\"\n },\n {\n \"id\": 2,\n \"integration\": 100982,\n \"domain\": \"test\",\n \"transaction\": 323896,\n \"dispute\": 45,\n \"amount\": 500000,\n \"deducted_amount\": null,\n \"currency\": \"NGN\",\n \"channel\": \"migs\",\n \"fully_deducted\": null,\n \"refunded_by\": \"customer@gmail.com\",\n \"refunded_at\": \"2017-09-24T21:11:53.000Z\",\n \"expected_at\": \"2017-10-01T21:11:53.000Z\",\n \"settlement\": null,\n \"customer_note\": \"xxx\",\n \"merchant_note\": \"xxx\",\n \"created_at\": \"2017-09-24T21:11:53.000Z\",\n \"updated_at\": \"2017-09-24T21:11:53.000Z\",\n \"status\": \"pending\"\n }\n ]\n}", + "responseCode": { + "code": 401, + "name": "Unauthorized", + "detail": "" + }, + "requestObject": { + "id": "0ac5c3bc-7f31-4603-ab19-7ecb1617ddb1", + "method": "GET", + "headers": "Authorization: Bearer SECRET KEY", + "dataMode": null, + "data": null, + "rawModeData": "", + "url": "https://api.paystack.co/refund", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET KEY" + } + ] + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3ebe8d2f6d760a90-LHR", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Length", + "value": "82", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Mon, 12 Feb 2018 09:34:20 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"52-hNi7udIfPKyFcTWyPMlgkw\"", + "name": "ETag", + "description": "" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3A9Ws_2f_T7wJ-hiQHjkSOfnBEuZjWp-Yq.ubKRlmVDHufn8fem8Ej2YOKlZjq75CgSJh%2Fx5Dg366Q; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3A9Ws_2f_T7wJ-hiQHjkSOfnBEuZjWp-Yq.ubKRlmVDHufn8fem8Ej2YOKlZjq75CgSJh%2Fx5Dg366Q", + "name": "sails.sid" + } + ], + "request": "a76c83a3-dde8-44b9-8f37-0d796b3c449b", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "headers": "Authorization: Bearer SECRET KEY\n", + "pathVariables": {} + }, + { + "id": "aa38750f-21b0-4cba-8864-24812685435d", + "name": "Create Customer", + "url": "https://api.paystack.co/customer", + "description": "**Body Params**\n- **email** (_required_) - Customer's email address\n- **first_name** - Customer's first name\n- **last_name** - Customer's last name\n- **phone** - Customer's phone number\n- **metadata** - A set of key/value pairs that you can attach to the customer. It can be used to store additional information in a structured format.", + "data": [ + { + "key": "email", + "value": "customer@email.com", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "4abcb36b-0005-4397-8452-1ad6f66e8ec3", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "ad2d4a15-d9a5-4e10-ab8a-a77482e8ef2e", + "name": "Fetch Payment Session Timeout", + "url": "https://api.paystack.co/integration/payment_session_timeout", + "description": null, + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "9b923444-b195-452e-b534-8dbb98905930", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "b1ce4f06-38b5-4b81-a7c5-8858c05a5274", + "name": "Check Balance", + "url": "https://api.paystack.co/balance", + "description": "You can only transfer from what you have", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "b2833b4e-91e8-4f4c-8a0f-6fb97c130a1e", + "name": "Fetch Customer", + "url": "https://api.paystack.co/customer/:id_or_customer_code", + "description": "**Query Params**\n- **exclude_transactions** - By default, fetching a customer returns all their transactions. Set this to true to disable this behaviour.", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [ + { + "key": "id_or_customer_code", + "value": "" + } + ], + "queryParams": [], + "auth": null, + "events": null, + "folder": "4abcb36b-0005-4397-8452-1ad6f66e8ec3", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": { + "id_or_customer_code": "" + } + }, + { + "id": "b2aca7dd-5390-4348-b690-f2d81673a39c", + "name": "List Subaccounts", + "url": "https://api.paystack.co/subaccount", + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "886b67bc-06de-485b-8b9f-0297310ee7db", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "b2c99087-3afa-4310-99d8-549ec6ee1440", + "name": "White/blacklist Customer", + "url": "https://api.paystack.co/customer/set_risk_action", + "description": "**Body Params**\n- **customer** - Customer's ID, code, or email address\n- **risk_action** - One of the possible risk actions. `allow` to whitelist. `deny` to blacklist.", + "data": [ + { + "key": "customer", + "value": "CUS_xr58yrr2ujlft9k" + }, + { + "key": "risk_action", + "value": "allow" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "4abcb36b-0005-4397-8452-1ad6f66e8ec3", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "b35664d5-a14f-4d8a-b959-3ea6ee821aba", + "name": "Fetch Settlements", + "url": "https://api.paystack.co/settlement", + "description": "Settlements made to your bank accounts and the bank accounts for your subaccounts\n\n**Query Params**\n- **from** - Lower bound of date range. Leave undefined to export settlement from day one.\n- **to** - Upper bound of date range. Leave undefined to export settlements till date.\n- **subaccount** - Provide a subaccount code to export only settlements for that subaccount. Set to `none` to export only transactions for the account.", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "b34521bd-87df-49f6-b11a-7b8da3a2ffc3", + "responses": [ + { + "id": "608d9765-7318-4bbc-9800-5c6c834df893", + "name": "Fetch Settlements JSON Sample", + "status": "OK", + "mime": "", + "language": "json", + "text": "{\n \"status\": true,\n \"message\": \"Settlements retrieved\",\n \"data\": [\n {\n \"integration\": 102711,\n \"settled_by\": null,\n \"settlement_date\": \"2017-10-13T00:00:00.000Z\",\n \"domain\": \"live\",\n \"total_amount\": 393850,\n \"status\": \"success\",\n \"total_fees\": 16150,\n \"total_fees_paystack\": 12050,\n \"total_fees_gateway\": 4100,\n \"total_processed\": 410000,\n \"currency\": \"NGN\",\n \"id\": 56419,\n \"createdAt\": \"2017-10-13T01:04:23.000Z\",\n \"updatedAt\": \"2017-10-13T01:04:23.000Z\"\n },\n {\n \"integration\": 102711,\n \"settled_by\": null,\n \"settlement_date\": \"2017-08-03T00:00:00.000Z\",\n \"domain\": \"live\",\n \"total_amount\": 9850,\n \"status\": \"success\",\n \"total_fees\": 150,\n \"total_fees_paystack\": 50,\n \"total_fees_gateway\": 100,\n \"total_processed\": 10000,\n \"currency\": \"NGN\",\n \"id\": 40570,\n \"createdAt\": \"2017-08-03T01:03:34.000Z\",\n \"updatedAt\": \"2017-08-03T01:03:34.000Z\"\n },\n {\n \"integration\": 102711,\n \"settled_by\": null,\n \"settlement_date\": \"2017-04-01T00:00:00.000Z\",\n \"domain\": \"live\",\n \"total_amount\": 19700,\n \"status\": \"success\",\n \"total_fees\": 300,\n \"total_fees_paystack\": 100,\n \"total_fees_gateway\": 200,\n \"total_processed\": 20000,\n \"currency\": \"NGN\",\n \"id\": 21929,\n \"createdAt\": \"2017-04-01T01:01:31.000Z\",\n \"updatedAt\": \"2017-04-04T10:59:48.000Z\"\n }\n ],\n \"meta\": {\n \"total\": 3,\n \"skipped\": 0,\n \"perPage\": 50,\n \"page\": 1,\n \"pageCount\": 1\n }\n}", + "responseCode": { + "code": 200, + "name": "OK", + "detail": "" + }, + "requestObject": { + "id": "e8e30d42-1e25-45c5-b309-a0f1ff8a5759", + "method": "GET", + "headers": "Authorization: Bearer SECRET_KEY", + "dataMode": null, + "data": null, + "rawModeData": "", + "url": "https://api.paystack.co/settlement", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ] + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3b5df77afaf11473-AMS", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Encoding", + "value": "gzip", + "name": "Content-Encoding", + "description": "" + }, + { + "key": "Content-Length", + "value": "440", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Mon, 30 Oct 2017 11:17:11 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"621-Az0eBtgn3Z/QBz+vSiP8Ew\"", + "name": "ETag", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare-nginx", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3A8OI1FSC0BVUdesKEQBjByqyGKe5h4QKm.pqQemCD%2B2D36QCYi5Pd%2Bw1U1S8TWrcHuFLIzJ1oqaOg; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3A8OI1FSC0BVUdesKEQBjByqyGKe5h4QKm.pqQemCD%2B2D36QCYi5Pd%2Bw1U1S8TWrcHuFLIzJ1oqaOg", + "name": "sails.sid" + } + ], + "request": "b35664d5-a14f-4d8a-b959-3ea6ee821aba", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "b54289de-5afd-454c-84ce-6dc23e331579", + "name": "Finalize Disabling of OTP requirement for Transfers", + "url": "https://api.paystack.co/transfer/disable_otp_finalize", + "description": "**Body Params**\n- **otp** (_required_) - OTP sent to business phone to verify disabling OTP requirement\n\n", + "data": [ + { + "key": "otp", + "value": "928783", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "b77b4e4e-f9f5-4435-b19c-2f3bcf4e68a6", + "name": "List Transfer Recipients", + "url": "https://api.paystack.co/transferrecipient", + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "058c5fce-45d9-49b3-b243-2bd3489f42e9", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "b93a1dc1-27ca-422c-8f4d-97bd62607c08", + "name": "Update Transfer Receipient", + "url": "https://api.paystack.co/transferrecipient/{recipient_code_or_id}", + "description": null, + "data": [ + { + "key": "name", + "value": "Zombie", + "type": "text" + }, + { + "key": "email", + "value": "customer@email.com", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "PUT", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "058c5fce-45d9-49b3-b243-2bd3489f42e9", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "bc53767a-f68a-44a7-ac3f-0ba03ece6c3f", + "name": "Resume Bulk Charge Batch", + "url": "https://api.paystack.co/bulkcharge/resume/batch_code", + "description": "Use this endpoint to pause processing a batch\n\n**Path Params**\n- **batch_code** (_required_)", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "1696a2d4-2391-4f80-a929-4e7041df44cc", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "be833eaf-47a2-408a-95c5-6ab7d00e0798", + "name": "Match BVN", + "url": "https://api.paystack.co/bank/match_bvn?account_number={ACCOUNT_NUMBER}&bank_code={BANK_CODE}&bvn={BVN}", + "description": "The Match BVN endpoint checks if the account number for a bank belongs to a user's BVN\n\n**Path Params**\n- *account_number* _(required)_ - Bank account number\n- *bank_code* _(required)_ - Bank code from [List Bank endpoint](https://api.paystack.co/bank)\n- *bvn* _(required)_ - 11 digit BVN", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [ + { + "key": "account_number", + "value": "{ACCOUNT_NUMBER}" + }, + { + "key": "bank_code", + "value": "{BANK_CODE}" + }, + { + "key": "bvn", + "value": "{BVN}" + } + ], + "auth": null, + "events": null, + "folder": "65cf7432-1b38-403b-9d51-4d77aed89f7c", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "beb2a320-ba1f-41d0-be71-49c783438d7c", + "name": "List Subscriptions", + "url": "https://api.paystack.co/subscription", + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **customer** - Filter by Customer ID\n- **plan** - Filter by Plan ID", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "958cdff8-98b1-4e14-93c5-512ae20a253e", + "responses": [ + { + "id": "11ac69e0-4356-478e-8dbd-a57f24396590", + "name": "List Subscriptions", + "status": "OK", + "mime": "", + "language": "json", + "text": "{\n \"status\": true,\n \"message\": \"Subscriptions retrieved\",\n \"data\": [\n {\n \"customer\": {\n \"first_name\": \"employee14\",\n \"last_name\": \"demo\",\n \"email\": \"employee14@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_7o5rpgyihn2ccui\",\n \"risk_action\": \"default\",\n \"id\": 1395761,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:04.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:04.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product G186WMRJ\",\n \"plan_code\": \"PLN_qajv0uplnjz2y05\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8235,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:44:21.000Z\",\n \"updatedAt\": \"2018-01-22T13:44:21.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3658609,\n \"domain\": \"test\",\n \"start\": 1516628816,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_2gc07u0dqk1yb1f\",\n \"email_token\": \"b2jd0eo7yacv98p\",\n \"easy_cron_id\": \"493980\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:46:50.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36190,\n \"createdAt\": \"2018-01-22T13:46:56.000Z\",\n \"updatedAt\": \"2018-01-22T13:46:58.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product G186WMRJ\",\n \"plan_code\": \"PLN_qajv0uplnjz2y05\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8235,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:44:21.000Z\",\n \"updatedAt\": \"2018-01-22T13:44:21.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516628814,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_75o3he3uuzd78wp\",\n \"email_token\": \"3wvpgdqtwxpixq2\",\n \"easy_cron_id\": \"493979\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:46:50.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36189,\n \"createdAt\": \"2018-01-22T13:46:54.000Z\",\n \"updatedAt\": \"2018-01-22T13:46:55.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product G186WMRJ\",\n \"plan_code\": \"PLN_qajv0uplnjz2y05\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8235,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:44:21.000Z\",\n \"updatedAt\": \"2018-01-22T13:44:21.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516628812,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_mb83ddoe9o1qfsq\",\n \"email_token\": \"t93p7dxbgicmyrb\",\n \"easy_cron_id\": \"493978\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:46:50.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36188,\n \"createdAt\": \"2018-01-22T13:46:52.000Z\",\n \"updatedAt\": \"2018-01-22T13:46:53.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product YBZ84RVZCOZ3\",\n \"plan_code\": \"PLN_pl42mdegb1pay14\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8232,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:28:01.000Z\",\n \"updatedAt\": \"2018-01-22T13:28:01.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516627795,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_bn9ab5zt3jxjwn3\",\n \"email_token\": \"vrc1x9i9dxha8s9\",\n \"easy_cron_id\": \"493969\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:29:50.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36183,\n \"createdAt\": \"2018-01-22T13:29:55.000Z\",\n \"updatedAt\": \"2018-01-22T13:29:55.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product YBZ84RVZCOZ3\",\n \"plan_code\": \"PLN_pl42mdegb1pay14\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8232,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:28:01.000Z\",\n \"updatedAt\": \"2018-01-22T13:28:01.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516627793,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_jry95yp22952v32\",\n \"email_token\": \"vcqc4wgdcefxcye\",\n \"easy_cron_id\": \"493968\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:29:50.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36182,\n \"createdAt\": \"2018-01-22T13:29:53.000Z\",\n \"updatedAt\": \"2018-01-22T13:29:53.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product YBZ84RVZCOZ3\",\n \"plan_code\": \"PLN_pl42mdegb1pay14\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8232,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:28:01.000Z\",\n \"updatedAt\": \"2018-01-22T13:28:01.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516627792,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_pz6388b8g98bhr4\",\n \"email_token\": \"1q8bnm7nfulshpv\",\n \"easy_cron_id\": \"493967\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:29:50.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36181,\n \"createdAt\": \"2018-01-22T13:29:52.000Z\",\n \"updatedAt\": \"2018-01-22T13:29:52.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product MY8M12AD6AMV\",\n \"plan_code\": \"PLN_0n5mh1zojhq0yw2\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8231,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:14:59.000Z\",\n \"updatedAt\": \"2018-01-22T13:14:59.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516627084,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_6a1ueijc69dn8ia\",\n \"email_token\": \"s1fjsq8aia1r4mp\",\n \"easy_cron_id\": \"493966\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:17:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36180,\n \"createdAt\": \"2018-01-22T13:18:04.000Z\",\n \"updatedAt\": \"2018-01-22T13:18:09.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee14\",\n \"last_name\": \"demo\",\n \"email\": \"employee14@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_7o5rpgyihn2ccui\",\n \"risk_action\": \"default\",\n \"id\": 1395761,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:04.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:04.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product MY8M12AD6AMV\",\n \"plan_code\": \"PLN_0n5mh1zojhq0yw2\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8231,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:14:59.000Z\",\n \"updatedAt\": \"2018-01-22T13:14:59.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3658609,\n \"domain\": \"test\",\n \"start\": 1516627082,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_0530l7rkso3hlk6\",\n \"email_token\": \"30ed3a6ekqowv6e\",\n \"easy_cron_id\": \"493965\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:17:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36179,\n \"createdAt\": \"2018-01-22T13:18:02.000Z\",\n \"updatedAt\": \"2018-01-22T13:18:02.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product MY8M12AD6AMV\",\n \"plan_code\": \"PLN_0n5mh1zojhq0yw2\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8231,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:14:59.000Z\",\n \"updatedAt\": \"2018-01-22T13:14:59.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516627080,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_sxach1ectrbsdfh\",\n \"email_token\": \"n0q52muafk5g2lz\",\n \"easy_cron_id\": \"493964\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:17:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36178,\n \"createdAt\": \"2018-01-22T13:18:00.000Z\",\n \"updatedAt\": \"2018-01-22T13:18:01.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product ZAQYYS0CU9J2\",\n \"plan_code\": \"PLN_hnhpbv7t6ifny7s\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8230,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:04:17.000Z\",\n \"updatedAt\": \"2018-01-22T13:04:17.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516626884,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_x7mnc2hfxgn9mvy\",\n \"email_token\": \"vmlymyc283ubnr2\",\n \"easy_cron_id\": \"493963\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:14:39.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36177,\n \"createdAt\": \"2018-01-22T13:14:44.000Z\",\n \"updatedAt\": \"2018-01-22T13:14:45.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product ZAQYYS0CU9J2\",\n \"plan_code\": \"PLN_hnhpbv7t6ifny7s\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8230,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:04:17.000Z\",\n \"updatedAt\": \"2018-01-22T13:04:17.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516626883,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_ftf7tfkcah7oyda\",\n \"email_token\": \"vdtc2b8hyahc226\",\n \"easy_cron_id\": \"493962\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:14:39.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36176,\n \"createdAt\": \"2018-01-22T13:14:43.000Z\",\n \"updatedAt\": \"2018-01-22T13:14:44.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee14\",\n \"last_name\": \"demo\",\n \"email\": \"employee14@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_7o5rpgyihn2ccui\",\n \"risk_action\": \"default\",\n \"id\": 1395761,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:04.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:04.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product ZAQYYS0CU9J2\",\n \"plan_code\": \"PLN_hnhpbv7t6ifny7s\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8230,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:04:17.000Z\",\n \"updatedAt\": \"2018-01-22T13:04:17.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3658609,\n \"domain\": \"test\",\n \"start\": 1516626881,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_h1cs0ntq45hf4cp\",\n \"email_token\": \"ps5t7usida5kygw\",\n \"easy_cron_id\": \"493961\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:14:39.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36175,\n \"createdAt\": \"2018-01-22T13:14:41.000Z\",\n \"updatedAt\": \"2018-01-22T13:14:42.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product DLPX8GQMHZXV\",\n \"plan_code\": \"PLN_ucpz4nthvhaon0z\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8229,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:02:31.000Z\",\n \"updatedAt\": \"2018-01-22T13:02:31.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516626186,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_53m01v14zhjivhu\",\n \"email_token\": \"zz2rtsancgqup7r\",\n \"easy_cron_id\": \"493959\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:02:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36173,\n \"createdAt\": \"2018-01-22T13:03:06.000Z\",\n \"updatedAt\": \"2018-01-22T13:03:06.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product DLPX8GQMHZXV\",\n \"plan_code\": \"PLN_ucpz4nthvhaon0z\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8229,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:02:31.000Z\",\n \"updatedAt\": \"2018-01-22T13:02:31.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516626183,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_5fs6ihqndix93m4\",\n \"email_token\": \"u3m15963gd0olha\",\n \"easy_cron_id\": \"493958\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:02:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36172,\n \"createdAt\": \"2018-01-22T13:03:03.000Z\",\n \"updatedAt\": \"2018-01-22T13:03:05.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product DLPX8GQMHZXV\",\n \"plan_code\": \"PLN_ucpz4nthvhaon0z\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8229,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T13:02:31.000Z\",\n \"updatedAt\": \"2018-01-22T13:02:31.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516626180,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_ejrv62w0xi84tcf\",\n \"email_token\": \"31amwtboj1i35z9\",\n \"easy_cron_id\": \"493957\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T13:02:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36171,\n \"createdAt\": \"2018-01-22T13:03:00.000Z\",\n \"updatedAt\": \"2018-01-22T13:03:01.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product KKHB47IW65UL\",\n \"plan_code\": \"PLN_mmt6z98r0vglxq8\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8226,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T12:28:02.000Z\",\n \"updatedAt\": \"2018-01-22T12:28:02.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516624143,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_lhi6bopt5xde19l\",\n \"email_token\": \"2qlin7ligxdndna\",\n \"easy_cron_id\": \"493949\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T12:28:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36166,\n \"createdAt\": \"2018-01-22T12:29:03.000Z\",\n \"updatedAt\": \"2018-01-22T12:29:04.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product KKHB47IW65UL\",\n \"plan_code\": \"PLN_mmt6z98r0vglxq8\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8226,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T12:28:02.000Z\",\n \"updatedAt\": \"2018-01-22T12:28:02.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516624141,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_vsu30z98riqxx2x\",\n \"email_token\": \"frtaegj04y756xm\",\n \"easy_cron_id\": \"493948\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T12:28:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36165,\n \"createdAt\": \"2018-01-22T12:29:01.000Z\",\n \"updatedAt\": \"2018-01-22T12:29:02.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Mpc product KKHB47IW65UL\",\n \"plan_code\": \"PLN_mmt6z98r0vglxq8\",\n \"description\": null,\n \"amount\": 9000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8226,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T12:28:02.000Z\",\n \"updatedAt\": \"2018-01-22T12:28:02.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516624140,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 9000000,\n \"subscription_code\": \"SUB_zp574lozv6llekc\",\n \"email_token\": \"fku9iyq6575t8vi\",\n \"easy_cron_id\": \"493947\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T12:28:58.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36164,\n \"createdAt\": \"2018-01-22T12:29:00.000Z\",\n \"updatedAt\": \"2018-01-22T12:29:00.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee14\",\n \"last_name\": \"demo\",\n \"email\": \"employee14@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_7o5rpgyihn2ccui\",\n \"risk_action\": \"default\",\n \"id\": 1395761,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:04.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:04.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product FAQ130X1GZKD\",\n \"plan_code\": \"PLN_v425e4j6eyt55me\",\n \"description\": null,\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8225,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T10:36:37.000Z\",\n \"updatedAt\": \"2018-01-22T10:36:37.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3658609,\n \"domain\": \"test\",\n \"start\": 1516618242,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_y517eofx0k3wuev\",\n \"email_token\": \"tru7qxp8m3f3hp0\",\n \"easy_cron_id\": \"493921\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T10:50:35.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36153,\n \"createdAt\": \"2018-01-22T10:50:42.000Z\",\n \"updatedAt\": \"2018-01-22T10:50:43.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product FAQ130X1GZKD\",\n \"plan_code\": \"PLN_v425e4j6eyt55me\",\n \"description\": null,\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8225,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T10:36:37.000Z\",\n \"updatedAt\": \"2018-01-22T10:36:37.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516618240,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_pmmw1bssp5wupjc\",\n \"email_token\": \"wnsl72jwcocmjgb\",\n \"easy_cron_id\": \"493920\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T10:50:35.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36152,\n \"createdAt\": \"2018-01-22T10:50:40.000Z\",\n \"updatedAt\": \"2018-01-22T10:50:41.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product FAQ130X1GZKD\",\n \"plan_code\": \"PLN_v425e4j6eyt55me\",\n \"description\": null,\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8225,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T10:36:37.000Z\",\n \"updatedAt\": \"2018-01-22T10:36:37.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516618239,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_g5nnr91a93881ki\",\n \"email_token\": \"hmx3etjyf3l67ws\",\n \"easy_cron_id\": \"493919\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T10:50:35.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36151,\n \"createdAt\": \"2018-01-22T10:50:39.000Z\",\n \"updatedAt\": \"2018-01-22T10:50:40.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product FAQ130X1GZKD\",\n \"plan_code\": \"PLN_v425e4j6eyt55me\",\n \"description\": null,\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8225,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-22T10:36:37.000Z\",\n \"updatedAt\": \"2018-01-22T10:36:37.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516618238,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_kcfhkosqhn13h8a\",\n \"email_token\": \"k6bvxdrlx4xqlg3\",\n \"easy_cron_id\": \"493918\",\n \"cron_expression\": \"0 0 21 * *\",\n \"next_payment_date\": \"2018-02-21T10:50:35.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36150,\n \"createdAt\": \"2018-01-22T10:50:38.000Z\",\n \"updatedAt\": \"2018-01-22T10:50:38.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee14\",\n \"last_name\": \"demo\",\n \"email\": \"employee14@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_7o5rpgyihn2ccui\",\n \"risk_action\": \"default\",\n \"id\": 1395761,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:04.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:04.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product R1RR2R3R4R5\",\n \"plan_code\": \"PLN_mm752s00e60hhk7\",\n \"description\": \"\",\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8173,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-18T12:10:28.000Z\",\n \"updatedAt\": \"2018-01-18T12:10:28.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3658609,\n \"domain\": \"test\",\n \"start\": 1516429694,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_4rayx6mta5yqmym\",\n \"email_token\": \"bdd6synhcdkjb0y\",\n \"easy_cron_id\": \"493148\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:28:08.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36002,\n \"createdAt\": \"2018-01-20T06:28:14.000Z\",\n \"updatedAt\": \"2018-01-20T06:28:15.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee13\",\n \"last_name\": \"demo\",\n \"email\": \"employee13@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_4krtj6y63m5fobz\",\n \"risk_action\": \"default\",\n \"id\": 1395760,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:45:02.000Z\",\n \"updatedAt\": \"2018-01-14T13:45:02.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product R1RR2R3R4R5\",\n \"plan_code\": \"PLN_mm752s00e60hhk7\",\n \"description\": \"\",\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8173,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-18T12:10:28.000Z\",\n \"updatedAt\": \"2018-01-18T12:10:28.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625849,\n \"domain\": \"test\",\n \"start\": 1516429693,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_bkme8lju5xlvle4\",\n \"email_token\": \"pkxx935gcly9t2u\",\n \"easy_cron_id\": \"493147\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:28:08.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36001,\n \"createdAt\": \"2018-01-20T06:28:13.000Z\",\n \"updatedAt\": \"2018-01-20T06:28:14.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product R1RR2R3R4R5\",\n \"plan_code\": \"PLN_mm752s00e60hhk7\",\n \"description\": \"\",\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8173,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-18T12:10:28.000Z\",\n \"updatedAt\": \"2018-01-18T12:10:28.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516429692,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_5es1mw1kxm46gtd\",\n \"email_token\": \"sbfm13oydbkm52f\",\n \"easy_cron_id\": \"493145\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:28:08.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 35999,\n \"createdAt\": \"2018-01-20T06:28:12.000Z\",\n \"updatedAt\": \"2018-01-20T06:28:12.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Good product R1RR2R3R4R5\",\n \"plan_code\": \"PLN_mm752s00e60hhk7\",\n \"description\": \"\",\n \"amount\": 5000000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8173,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-18T12:10:28.000Z\",\n \"updatedAt\": \"2018-01-18T12:10:28.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516429692,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 5000000,\n \"subscription_code\": \"SUB_7xxt5qcrra1hfqu\",\n \"email_token\": \"tos1qk2qcm3m9xk\",\n \"easy_cron_id\": \"493146\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:28:08.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 36000,\n \"createdAt\": \"2018-01-20T06:28:12.000Z\",\n \"updatedAt\": \"2018-01-20T06:28:13.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Private Thrift MYF8H2O63\",\n \"plan_code\": \"PLN_bxknjmadmsr87of\",\n \"description\": null,\n \"amount\": 1200000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8197,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-20T06:18:44.000Z\",\n \"updatedAt\": \"2018-01-20T06:18:44.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516429175,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 1200000,\n \"subscription_code\": \"SUB_82t90s0th5uypnr\",\n \"email_token\": \"tnvwf8cht0rk7jv\",\n \"easy_cron_id\": \"493144\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:18:42.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 35998,\n \"createdAt\": \"2018-01-20T06:19:35.000Z\",\n \"updatedAt\": \"2018-01-20T06:19:36.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee11\",\n \"last_name\": \"demo\",\n \"email\": \"employee11@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_fs968067v1doow0\",\n \"risk_action\": \"default\",\n \"id\": 1395756,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:52.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:52.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"Private Thrift MYF8H2O63\",\n \"plan_code\": \"PLN_bxknjmadmsr87of\",\n \"description\": null,\n \"amount\": 1200000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8197,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-20T06:18:44.000Z\",\n \"updatedAt\": \"2018-01-20T06:18:44.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3620114,\n \"domain\": \"test\",\n \"start\": 1516429174,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 1200000,\n \"subscription_code\": \"SUB_3yzhgywmdjba0dz\",\n \"email_token\": \"8olq6gbnnufqxre\",\n \"easy_cron_id\": \"493143\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:18:42.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 35997,\n \"createdAt\": \"2018-01-20T06:19:34.000Z\",\n \"updatedAt\": \"2018-01-20T06:19:35.000Z\"\n },\n {\n \"customer\": {\n \"first_name\": \"employee12\",\n \"last_name\": \"emo\",\n \"email\": \"employee12@demo.com\",\n \"phone\": null,\n \"metadata\": null,\n \"domain\": \"test\",\n \"customer_code\": \"CUS_5z5i6sw36jx2wlu\",\n \"risk_action\": \"default\",\n \"id\": 1395757,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-14T13:44:56.000Z\",\n \"updatedAt\": \"2018-01-14T13:44:56.000Z\"\n },\n \"plan\": {\n \"domain\": \"test\",\n \"name\": \"ZAQ Prosper RS8GUZ\",\n \"plan_code\": \"PLN_n5u9lsl3ldtjpla\",\n \"description\": null,\n \"amount\": 44200000,\n \"interval\": \"monthly\",\n \"invoice_limit\": 0,\n \"send_invoices\": true,\n \"send_sms\": true,\n \"hosted_page\": false,\n \"hosted_page_url\": null,\n \"hosted_page_summary\": null,\n \"currency\": \"NGN\",\n \"migrate\": false,\n \"id\": 8131,\n \"integration\": 132621,\n \"createdAt\": \"2018-01-15T10:21:32.000Z\",\n \"updatedAt\": \"2018-01-15T10:21:32.000Z\"\n },\n \"integration\": 132621,\n \"authorization\": 3625717,\n \"domain\": \"test\",\n \"start\": 1516428131,\n \"status\": \"active\",\n \"quantity\": 1,\n \"amount\": 44200000,\n \"subscription_code\": \"SUB_tvpgx6ee7c0h5q2\",\n \"email_token\": \"rat7afimr2r2bop\",\n \"easy_cron_id\": \"493141\",\n \"cron_expression\": \"0 0 19 * *\",\n \"next_payment_date\": \"2018-02-19T06:01:29.000Z\",\n \"open_invoice\": null,\n \"invoice_limit\": 0,\n \"id\": 35996,\n \"createdAt\": \"2018-01-20T06:02:11.000Z\",\n \"updatedAt\": \"2018-01-20T06:02:12.000Z\"\n }\n ],\n \"meta\": {\n \"total\": 29,\n \"skipped\": 0,\n \"perPage\": 50,\n \"page\": 1,\n \"pageCount\": 1\n }\n}", + "responseCode": { + "code": 200, + "name": "OK", + "detail": "" + }, + "requestObject": { + "id": "759708f3-4460-44cd-bc00-4c5c059c1d10", + "method": "GET", + "headers": "Authorization: Bearer SECRET_KEY", + "dataMode": null, + "data": null, + "rawModeData": "", + "url": "https://api.paystack.co/subscription", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ] + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3e2308930b1969d1-LHR", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Encoding", + "value": "gzip", + "name": "Content-Encoding", + "description": "" + }, + { + "key": "Content-Length", + "value": "4020", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Wed, 24 Jan 2018 12:35:35 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"b996-CMrwL9gnwnEjtZ0VB4frGA\"", + "name": "ETag", + "description": "" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3AuJweoSRrLJYZ8feLjMaNcp0E2cRwd-WL.N1g6WqxlradKwfxdBBpezEDpDmls40XZkqx61d5uwvE; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3AuJweoSRrLJYZ8feLjMaNcp0E2cRwd-WL.N1g6WqxlradKwfxdBBpezEDpDmls40XZkqx61d5uwvE", + "name": "sails.sid" + } + ], + "request": "beb2a320-ba1f-41d0-be71-49c783438d7c", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "c168c418-43d0-4ceb-80e4-a4f6824754d9", + "name": "Check pending charge", + "url": "https://api.paystack.co/charge/reference", + "description": "When you get \"pending\" as a charge status, wait 30 seconds or more, then make a check to see if its status has changed. Don't call too early as you may get a lot more pending than you should.\n\n**Body Params**\n- **reference** (_required_) - The reference to check", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "56062893-9ab5-40f0-a017-17072c219217", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "c2796b87-1b90-4bb3-a0e0-f176854bda18", + "name": "Verify Invoice", + "url": "https://api.paystack.co/paymentrequest/verify/ID_OR_CODE", + "description": "**Path Params**\n- **ID** - The invoice code for the Payment Request to be verified\n\nNote that a key is added called `pending_amount` when you fetch an invoice. This is because when paying for an invoice, you can choose to pay part but not all. Whenever a successful transaction is made, the key updates to reveal what’s left of the invoice to pay.", + "data": null, + "dataMode": null, + "headerData": [], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", + "headers": "", + "pathVariables": {} + }, + { + "id": "c5b698c9-f2f2-431f-aef5-6f68d4497678", + "name": "Enable Subscription", + "url": "https://api.paystack.co/subscription/enable", + "description": "**Body Params**\n- **code** (_required_) - Subscription code\n- **token** (_required_) - Email token", + "data": [ + { + "key": "code", + "value": "SUB_vsyqdmlzble3uii", + "type": "text" + }, + { + "key": "token", + "value": "d7gofp6yppn3qz7", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "958cdff8-98b1-4e14-93c5-512ae20a253e", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "c6597500-7281-44c3-96c3-49e45ac0cc8f", + "name": "Check Authorization", + "url": "https://api.paystack.co/transaction/check_authorization", + "description": "All mastercard and visa authorizations can be checked with this endpoint to know if they have funds for the payment you seek.\n\n**Body Params**\n- **authorization_code** (_required_) - Authorization code for mastercard or VISA authorization belonging to email.\n- **amount** (_required_) - Amount in kobo\n- **email** (_required_) - Customer's email address\n- **currency** - A currency for the amount we want to check\n\nIn test mode, we will return insufficient funds for an amount greater than or equal 500,000 naira.", + "data": [ + { + "key": "authorization_code", + "value": "AUTH_CODE", + "type": "text" + }, + { + "key": "email", + "value": "customer@email.com", + "type": "text" + }, + { + "key": "amount", + "value": "500000", + "type": "text" + } + ], + "dataMode": "params", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "e446091c-eefd-4073-a582-4299e3c577de", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "c7bd8231-6b4b-49de-b549-c7282211e495", + "name": "Pause Bulk Charge Batch", + "url": "https://api.paystack.co/bulkcharge/pause/batch_code", + "description": "Use this endpoint to pause processing a batch\n\n**Path Params**\n- **batch_code** (_required_)", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "1696a2d4-2391-4f80-a929-4e7041df44cc", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "c8ece9ee-69b2-4610-b925-3dc8de6487ca", + "name": "Balance Ledger", + "url": "https://api.paystack.co/balance/ledger", + "description": "Returns all activity carried out from and to the Paystack Balance", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "ccd6fec1-02b7-4fa7-a602-2a8803c250cd", + "name": "Resolve Card BIN", + "url": "https://api.paystack.co/decision/bin/{BIN)", + "description": "**Path Params**\n- **bin** (_required_) - First 6 characters of card", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "65cf7432-1b38-403b-9d51-4d77aed89f7c", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "d128d8bb-eb52-43dd-8545-4f9faf38cadf", + "name": "Charge", + "url": "https://api.paystack.co/charge", + "description": "Send card details or bank details or authorization code to start a charge.\nSimple guide to charging cards directly https://developers.paystack.co/docs/charging-from-your-backend\n\n**Body Params**\n- **email** (_required_) - Customer's email address\n- **amount** (_required_) - Amount in kobo\n- **card** (_required_) - Card number\n- **card.number** (_required_) - Card to tokenize\n- **card.cvv** (_required_) - Card security code\n- **card.expiry_month** (_required_) - Expiry month of card\n- **card.expiry_year** (_required_) - Expiry year of card\n- **bank** - Bank account to charge (don't send if charging an authorization code or card)\n- **bank.code** (_required_) - A code for the [bank](https://developers.paystack.co/v1.0/ref/banks) (check banks for the banks supported). Only the ones for which paywithbank is true will work.\n- **bank.account_number** (_required_) - 10 digit nuban for the account to charge\n- **authorization_code** - An authorization code to charge (don't send if charging a card or bank account)\n- **pin** - 4-digit PIN (send with a non-reusable authorization code)\n- **metadata** - A JSON object", + "data": [], + "dataMode": "raw", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "56062893-9ab5-40f0-a017-17072c219217", + "rawModeData": "{\n \"email\":\"some@body.nice\",\n \"amount\":\"10000\",\n \"metadata\":{\n \"custom_fields\":[\n {\n \"value\":\"makurdi\",\n \"display_name\": \"Donation for\",\n \"variable_name\": \"donation_for\"\n }\n ]\n },\n \"card\":{\n \"cvv\":\"408\",\n \"number\":\"4084084084084081\",\n \"expiry_month\":\"01\",\n \"expiry_year\":\"99\"\n },\n \"pin\":\"0000\"\n}", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "d19e26d4-7593-4af7-893a-ae45dfc43887", + "name": "Create Subaccount", + "url": "https://api.paystack.co/subaccount", + "description": "**Body Params**\n- **business_name** (_required_) - Name of business for subaccount\n- **settlement_bank** (_required_) - Name of Bank (see list of accepted names by calling [List Banks](https://developers.paystack.co/v1.0/docs/list-banks)\n- **account_number** (_required_) - NUBAN Bank Account Number\n- **percentage_charge** (_required_) - What is the default percentage charged when receiving on behalf of this subaccount?\n- **primary_contact_email** - A contact email for the subaccount\n- **primary_contact_name** - A name for the contact person for this subaccount\n- **primary_contact_phone** - A phone number to call for this subaccount\n- **metadata** - Stringified JSON object\n- **settlement_schedule** - Any of `auto`, `weekly`, `monthly`, `manual`. Auto means payout is T+1 and manual means payout to the subaccount should only be made when requested.\n\nReceive payments for the created subaccount by providing their code when doing a transaction. More details here: [Split Payments Overview](https://developers.paystack.co/v1.0/docs/split-payments-overview)", + "data": [ + { + "key": "business_name", + "value": "Sunshine Studios", + "type": "text" + }, + { + "key": "settlement_bank", + "value": "044", + "type": "text" + }, + { + "key": "account_number", + "value": "0193274682", + "type": "text" + }, + { + "key": "percentage_charge", + "value": "18.2", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "886b67bc-06de-485b-8b9f-0297310ee7db", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "d2cdaab4-09a7-48e9-9cb9-34fef87c28bc", + "name": "Fetch Transfer", + "url": "https://api.paystack.co/transfer/id", + "description": "**Path Params**\n- **id_or_code** (_required_) - An ID or code for the transfer whose details you want to retrieve.", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "4c6d8917-6047-41ca-9df7-153ba844f275", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "db65eb06-772f-4987-bb35-94fc0d5840b7", + "name": "Deactivate Authorization", + "url": "https://api.paystack.co/customer/deactivate_authorization", + "description": "For when the card needs to be forgotten...\n\n**Body Params**\n- **authorization_code** (_required_) - Authorization code to be deactivated\n\n", + "data": [ + { + "key": "authorization_code", + "value": "AUTH_CODE", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "e446091c-eefd-4073-a582-4299e3c577de", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "dd2df05a-3d7f-477a-8a44-180e42f62288", + "name": "Archive Invoice", + "url": "https://api.paystack.co/invoice/archive/:id_or_code", + "description": "Used to archive an invoice. Invoice will no longer be fetched on list or returned on verify.", + "data": [], + "dataMode": "params", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "POST", + "pathVariableData": [ + { + "key": "id_or_code", + "value": "" + } + ], + "queryParams": [], + "auth": null, + "events": null, + "folder": "9ece3b05-7a7e-4d76-933e-bdcd122f89ad", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": { + "id_or_code": "" + } + }, + { + "id": "e2898759-e26f-4c26-9701-f8c3822c3b3d", + "name": "Resolve Phone Number", + "url": "https://api.paystack.co/verifications", + "description": "Using the Truecaller API you can verify the authenticity of a customer. It returns the customer's name, phone number, email, social media handles and organization as available on their Truecaller profile.\n\n**Body Parameters**\n- **verification_type** _(required)_\n- **phone** _(required)_ - Customer phone number starting with country code (without the + prefix)\n- **callback_url** - Link on server to receive the truecaller details", + "data": [ + { + "key": "verification_type", + "value": "truecaller", + "type": "text" + }, + { + "key": "phone", + "value": "2349012345678", + "type": "text" + }, + { + "key": "callback_url", + "value": "https://linktopage.com/truecaller", + "type": "text" + } + ], + "dataMode": "params", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "65cf7432-1b38-403b-9d51-4d77aed89f7c", + "responses": [ + { + "id": "9b4ada70-810b-4902-b01f-546e51235b65", + "name": "Successful", + "status": "OK", + "mime": "", + "language": "json", + "text": "{\n \"status\": true,\n \"message\": \"Truecaller verification successful\",\n \"data\": {\n \"requestId\": \"zLXHzm_DqHcv09ghFQuLfBQ81Cs=\",\n \"state\": \"truecaller_vef_c4d3e611fbff37a0cb73e02e4d081db31a47255f\"\n }\n}", + "responseCode": { + "code": 200, + "name": "OK", + "detail": "" + }, + "requestObject": { + "id": "3c2cb2db-e979-40e1-9daf-82cc31fccf85", + "method": "POST", + "headers": "Authorization: Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", + "dataMode": "params", + "data": [ + { + "key": "verification_type", + "value": "truecaller", + "type": "text" + }, + { + "key": "phone", + "value": "2347036809340\n", + "type": "text" + }, + { + "key": "callback_url", + "value": "https://linktopage.com/truecaller", + "type": "text" + } + ], + "rawModeData": "", + "url": "https://api.paystack.co/verifications", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251" + } + ] + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3f9df6cc9ba76b61-LHR", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Encoding", + "value": "gzip", + "name": "Content-Encoding", + "description": "" + }, + { + "key": "Content-Length", + "value": "186", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Sun, 11 Mar 2018 12:18:31 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"d0-WENhxvB2YI5kTAMR7WR93A\"", + "name": "ETag", + "description": "" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "Vary", + "value": "X-HTTP-Method-Override", + "name": "Vary", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3A7LgGvmGpDzAihy5HGWjMt0-6pYQ-O1fI.Ww9WlrquS0KVxKei%2FOvD31f9FgrFwd6UeBtbUDUw5So", + "name": "sails.sid" + } + ], + "request": "e2898759-e26f-4c26-9701-f8c3822c3b3d", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + }, + { + "id": "c9899aec-287d-4d27-a0ed-c473b91ea845", + "name": "No truecaller app installed", + "status": "Forbidden", + "mime": "", + "language": "json", + "text": "{\n \"status\": false,\n \"message\": \"This number does not have the Truecaller app installed.\"\n}", + "responseCode": { + "code": 403, + "name": "Forbidden", + "detail": "" + }, + "requestObject": { + "id": "f7202b2e-9a49-4e55-822c-1499344a5944", + "method": "POST", + "headers": "Authorization: Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", + "dataMode": "params", + "data": [ + { + "key": "verification_type", + "value": "truecaller", + "type": "text" + }, + { + "key": "phone", + "value": "2347036809340\n", + "type": "text" + }, + { + "key": "callback_url", + "value": "https://linktopage.com/truecaller", + "type": "text" + } + ], + "rawModeData": "", + "url": "https://api.paystack.co/verifications", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer sk_test_d10560c705c1c402ff1e2406d88135e698261251", + "type": "text", + "enabled": true + } + ] + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3f9df7824a2d6b61-LHR", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Encoding", + "value": "gzip", + "name": "Content-Encoding", + "description": "" + }, + { + "key": "Content-Length", + "value": "102", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Sun, 11 Mar 2018 12:19:00 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"5d-0reyzbejXkazWnJmxYVtRA\"", + "name": "ETag", + "description": "" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "Vary", + "value": "X-HTTP-Method-Override", + "name": "Vary", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3ABcpFBu2qTg7wUxoUIsZ4P1VCnrnNOAfd.s7nRTSYSR1LCHPq8hhFYnrtplcieySZWtDNB8i1VTrQ; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3ABcpFBu2qTg7wUxoUIsZ4P1VCnrnNOAfd.s7nRTSYSR1LCHPq8hhFYnrtplcieySZWtDNB8i1VTrQ", + "name": "sails.sid" + } + ], + "request": "e2898759-e26f-4c26-9701-f8c3822c3b3d", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + }, + { + "id": "d783a03e-63cd-4ae0-bed7-56f143d80527", + "name": "Invalid Request", + "status": "Unauthorized", + "mime": "", + "language": "json", + "text": "{\n \"status\": false,\n \"message\": \"Invalid key\"\n}", + "responseCode": { + "code": 401, + "name": "Unauthorized", + "detail": "" + }, + "requestObject": { + "id": "b30bcf78-a03f-4f9f-895b-f018cbbecfa2", + "method": "POST", + "headers": "Authorization: Bearer SECRET_KEY", + "dataMode": "params", + "data": [ + { + "key": "verification_type", + "value": "truecaller", + "type": "text" + }, + { + "key": "phone", + "value": "2347036809348", + "type": "text" + }, + { + "key": "callback_url", + "value": "No URL included", + "type": "text" + } + ], + "rawModeData": "", + "url": "https://api.paystack.co/verifications", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ] + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3f9dfc750a0c6b61-LHR", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Length", + "value": "49", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Sun, 11 Mar 2018 12:22:22 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"31-TcCODO2pQ5hz9TTU0Rc5Eg\"", + "name": "ETag", + "description": "" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "Vary", + "value": "X-HTTP-Method-Override", + "name": "Vary", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3ABcpFBu2qTg7wUxoUIsZ4P1VCnrnNOAfd.s7nRTSYSR1LCHPq8hhFYnrtplcieySZWtDNB8i1VTrQ", + "name": "sails.sid" + } + ], + "request": "e2898759-e26f-4c26-9701-f8c3822c3b3d", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "e578399d-00d7-4711-b088-9d8049b9f4a2", + "name": "Transaction Totals", + "url": "https://api.paystack.co/transaction/totals", + "description": "Total amount received on your account\n\n**Query Params**\n- **from** - Lower bound of date range. Leave undefined to show totals from day one.\n- **to** - Upper bound of date range. Leave undefined to show totals till date.", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "e446091c-eefd-4073-a582-4299e3c577de", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "e67ba043-51d0-4ef4-a49e-e652482393ac", + "name": "Check Slug Availability", + "url": "https://api.paystack.co/page/check_slug_availability/slug", + "description": "**Path Params**\n- **slug** (_required_) - URL slug to be confirmed", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "084139a8-b034-4bc7-97af-8a9d6a6022b9", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "ea31deed-604d-4ed8-9c9e-553754a93654", + "name": "Submit Phone", + "url": "https://api.paystack.co/charge/submit_phone", + "description": "Submit Phone when requested\n\n**Body Params**\n- **phone** (_required_) - Phone number submitted by user\n- **reference** (_required_) - reference for ongoing transaction", + "data": [ + { + "key": "reference", + "value": "m5mwhre1vq7fuh9", + "type": "text" + }, + { + "key": "phone", + "value": "08030000000", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "56062893-9ab5-40f0-a017-17072c219217", + "headers": "Content-Type: application/json\nAuthorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "ec7d7877-1d7f-417c-81a5-b1d01663ec46", + "name": "List Bulk Charge Batches", + "url": "https://api.paystack.co/transfer/id_or_code", + "description": "This lists all bulk charge batches created by the integration. Statuses can be `active`, `paused`, or `complete`.\n\n**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "https://api.paystack.co/plan" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "1696a2d4-2391-4f80-a929-4e7041df44cc", + "headers": "Authorization: https://api.paystack.co/plan\n", + "pathVariables": {} + }, + { + "id": "f1fa7622-e735-49ca-be43-3daaf3865fe9", + "name": "Initialize Transaction", + "url": "https://api.paystack.co/transaction/initialize", + "description": "**Body Params**\n- **email** (_required_) - Customer's email address\n- **amount** (_required_) - Amount in kobo\n- **reference** - Generate a reference or leave this param blank for Paystack to generate one for you\n- **callback_url** - Overrides the callback URL set on Paystack dashboard.\n- **plan** - If transaction is to create a subscription to a predefined plan, provide plan code here. This would invalidate the value provided in `amount`\n- **invoice_limit** - Number of times to charge customer during subscription to plan\n- **metadata** - Stringified JSON object. Add a `custom_fields` attribute which has an array of objects if you would like the fields to be added to your transaction when displayed on the dashboard.\n- **subaccount** - The code for the subaccount that owns the payment.\n- **transaction_charge** - A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split).\n- **bearer** - Who bears Paystack charges? `account` or `subaccount` (defaults to `account`).\n- **channels** - Send us 'card' or 'bank' or 'card','bank' as an array to specify what options to show the user paying", + "data": [], + "dataOptions": null, + "dataMode": "raw", + "headerData": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Authorization", + "value": "Bearer sk_live_88bd6582eccfbd5801bc4f878e572ae52b4862de" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "e446091c-eefd-4073-a582-4299e3c577de", + "responses": [ + { + "id": "e6789275-2201-4f68-b496-379c7269ecb8", + "name": "Initialize Transaction", + "status": "OK", + "mime": "", + "language": "json", + "text": "{\n \"status\": true,\n \"message\": \"Authorization URL created\",\n \"data\": {\n \"authorization_url\": \"https://paystack.com/secure/5q70ef6pu1dq4qn\",\n \"access_code\": \"5q70ef6pu1dq4qn\",\n \"reference\": \"XXXREF\"\n }\n}", + "responseCode": { + "code": 200, + "name": "OK", + "detail": "" + }, + "requestObject": { + "id": "704d7de1-2c64-45c2-a16f-d12857781a0e", + "method": "POST", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json", + "dataMode": "raw", + "data": [], + "url": "https://api.paystack.co/transaction/initialize", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "rawModeData": "{\n\t\"email\": \"customer@email.com\",\n\t\"amount\": \"500000\",\n\t\"reference\": \"XXXREF\",\n\t\"metadata\": {\n \"custom_fields\": [\n {\n \"display_name\": \"Mobile Number\",\n \"variable_name\": \"mobile_number\",\n \"value\": \"+2348012345678\"\n }\n ]\n }\n}" + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3e5d58b8b8486b9d-LHR", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Encoding", + "value": "gzip", + "name": "Content-Encoding", + "description": "" + }, + { + "key": "Content-Length", + "value": "172", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Wed, 31 Jan 2018 14:26:32 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"d7-NRaST0Xb8B+N5gPWdfUh3Q\"", + "name": "ETag", + "description": "" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "Vary", + "value": "X-HTTP-Method-Override", + "name": "Vary", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3AFK0wuePK3VARObcUOKaJPenguhQFJJgH.aNleUsupaRA7X2SCoJSQIza%2BnXRBoon7J8BC8z%2BArIU; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3AFK0wuePK3VARObcUOKaJPenguhQFJJgH.aNleUsupaRA7X2SCoJSQIza%2BnXRBoon7J8BC8z%2BArIU", + "name": "sails.sid" + } + ], + "request": "f1fa7622-e735-49ca-be43-3daaf3865fe9", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "rawModeData": "{\n \"email\": \"dom@gmail.com\",\n \"amount\": 2500\n}", + "headers": "Content-Type: application/json\nAuthorization: Bearer sk_live_88bd6582eccfbd5801bc4f878e572ae52b4862de\n", + "pathVariables": {} + }, + { + "id": "f411a75a-4e79-4248-b6b1-6bb2bc521a65", + "name": "Create Page", + "url": "https://api.paystack.co/page", + "description": "**Body Params**\n- **name** (_required_) - Name of page\n- **description** - Short description of page\n- **amount** - Default amount you want to accept using this page. If none is set, customer is free to provide any amount of their choice. The latter scenario is useful for accepting donations\n- **slug** - URL slug you would like to be associated with this page. Page will be accessible at https://paystack.com/pay/[slug]\n- **redirect_url** - If you would like Paystack to redirect someplace upon successful payment, specify the URL here.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers\n- **custom_fields** - If you would like to accept custom fields, specify them here. See sample code for details.\n\nSend pages created to your customers by giving out a link in this format https://paystack.com/pay/:slug. For instance, a valid link for the page above would be https://paystack.com/pay/5nApBwZkvY", + "data": [ + { + "key": "name", + "value": "", + "type": "text" + }, + { + "key": "description", + "value": "", + "type": "text" + }, + { + "key": "amount", + "value": "500000", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "084139a8-b034-4bc7-97af-8a9d6a6022b9", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "f463ae2f-e633-4833-a686-a392a87e24b8", + "name": "Fetch Transaction", + "url": "https://api.paystack.co/transaction/id", + "description": "**Path Params**\n- **id** (_required_) - An ID for the transaction to fetch", + "data": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "e446091c-eefd-4073-a582-4299e3c577de", + "headers": "Authorization: Bearer SECRET_KEY\n", + "pathVariables": {} + }, + { + "id": "f7be8d7c-4cd9-4741-8f05-da42f0864ed6", + "name": "Resend OTP for Transfer", + "url": "https://api.paystack.co/transfer/resend_otp", + "description": "Creates a new recipient. An duplicate account number will lead to the retrieval of the existing record.\n\n**Body Params**\n- **transfer_code** (_required_) - Transfer code\n- **reason** (_required_) - either `resend_otp` or `transfer`", + "data": [ + { + "key": "transfer_code", + "value": "TRF_vsyqdmlzble3uii", + "type": "text" + } + ], + "dataMode": "urlencoded", + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET_KEY" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "93ab8f13-eb9b-457b-a06a-e1abb1940f3c", + "headers": "Authorization: Bearer SECRET_KEY\nContent-Type: application/json\n", + "pathVariables": {} + }, + { + "id": "fd878edc-b34c-4552-b166-d3d06ccd4d97", + "name": "List Refunds", + "url": "https://api.paystack.co/refund", + "description": "**Query Parameters**\n\n- **transaction**\n- **currency**", + "data": null, + "dataOptions": null, + "dataMode": null, + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET KEY" + } + ], + "method": "GET", + "pathVariableData": [], + "queryParams": [], + "auth": null, + "events": null, + "folder": "588455d8-920a-4aec-a63c-b29486d03e4f", + "responses": [ + { + "id": "015c8220-b629-4657-834c-824819924cc3", + "name": "List Refunds", + "status": "Unauthorized", + "mime": "", + "language": "json", + "text": "\n{\n \"status\": true,\n \"message\": \"Refunds retrieved\",\n \"data\": [\n {\n \"id\": 1,\n \"integration\": 100982,\n \"domain\": \"live\",\n \"transaction\": 1641,\n \"dispute\": 20,\n \"amount\": 500000,\n \"deducted_amount\": 500000,\n \"currency\": \"NGN\",\n \"channel\": \"migs\",\n \"fully_deducted\": 1,\n \"refunded_by\": \"customer@gmail.com\",\n \"refunded_at\": \"2018-01-12T10:54:47.000Z\",\n \"expected_at\": \"2017-10-01T21:10:59.000Z\",\n \"settlement\": null,\n \"customer_note\": \"xxx\",\n \"merchant_note\": \"xxx\",\n \"created_at\": \"2017-09-24T21:10:59.000Z\",\n \"updated_at\": \"2018-01-18T11:59:56.000Z\",\n \"status\": \"processed\"\n },\n {\n \"id\": 2,\n \"integration\": 100982,\n \"domain\": \"test\",\n \"transaction\": 323896,\n \"dispute\": 45,\n \"amount\": 500000,\n \"deducted_amount\": null,\n \"currency\": \"NGN\",\n \"channel\": \"migs\",\n \"fully_deducted\": null,\n \"refunded_by\": \"customer@gmail.com\",\n \"refunded_at\": \"2017-09-24T21:11:53.000Z\",\n \"expected_at\": \"2017-10-01T21:11:53.000Z\",\n \"settlement\": null,\n \"customer_note\": \"xxx\",\n \"merchant_note\": \"xxx\",\n \"created_at\": \"2017-09-24T21:11:53.000Z\",\n \"updated_at\": \"2017-09-24T21:11:53.000Z\",\n \"status\": \"pending\"\n }\n ]\n}", + "responseCode": { + "code": 401, + "name": "Unauthorized", + "detail": "" + }, + "requestObject": { + "id": "0ac5c3bc-7f31-4603-ab19-7ecb1617ddb1", + "method": "GET", + "headers": "Authorization: Bearer SECRET KEY", + "dataMode": null, + "data": null, + "rawModeData": "", + "url": "https://api.paystack.co/refund", + "pathVariableData": [], + "queryParams": [], + "headerData": [ + { + "key": "Authorization", + "value": "Bearer SECRET KEY" + } + ] + }, + "headers": [ + { + "key": "CF-RAY", + "value": "3ebe8d2f6d760a90-LHR", + "name": "CF-RAY", + "description": "" + }, + { + "key": "Connection", + "value": "keep-alive", + "name": "Connection", + "description": "" + }, + { + "key": "Content-Length", + "value": "82", + "name": "Content-Length", + "description": "" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8", + "name": "Content-Type", + "description": "" + }, + { + "key": "Date", + "value": "Mon, 12 Feb 2018 09:34:20 GMT", + "name": "Date", + "description": "" + }, + { + "key": "ETag", + "value": "W/\"52-hNi7udIfPKyFcTWyPMlgkw\"", + "name": "ETag", + "description": "" + }, + { + "key": "Expect-CT", + "value": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", + "name": "Expect-CT", + "description": "" + }, + { + "key": "Server", + "value": "cloudflare", + "name": "Server", + "description": "" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15552000; includeSubDomains; preload", + "name": "Strict-Transport-Security", + "description": "" + }, + { + "key": "X-Content-Type-Options", + "value": "nosniff", + "name": "X-Content-Type-Options", + "description": "" + }, + { + "key": "X-Powered-By", + "value": "Sails ", + "name": "X-Powered-By", + "description": "" + }, + { + "key": "set-cookie", + "value": "sails.sid=s%3A9Ws_2f_T7wJ-hiQHjkSOfnBEuZjWp-Yq.ubKRlmVDHufn8fem8Ej2YOKlZjq75CgSJh%2Fx5Dg366Q; Path=/; HttpOnly; Secure", + "name": "set-cookie", + "description": "" + } + ], + "cookies": [ + { + "expirationDate": "Sat Sep 15 2018 13:48:22 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "paystack.co", + "path": "/", + "secure": false, + "value": "d112058215f7178c3149e857f0b1346371505483302", + "name": "__cfduid" + }, + { + "expirationDate": "Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)", + "httpOnly": true, + "domain": "api.paystack.co", + "path": "/", + "secure": true, + "value": "s%3A9Ws_2f_T7wJ-hiQHjkSOfnBEuZjWp-Yq.ubKRlmVDHufn8fem8Ej2YOKlZjq75CgSJh%2Fx5Dg366Q", + "name": "sails.sid" + } + ], + "request": "fd878edc-b34c-4552-b166-d3d06ccd4d97", + "collection": "901638d5-2a95-4ad3-92d9-886d4046e8b4" + } + ], + "headers": "Authorization: Bearer SECRET KEY\n", + "pathVariables": {} + } + ] +} diff --git a/parsers/formattedAPIs.json b/parsers/formattedAPIs.json index 9ecd27e..989b6b3 100644 --- a/parsers/formattedAPIs.json +++ b/parsers/formattedAPIs.json @@ -1,2310 +1,2310 @@ { - "subaccount": [ - { - "api": "update", - "endpoint": "https://api.paystack.co/subaccount", - "method": "PUT", - "params": [], - "description": null - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/subaccount", - "method": "GET", - "params": [], - "description": null - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/subaccount", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" - }, - { - "api": "create", - "endpoint": "https://api.paystack.co/subaccount", - "method": "POST", - "params": [ - { - "parameter": "business_name", - "required": true, - "type": "String" - }, - { - "parameter": "settlement_bank", - "required": true, - "type": "String" - }, - { - "parameter": "account_number", - "required": true, - "type": "String" - }, - { - "parameter": "percentage_charge", - "required": true, - "type": "String" - }, - { - "parameter": "primary_contact_email", - "required": false, - "type": "String" - }, - { - "parameter": "primary_contact_name", - "required": false, - "type": "String" - }, - { - "parameter": "primary_contact_phone", - "required": false, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - }, - { - "parameter": "settlement_schedule", - "required": false, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "eceive payments for the created subaccount by providing their code when doing a transaction. More details here: [Split Payments Overview](https://developers.paystack.co/v1.0/docs/splitpaymentsoverview", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **business_name** (_required_) - Name of business for subaccount\n- **settlement_bank** (_required_) - Name of Bank (see list of accepted names by calling [List Banks](https://developers.paystack.co/v1.0/docs/list-banks)\n- **account_number** (_required_) - NUBAN Bank Account Number\n- **percentage_charge** (_required_) - What is the default percentage charged when receiving on behalf of this subaccount?\n- **primary_contact_email** - A contact email for the subaccount\n- **primary_contact_name** - A name for the contact person for this subaccount\n- **primary_contact_phone** - A phone number to call for this subaccount\n- **metadata** - Stringified JSON object\n- **settlement_schedule** - Any of `auto`, `weekly`, `monthly`, `manual`. Auto means payout is T+1 and manual means payout to the subaccount should only be made when requested.\n\nReceive payments for the created subaccount by providing their code when doing a transaction. More details here: [Split Payments Overview](https://developers.paystack.co/v1.0/docs/split-payments-overview)" - } - ], - "page": [ - { - "api": "update", - "endpoint": "https://api.paystack.co/page/", - "method": "PUT", - "params": [ - { - "parameter": "name", - "required": false, - "type": "String" - }, - { - "parameter": "description", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "active", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **name** - Name of page\n- **description** - Short description of page\n- **amount** - Amount to be charged in kobo. Will override the amount for existing subscriptions.\n- **active** - Set to false to deactivate page url." - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/page/id_or_plan_code", - "method": "GET", - "params": [], - "description": null - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/page", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - }, - { - "parameter": "interval", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **interval** - Filter list by plans with specified interval\n- **amount** - Filter list by plans with specified amount (in kobo)" - }, - { - "api": "check", - "endpoint": "https://api.paystack.co/page/check_slug_availability/slug", - "method": "GET", - "params": [ - { - "parameter": "slug", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **slug** (_required_) - URL slug to be confirmed" - }, - { - "api": "create", - "endpoint": "https://api.paystack.co/page", - "method": "POST", - "params": [ - { - "parameter": "name", - "required": true, - "type": "String" - }, - { - "parameter": "description", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "slug", - "required": false, - "type": "String" - }, - { - "parameter": "redirect_url", - "required": false, - "type": "String" - }, - { - "parameter": "send_invoices", - "required": false, - "type": "String" - }, - { - "parameter": "custom_fields", - "required": false, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "end pages created to your customers by giving out a link in this format https://paystack.com/pay/:slug. For instance, a valid link for the page above would be https://paystack.com/pay/5nApBwZkv", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **name** (_required_) - Name of page\n- **description** - Short description of page\n- **amount** - Default amount you want to accept using this page. If none is set, customer is free to provide any amount of their choice. The latter scenario is useful for accepting donations\n- **slug** - URL slug you would like to be associated with this page. Page will be accessible at https://paystack.com/pay/[slug]\n- **redirect_url** - If you would like Paystack to redirect someplace upon successful payment, specify the URL here.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers\n- **custom_fields** - If you would like to accept custom fields, specify them here. See sample code for details.\n\nSend pages created to your customers by giving out a link in this format https://paystack.com/pay/:slug. For instance, a valid link for the page above would be https://paystack.com/pay/5nApBwZkvY" - } - ], - "transfer": [ - { - "api": "list", - "endpoint": "https://api.paystack.co/transfer", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" - }, - { - "api": "finalize", - "endpoint": "https://api.paystack.co/transfer/finalize_transfer", - "method": "POST", - "params": [ - { - "parameter": "transfer_code", - "required": true, - "type": "String" - }, - { - "parameter": "otp", - "required": true, - "type": "String" - } - ], - "description": "**Body Params**\n- **transfer_code** (_required_) - Transfer code\n- **otp** (_required_) - OTP sent to business phone to verify transfer." - }, - { - "api": "initiate", - "endpoint": "https://api.paystack.co/transfer", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "source", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "reason", - "required": false, - "type": "String" - }, - { - "parameter": "recipient", - "required": true, - "type": "String" - }, - { - "parameter": "reference", - "required": false, - "type": "String" - } - ], - "description": "Status of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’.\n\n**Body Params**\n- **source** (_required_) - Where should we transfer from? Only balance for now\n- **amount** - Amount to transfer in kobo\n- **currency** - NGN\n- **reason**\n- **recipient** (_required_) - Code for transfer recipient\n- **reference** - If specified, the field should be a unique identifier (in lowercase) for the object. Only `-` `,` `_` and alphanumeric characters allowed." - }, - { - "api": "verify", - "endpoint": "{reference}", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" - }, - { - "api": "disable", - "endpoint": "https://api.paystack.co/transfer/disable_otp", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "n the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. An OTP is sent to you on your business phone", - "required": true, - "type": "String" - } - ], - "description": "In the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. You will get an OTP.\n\nIn the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. An OTP is sent to you on your business phone." - }, - { - "api": "enable", - "endpoint": "https://api.paystack.co/transfer/enable_otp", - "method": "POST", - "params": [], - "description": "In the event that a customer wants to stop being able to complete transfers programmatically, this endpoint helps turn OTP requirement back on. No arguments required." - }, - { - "api": "initiate", - "endpoint": "https://api.paystack.co/transfer/bulk", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "(no name)", - "required": false, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "tatus of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’", - "required": true, - "type": "String" - } - ], - "description": "You need to disable the Transfers OTP requirement to use this endpoint.\n\n**Body Params**\n- **(no name)**\n\nStatus of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’." - }, - { - "api": "finalize", - "endpoint": "https://api.paystack.co/transfer/disable_otp_finalize", - "method": "POST", - "params": [ - { - "parameter": "otp", - "required": true, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **otp** (_required_) - OTP sent to business phone to verify disabling OTP requirement\n\n" - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/transfer/id", - "method": "GET", - "params": [ - { - "parameter": "id_or_code", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **id_or_code** (_required_) - An ID or code for the transfer whose details you want to retrieve." - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/transfer/id_or_code", - "method": "GET", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Query Params", - "required": false, - "type": "String" - }, - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "This lists all bulk charge batches created by the integration. Statuses can be `active`, `paused`, or `complete`.\n\n**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" - }, - { - "api": "resend", - "endpoint": "https://api.paystack.co/transfer/resend_otp", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "transfer_code", - "required": true, - "type": "String" - }, - { - "parameter": "reason", - "required": true, - "type": "String" - } - ], - "description": "Creates a new recipient. An duplicate account number will lead to the retrieval of the existing record.\n\n**Body Params**\n- **transfer_code** (_required_) - Transfer code\n- **reason** (_required_) - either `resend_otp` or `transfer`" - } - ], - "paymentrequest": [ - { - "api": "create", - "endpoint": "https://api.paystack.co/paymentrequest", - "method": "POST", - "params": [ - { - "parameter": "customer", - "required": true, - "type": "String" - }, - { - "parameter": "due_date", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": true, - "type": "Number" - }, - { - "parameter": "description", - "required": false, - "type": "String" - }, - { - "parameter": "line_items", - "required": false, - "type": "String" - }, - { - "parameter": "tax", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "send_notification", - "required": false, - "type": "String" - }, - { - "parameter": "draft", - "required": false, - "type": "String" - }, - { - "parameter": "send_notification", - "required": false, - "type": "String" - }, - { - "parameter": "has_invoice", - "required": false, - "type": "String" - }, - { - "parameter": "invoice_number", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **customer** (_required_) - Customer ID or code\n- **due_date** (_required_) - ISO 8601 representation of request due date\n- **amount** (_required_) - Invoice amount. Only useful if line items and tax values are ignored. endpoint will throw a friendly warning if neither is available.\n- **description**\n- **line_items** - Array of line items in the format `[{\"name\":\"item 1\", \"amount\":2000}]`\n- **tax** - Array of taxes to be charged in the format `[{\"name\":\"VAT\", \"amount\":2000}]`\n- **currency** - Defaults to Naira\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`.\n- **draft** - Indicate if request should be saved as draft. Defaults to `false` and overrides send_notification.\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`.\n- **has_invoice** - Set to `true` to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no `line_items` or `tax` passed.\n- **invoice_number** - Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point." - }, - { - "api": "finalize", - "endpoint": "https://api.paystack.co/paymentrequest/finalize/ID_OR_CODE", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "send_notification", - "required": false, - "type": "String" - } - ], - "description": "Publishes invoice that is draft by sending customer the invoice via email\n\n**Body Params**\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`" - }, - { - "api": "send", - "endpoint": "https://api.paystack.co/paymentrequest/notify/ID_OR_CODE", - "method": "POST", - "params": [ - { - "parameter": "id", - "required": false, - "type": "String" - } - ], - "description": "**Path Params**\n- **id** - Invoice code for which you want to send a notification for" - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/paymentrequest", - "method": "GET", - "params": [ - { - "parameter": "customer", - "required": false, - "type": "String" - }, - { - "parameter": "status", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "paid", - "required": false, - "type": "String" - }, - { - "parameter": "include_archive", - "required": false, - "type": "String" - }, - { - "parameter": "payment_request", - "required": false, - "type": "String" - } - ], - "description": "**Query Params**\n- **customer** - Specify an ID for the customer whose requests you want to retrieve\n- **status** - Filter requests by status ('failed', 'success', 'abandoned')\n- **currency** - Filter requests sent in a particular currency.\n- **paid** - Filter requests that have been paid for \n- **include_archive** - Includes archived requests in the response\n- **payment_request** - Filter specific invoice by passing invoice code" - }, - { - "api": "view", - "endpoint": "https://api.paystack.co/paymentrequest/REQUEST_ID_OR_CODE", - "method": "GET", - "params": [ - { - "parameter": "id", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **id** _(required)_ - An ID for the Invoice" - }, - { - "api": "invoice", - "endpoint": "https://api.paystack.co/paymentrequest/totals", - "method": "GET", - "params": [], - "description": null - }, - { - "api": "update", - "endpoint": "https://api.paystack.co/paymentrequest/ID_OR_CODE", - "method": "PUT", - "params": [ - { - "parameter": "description", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "line_item", - "required": false, - "type": "String" - }, - { - "parameter": "tax", - "required": false, - "type": "String" - }, - { - "parameter": "due_date", - "required": false, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - }, - { - "parameter": "send_notification", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "customer", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **description**\n- **amount**\n- **line_item**\n- **tax**\n- **due_date**\n- **metadata**\n- **send_notification**\n- **currency** - only works in draft mode\n- **customer** - only works in draft mode" - }, - { - "api": "verify", - "endpoint": "https://api.paystack.co/paymentrequest/verify/ID_OR_CODE", - "method": "GET", - "params": [ - { - "parameter": "ID", - "required": false, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "ote that a key is added called `pending_amount` when you fetch an invoice. This is because when paying for an invoice, you can choose to pay part but not all. Whenever a successful transaction is made, the key updates to reveal what’s left of the invoice to pay", - "required": false, - "type": "String" - } - ], - "description": "**Path Params**\n- **ID** - The invoice code for the Payment Request to be verified\n\nNote that a key is added called `pending_amount` when you fetch an invoice. This is because when paying for an invoice, you can choose to pay part but not all. Whenever a successful transaction is made, the key updates to reveal what’s left of the invoice to pay." - } - ], - "transferrecipient": [ - { - "api": "create", - "endpoint": "https://api.paystack.co/transferrecipient", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "type", - "required": true, - "type": "String" - }, - { - "parameter": "name", - "required": true, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - }, - { - "parameter": "bank_code", - "required": true, - "type": "String" - }, - { - "parameter": "account_number", - "required": true, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "description", - "required": false, - "type": "String" - } - ], - "description": "Creates a new recipient. An duplicate account number will lead to the retrieval of the existing record.\n\n**Body Params**\n- **type** (_required_) - Recipient Type (Only nuban at this time)\n- **name** (_required_) - A name for the recipient\n- **metadata** - Store additional information about your recipient in a structured format. JSON\n- **bank_code** (_required_) - Required if type is nuban. You can find a list of bank codes at [api.paystack.co/bank](https://api.paystack.co/bank)\n- **account_number** (_required_) - Required if type is `nuban`\n- **currency** - Currency for the account receiving the transfer.\n- **description**" - }, - { - "api": "delete", - "endpoint": "{recipient_code_or_id}", - "method": "DELETE", - "params": [], - "description": null - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/transferrecipient", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" - }, - { - "api": "update", - "endpoint": "{recipient_code_or_id}", - "method": "PUT", - "params": [], - "description": null - } - ], - "subscription": [ - { - "api": "disable", - "endpoint": "https://api.paystack.co/subscription/disable", - "method": "POST", - "params": [ - { - "parameter": "code", - "required": true, - "type": "String" - }, - { - "parameter": "token", - "required": true, - "type": "String" - } - ], - "description": "**Body Params**\n- **code** (_required_) - Subscription code\n- **token** (_required_) - Email token" - }, - { - "api": "fetch", - "endpoint": ":id_or_subscription_code", - "method": "GET", - "params": [], - "description": null - }, - { - "api": "create", - "endpoint": "https://api.paystack.co/subscription", - "method": "POST", - "params": [ - { - "parameter": "customer", - "required": true, - "type": "String" - }, - { - "parameter": "plan", - "required": true, - "type": "String" - }, - { - "parameter": "authorization", - "required": false, - "type": "String" - }, - { - "parameter": "start_date", - "required": false, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "ote the `email_token` attribute for the subscription object. We create one on each subscription so customers can cancel their subscriptions from within the invoices sent to their mailboxes. Since they are not authorized, the email tokens are what we use to authenticate the requests over the API", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **customer** (_required_) - Customer's email address or customer code\n- **plan** (_required_) - Plan code\n- **authorization** - If customer has multiple authorizations, you can set the desired authorization you wish to use for this subscription here. If this is not supplied, the customer's most recent authorization would be used\n- **start_date** - Set the date for the first debit. (ISO 8601 format)\n\nNote the `email_token` attribute for the subscription object. We create one on each subscription so customers can cancel their subscriptions from within the invoices sent to their mailboxes. Since they are not authorized, the email tokens are what we use to authenticate the requests over the API." - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/subscription", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - }, - { - "parameter": "customer", - "required": false, - "type": "String" - }, - { - "parameter": "plan", - "required": false, - "type": "String" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **customer** - Filter by Customer ID\n- **plan** - Filter by Plan ID" - }, - { - "api": "enable", - "endpoint": "https://api.paystack.co/subscription/enable", - "method": "POST", - "params": [ - { - "parameter": "code", - "required": true, - "type": "String" - }, - { - "parameter": "token", - "required": true, - "type": "String" - } - ], - "description": "**Body Params**\n- **code** (_required_) - Subscription code\n- **token** (_required_) - Email token" - } - ], - "bulkcharge": [ - { - "api": "fetch", - "endpoint": "https://api.paystack.co/bulkcharge/id_or_code", - "method": "GET", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Path Params", - "required": false, - "type": "String" - }, - { - "parameter": "id_or_code", - "required": true, - "type": "String" - } - ], - "description": "This endpoint retrieves a specific batch code. It also returns useful information on its progress by way of the `total_charges` and `pending_charges` attributes.\n\n**Path Params**\n- **id_or_code** (_required_) - An ID or code for the transfer whose details you want to retrieve." - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/bulkcharge/id_or_code/charges", - "method": "GET", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Path Params", - "required": false, - "type": "String" - }, - { - "parameter": "id_or_code", - "required": true, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Query Params", - "required": false, - "type": "String" - }, - { - "parameter": "status", - "required": false, - "type": "String" - }, - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - }, - { - "parameter": "", - "required": false, - "type": "String" - } - ], - "description": "This endpoint retrieves the charges associated with a specified batch code. Pagination parameters are available. You can also filter by status. Charge statuses can be `pending`, `success` or `failed`.\n\n**Path Params**\n- **id_or_code** (_required_) - An ID or code for the batch whose charges you want to retrieve.\n\n**Query Params**\n- **status** - `pending`, `success` or `failed`\n- **perPage**\n- **page**\n" - }, - { - "api": "initiate", - "endpoint": "https://api.paystack.co/bulkcharge", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "(no_name)", - "required": false, - "type": "String" - } - ], - "description": "Send an array of objects with authorization codes and amount in kobo so we can process transactions as a batch.\n\n**Body Params**\n- **(no_name)**" - }, - { - "api": "resume", - "endpoint": "https://api.paystack.co/bulkcharge/resume/batch_code", - "method": "GET", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Path Params", - "required": false, - "type": "String" - }, - { - "parameter": "batch_code", - "required": true, - "type": "String" - } - ], - "description": "Use this endpoint to pause processing a batch\n\n**Path Params**\n- **batch_code** (_required_)" - }, - { - "api": "pause", - "endpoint": "https://api.paystack.co/bulkcharge/pause/batch_code", - "method": "GET", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Path Params", - "required": false, - "type": "String" - }, - { - "parameter": "batch_code", - "required": true, - "type": "String" - } - ], - "description": "Use this endpoint to pause processing a batch\n\n**Path Params**\n- **batch_code** (_required_)" - } - ], - "bank": [ - { - "api": "list", - "endpoint": "https://api.paystack.co/bank", - "method": "GET", - "params": [], - "description": null - }, - { - "api": "resolve", - "endpoint": "?account_number=ACCOUNT_NUMBER&bank_code=BANK_CODE", - "method": "GET", - "params": [ - { - "parameter": "account_number", - "required": false, - "type": "String" - }, - { - "parameter": "bank_code", - "required": false, - "type": "String" - } - ], - "description": "**Path Params**\n- **account_number** - Account Number\n- **bank_code** - Bank Code" - }, - { - "api": "resolve", - "endpoint": "{BVN}", - "method": "GET", - "params": [ - { - "parameter": "bvn", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **bvn** (_required_) - 11 digit BVN" - }, - { - "api": "match", - "endpoint": "{ACCOUNT_NUMBER}&bank_code={BANK_CODE}&bvn={BVN}", - "method": "GET", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Path Params", - "required": false, - "type": "String" - }, - { - "parameter": "*account_number* _(required)_ Bank account numbe", - "required": true, - "type": "String" - }, - { - "parameter": "*bank_code* _(required)_ Bank code from [List Bank endpoint](https://api.paystack.co/bank", - "required": true, - "type": "String" - }, - { - "parameter": "*bvn* _(required)_ 11 digit BV", - "required": true, - "type": "String" - } - ], - "description": "The Match BVN endpoint checks if the account number for a bank belongs to a user's BVN\n\n**Path Params**\n- *account_number* _(required)_ - Bank account number\n- *bank_code* _(required)_ - Bank code from [List Bank endpoint](https://api.paystack.co/bank)\n- *bvn* _(required)_ - 11 digit BVN" - } - ], - "charge": [ - { - "api": "submit", - "endpoint": "https://api.paystack.co/charge/submit_otp", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "otp", - "required": true, - "type": "String" - }, - { - "parameter": "reference", - "required": true, - "type": "String" - } - ], - "description": "Submit OTP to complete a charge\n\n**Body Params**\n- **otp** (_required_) - OTP submitted by user\n- **reference** (_required_) - reference for ongoing transaction" - }, - { - "api": "submit", - "endpoint": "https://api.paystack.co/charge/submit_pin", - "method": "POST", - "params": [ - { - "parameter": "pin", - "required": true, - "type": "String" - }, - { - "parameter": "reference", - "required": true, - "type": "String" - } - ], - "description": "**Body Params**\n- **pin** (_required_) - PIN submitted by user\n- **reference** (_required_) - reference for transaction that requested pin" - }, - { - "api": "submit", - "endpoint": "https://api.paystack.co/charge/submit_birthday", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "birthday", - "required": true, - "type": "String" - }, - { - "parameter": "reference", - "required": true, - "type": "String" - } - ], - "description": "Submit Birthday when requested\n\n**Body Params**\n- **birthday** (_required_) - Birthday number submitted by user\n- **reference** (_required_) - reference for ongoing transaction" - }, - { - "api": "tokenize", - "endpoint": "https://api.paystack.co/charge/tokenize", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "email", - "required": true, - "type": "String" - }, - { - "parameter": "card", - "required": true, - "type": "String" - }, - { - "parameter": "card.number", - "required": true, - "type": "String" - }, - { - "parameter": "card.cvv", - "required": true, - "type": "String" - }, - { - "parameter": "card.expiry_month", - "required": true, - "type": "String" - }, - { - "parameter": "card.expiry_year", - "required": true, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - } - ], - "description": "Send an array of objects with authorization codes and amount in kobo so we can process transactions as a batch.\n\n**Body Params**\n- **email** (_required_) - Customer's email address\n- **card** (_required_) - Card to tokenize\n- **card.number** (_required_) - Card to tokenize\n- **card.cvv** (_required_) - Card security code\n- **card.expiry_month** (_required_) - Expiry month of card\n- **card.expiry_year** (_required_) - Expiry year of card\n" - }, - { - "api": "check", - "endpoint": "https://api.paystack.co/charge/reference", - "method": "GET", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "reference", - "required": true, - "type": "String" - } - ], - "description": "When you get \"pending\" as a charge status, wait 30 seconds or more, then make a check to see if its status has changed. Don't call too early as you may get a lot more pending than you should.\n\n**Body Params**\n- **reference** (_required_) - The reference to check" - }, - { - "api": "charge", - "endpoint": "https://api.paystack.co/charge", - "method": "POST", - "params": [ - { - "parameter": "imple guide to charging cards directly https://developers.paystack.co/docs/chargingfromyourbacken", - "required": false, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "email", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": true, - "type": "Number" - }, - { - "parameter": "card", - "required": true, - "type": "String" - }, - { - "parameter": "card.number", - "required": true, - "type": "String" - }, - { - "parameter": "card.cvv", - "required": true, - "type": "String" - }, - { - "parameter": "card.expiry_month", - "required": true, - "type": "String" - }, - { - "parameter": "card.expiry_year", - "required": true, - "type": "String" - }, - { - "parameter": "bank", - "required": false, - "type": "String" - }, - { - "parameter": "bank.code", - "required": true, - "type": "String" - }, - { - "parameter": "bank.account_number", - "required": true, - "type": "String" - }, - { - "parameter": "authorization_code", - "required": false, - "type": "String" - }, - { - "parameter": "pin", - "required": false, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - } - ], - "description": "Send card details or bank details or authorization code to start a charge.\nSimple guide to charging cards directly https://developers.paystack.co/docs/charging-from-your-backend\n\n**Body Params**\n- **email** (_required_) - Customer's email address\n- **amount** (_required_) - Amount in kobo\n- **card** (_required_) - Card number\n- **card.number** (_required_) - Card to tokenize\n- **card.cvv** (_required_) - Card security code\n- **card.expiry_month** (_required_) - Expiry month of card\n- **card.expiry_year** (_required_) - Expiry year of card\n- **bank** - Bank account to charge (don't send if charging an authorization code or card)\n- **bank.code** (_required_) - A code for the [bank](https://developers.paystack.co/v1.0/ref/banks) (check banks for the banks supported). Only the ones for which paywithbank is true will work.\n- **bank.account_number** (_required_) - 10 digit nuban for the account to charge\n- **authorization_code** - An authorization code to charge (don't send if charging a card or bank account)\n- **pin** - 4-digit PIN (send with a non-reusable authorization code)\n- **metadata** - A JSON object" - }, - { - "api": "submit", - "endpoint": "https://api.paystack.co/charge/submit_phone", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "phone", - "required": true, - "type": "String" - }, - { - "parameter": "reference", - "required": true, - "type": "String" - } - ], - "description": "Submit Phone when requested\n\n**Body Params**\n- **phone** (_required_) - Phone number submitted by user\n- **reference** (_required_) - reference for ongoing transaction" - } - ], - "transaction": [ - { - "api": "verify", - "endpoint": "{REFERENCE}", - "method": "GET", - "params": [ - { - "parameter": "reference", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **reference** (_required_)" - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/transaction", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - }, - { - "parameter": "customer", - "required": false, - "type": "String" - }, - { - "parameter": "status", - "required": false, - "type": "String" - }, - { - "parameter": "from", - "required": false, - "type": "String" - }, - { - "parameter": "to", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **customer** - Specify an ID for the customer whose transactions you want to retrieve\n- **status** - Filter transactions by status ('failed', 'success', 'abandoned')\n- **from** - A timestamp from which to start listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21\n- **to** - A timestamp at which to stop listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21\n- **amount** - Filter transactions by amount. Specify the amount in kobo." - }, - { - "api": "view", - "endpoint": ":id_or_reference", - "method": "GET", - "params": [], - "description": null - }, - { - "api": "charge", - "endpoint": "https://api.paystack.co/transaction/charge_authorization", - "method": "POST", - "params": [ - { - "parameter": "reference", - "required": false, - "type": "String" - }, - { - "parameter": "authorization_code", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": true, - "type": "Number" - }, - { - "parameter": "plan", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": " email", - "required": true, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - }, - { - "parameter": "subaccount", - "required": false, - "type": "String" - }, - { - "parameter": "transaction_charge", - "required": false, - "type": "String" - }, - { - "parameter": "bearer", - "required": false, - "type": "String" - }, - { - "parameter": "invoice_limit", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **reference** - Unique transaction reference. Only `-` `,` `.` `,` `=` and alphanumeric characters allowed. System will generate one if none is provided\n- **authorization_code** - (_required_) Valid authorization code to charge\n- **amount** - (_required_) Amount in kobo\n- **plan** - If transaction is to create a subscription to a predefined plan, provide plan code here\n- **currency** - Currency in which amount should be charged\n- ** email** (_required_) - Customer's email address\n- **metadata** - Add a `custom_fields` attribute which has an array of objects if you would like the fields to be added to your transaction when displayed on the dashboard.\n- **subaccount** - The code for the subaccount that owns the payment.\n- **transaction_charge** - A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split).\n- **bearer** - Who bears Paystack charges? `account` or `subaccount`?\n- **invoice_limit** - Number of invoices to raise during the subscription. Overrides `invoice_limit` set on plan." - }, - { - "api": "export", - "endpoint": "https://api.paystack.co/transaction/export", - "method": "GET", - "params": [ - { - "parameter": "from", - "required": false, - "type": "String" - }, - { - "parameter": "to", - "required": false, - "type": "String" - }, - { - "parameter": "settled", - "required": false, - "type": "String" - }, - { - "parameter": "payment_page", - "required": false, - "type": "String" - }, - { - "parameter": "customer", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "settlement", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "status", - "required": false, - "type": "String" - } - ], - "description": "**Query Params**\n- **from** - Lower bound of date range. Leave undefined to export transactions from day one.\n- **to** - Upper bound of date range. Leave undefined to export transactions till date.\n- **settled** - Set to `true` to export only settled transactions. `false` for pending transactions. Leave undefined to export all transactions\n- **payment_page** - Specify a payment page's id to export only transactions conducted on said page\n- **customer** - Specify customer id.\n- **currency** - Currency in which you are charging the customer in.\n- **settlement** - An ID for the settlement whose transactions we should export\n- **amount** - Amount for transactions to export\n- **status** - Status for transactions to export" - }, - { - "api": "check", - "endpoint": "https://api.paystack.co/transaction/check_authorization", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "authorization_code", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": true, - "type": "Number" - }, - { - "parameter": "email", - "required": true, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "n test mode, we will return insufficient funds for an amount greater than or equal 500,000 naira", - "required": false, - "type": "String" - } - ], - "description": "All mastercard and visa authorizations can be checked with this endpoint to know if they have funds for the payment you seek.\n\n**Body Params**\n- **authorization_code** (_required_) - Authorization code for mastercard or VISA authorization belonging to email.\n- **amount** (_required_) - Amount in kobo\n- **email** (_required_) - Customer's email address\n- **currency** - A currency for the amount we want to check\n\nIn test mode, we will return insufficient funds for an amount greater than or equal 500,000 naira." - }, - { - "api": "transaction", - "endpoint": "https://api.paystack.co/transaction/totals", - "method": "GET", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Query Params", - "required": false, - "type": "String" - }, - { - "parameter": "from", - "required": false, - "type": "String" - }, - { - "parameter": "to", - "required": false, - "type": "String" - } - ], - "description": "Total amount received on your account\n\n**Query Params**\n- **from** - Lower bound of date range. Leave undefined to show totals from day one.\n- **to** - Upper bound of date range. Leave undefined to show totals till date." - }, - { - "api": "initialize", - "endpoint": "https://api.paystack.co/transaction/initialize", - "method": "POST", - "params": [ - { - "parameter": "email", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": true, - "type": "Number" - }, - { - "parameter": "reference", - "required": false, - "type": "String" - }, - { - "parameter": "callback_url", - "required": false, - "type": "String" - }, - { - "parameter": "plan", - "required": false, - "type": "String" - }, - { - "parameter": "invoice_limit", - "required": false, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - }, - { - "parameter": "subaccount", - "required": false, - "type": "String" - }, - { - "parameter": "transaction_charge", - "required": false, - "type": "String" - }, - { - "parameter": "bearer", - "required": false, - "type": "String" - }, - { - "parameter": "channels", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **email** (_required_) - Customer's email address\n- **amount** (_required_) - Amount in kobo\n- **reference** - Generate a reference or leave this param blank for Paystack to generate one for you\n- **callback_url** - Overrides the callback URL set on Paystack dashboard.\n- **plan** - If transaction is to create a subscription to a predefined plan, provide plan code here. This would invalidate the value provided in `amount`\n- **invoice_limit** - Number of times to charge customer during subscription to plan\n- **metadata** - Stringified JSON object. Add a `custom_fields` attribute which has an array of objects if you would like the fields to be added to your transaction when displayed on the dashboard.\n- **subaccount** - The code for the subaccount that owns the payment.\n- **transaction_charge** - A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split).\n- **bearer** - Who bears Paystack charges? `account` or `subaccount` (defaults to `account`).\n- **channels** - Send us 'card' or 'bank' or 'card','bank' as an array to specify what options to show the user paying" - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/transaction/id", - "method": "GET", - "params": [ - { - "parameter": "id", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **id** (_required_) - An ID for the transaction to fetch" - } - ], - "plan": [ - { - "api": "update", - "endpoint": ":id_or_plan_code", - "method": "PUT", - "params": [ - { - "parameter": "name", - "required": false, - "type": "String" - }, - { - "parameter": "description", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "interval", - "required": false, - "type": "String" - }, - { - "parameter": "send_invoices", - "required": false, - "type": "String" - }, - { - "parameter": "send_sms", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "invoice_limit", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **name** - Name of plan\n- **description** - Short description of plan\n- **amount** - Amount to be charged in kobo. Will override the amount for existing subscriptions.\n- **interval** - Interval in words. Valid intervals are `hourly`, `daily`, `weekly`, `monthly`, `annually`.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers.\n- **send_sms** - Set to false if you don't want text messages to be sent to your customers\n- **currency** - Currency in which amount is set\n- **invoice_limit** - Number of invoices to raise during subscription to this plan. Will not override `invoice_limit` set on active subscriptions." - }, - { - "api": "create", - "endpoint": "https://api.paystack.co/plan", - "method": "POST", - "params": [ - { - "parameter": "name", - "required": true, - "type": "String" - }, - { - "parameter": "description", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": true, - "type": "Number" - }, - { - "parameter": "interval", - "required": true, - "type": "String" - }, - { - "parameter": "send_invoices", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "invoice_limit", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **name** (_required_) - Name of plan\n- **description** - Short description of plan\n- **amount** (_required_) - Amount to be charged in kobo\n- **interval** (_required_) - Interval in words. Valid intervals are `hourly`, `daily`, `weekly`, `monthly`, `annually`.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers\n- **currency** - Currency in which amount is set\n- **invoice_limit** - Number of invoices to raise during subscription to this plan. Can be overridden by specifying an `invoice_limit` while subscribing." - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/plan", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - }, - { - "parameter": "interval", - "required": false, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **interval** - Filter list by plans with specified interval\n- **amount** - Filter list by plans with specified amount (in kobo)" - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/plan/id_or_plan_code", - "method": "GET", - "params": [], - "description": null - } - ], - "customer": [ - { - "api": "update", - "endpoint": "https://api.paystack.co/customer/:ID_OR_CUSTOMER_CODE", - "method": "PUT", - "params": [ - { - "parameter": "first_name", - "required": false, - "type": "String" - }, - { - "parameter": "last_name", - "required": false, - "type": "String" - }, - { - "parameter": "phone", - "required": false, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **first_name** - Customer's first name\n- **last_name** - Customer's last name\n- **phone** - Customer's phone number\n- **metadata** - A set of key/value pairs that you can attach to the customer. It can be used to store additional information in a structured format." - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/customer", - "method": "GET", - "params": [ - { - "parameter": "perPage", - "required": false, - "type": "String" - }, - { - "parameter": "page", - "required": false, - "type": "Number" - } - ], - "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" - }, - { - "api": "create", - "endpoint": "https://api.paystack.co/customer", - "method": "POST", - "params": [ - { - "parameter": "email", - "required": true, - "type": "String" - }, - { - "parameter": "first_name", - "required": false, - "type": "String" - }, - { - "parameter": "last_name", - "required": false, - "type": "String" - }, - { - "parameter": "phone", - "required": false, - "type": "String" - }, - { - "parameter": "metadata", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **email** (_required_) - Customer's email address\n- **first_name** - Customer's first name\n- **last_name** - Customer's last name\n- **phone** - Customer's phone number\n- **metadata** - A set of key/value pairs that you can attach to the customer. It can be used to store additional information in a structured format." - }, - { - "api": "fetch", - "endpoint": ":id_or_customer_code", - "method": "GET", - "params": [ - { - "parameter": "exclude_transactions", - "required": false, - "type": "String" - } - ], - "description": "**Query Params**\n- **exclude_transactions** - By default, fetching a customer returns all their transactions. Set this to true to disable this behaviour." - }, - { - "api": "white/blacklist", - "endpoint": "https://api.paystack.co/customer/set_risk_action", - "method": "POST", - "params": [ - { - "parameter": "customer", - "required": false, - "type": "String" - }, - { - "parameter": "risk_action", - "required": false, - "type": "String" - } - ], - "description": "**Body Params**\n- **customer** - Customer's ID, code, or email address\n- **risk_action** - One of the possible risk actions. `allow` to whitelist. `deny` to blacklist." - }, - { - "api": "deactivate", - "endpoint": "https://api.paystack.co/customer/deactivate_authorization", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "authorization_code", - "required": true, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "", - "required": false, - "type": "String" - } - ], - "description": "For when the card needs to be forgotten...\n\n**Body Params**\n- **authorization_code** (_required_) - Authorization code to be deactivated\n\n" - } - ], - "refund": [ - { - "api": "create", - "endpoint": "https://api.paystack.co/refund", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Params", - "required": false, - "type": "String" - }, - { - "parameter": "transaction", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "customer_note", - "required": false, - "type": "String" - }, - { - "parameter": "merchant_note", - "required": false, - "type": "String" - } - ], - "description": "This creates a refund which is then processed by the Paystack team\n\n**Body Params**\n- **transaction** _(required)_: Identifier for transaction to be refunded\n- **amount** _(optional)_: How much in kobo to be refunded to the customer. Amount is optional(defaults to original transaction amount) and cannot be more than the original transaction amount.\n- **currency**: Three-letter ISO currency\n- **customer_note** _(optional)_: customer reason\n- **merchant_note** _(optional)_: merchant reason" - }, - { - "api": "fetch", - "endpoint": ":id", - "method": "GET", - "params": [ - { - "parameter": "id", - "required": false, - "type": "String" - } - ], - "description": "**Path Params**\n- **id** - ID of the transaction to be refunded" - }, - { - "api": "fetch", - "endpoint": ":id", - "method": "GET", - "params": [ - { - "parameter": "id", - "required": false, - "type": "String" - } - ], - "description": "**Path Params**\n- **id** - ID of the transaction to be refunded" - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/refund", - "method": "GET", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "transaction", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - } - ], - "description": "**Query Parameters**\n\n- **transaction**\n- **currency**" - }, - { - "api": "list", - "endpoint": "https://api.paystack.co/refund", - "method": "GET", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "transaction", - "required": false, - "type": "String" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - } - ], - "description": "**Query Parameters**\n\n- **transaction**\n- **currency**" - } - ], - "integration": [ - { - "api": "update", - "endpoint": "https://api.paystack.co/integration/payment_session_timeout", - "method": "PUT", - "params": [ - { - "parameter": "timeout", - "required": false, - "type": "String" - } - ], - "description": "**Query Params**\n- **timeout** - Time before stopping session (in seconds). Set to 0 to cancel session timeouts" - }, - { - "api": "fetch", - "endpoint": "https://api.paystack.co/integration/payment_session_timeout", - "method": "GET", - "params": [], - "description": null - } - ], - "refund?from&to&page&perPage&transaction&status": [ - { - "api": "list", - "endpoint": "?from&to&page&perPage&transaction&status", - "method": "GET", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Query Params", - "required": false, - "type": "String" - }, - { - "parameter": "transaction", - "required": true, - "type": "String" - }, - { - "parameter": "amount", - "required": false, - "type": "Number" - }, - { - "parameter": "currency", - "required": false, - "type": "String" - }, - { - "parameter": "customer_note", - "required": false, - "type": "String" - }, - { - "parameter": "merchant_note", - "required": false, - "type": "String" - } - ], - "description": "This lists all the disputes logged against your transactions\n\n**Query Params**\n- **transaction** _(required)_: Identifier for transaction to be refunded\n- **amount** _(optional)_: How much in kobo to be refunded to the customer. Amount is optional(defaults to original transaction amount) and cannot be more than the original transaction amount.\n- **currency**: Three-letter ISO currency\n- **customer_note** _(optional)_: customer reason\n- **merchant_note** _(optional)_: merchant reason" - } - ], - "balance": [ - { - "api": "check", - "endpoint": "https://api.paystack.co/balance", - "method": "GET", - "params": [], - "description": "You can only transfer from what you have" - }, - { - "api": "balance", - "endpoint": "https://api.paystack.co/balance/ledger", - "method": "GET", - "params": [], - "description": "Returns all activity carried out from and to the Paystack Balance" - } - ], - "settlement": [ - { - "api": "fetch", - "endpoint": "https://api.paystack.co/settlement", - "method": "GET", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Query Params", - "required": false, - "type": "String" - }, - { - "parameter": "from", - "required": false, - "type": "String" - }, - { - "parameter": "to", - "required": false, - "type": "String" - }, - { - "parameter": "subaccount", - "required": false, - "type": "String" - } - ], - "description": "Settlements made to your bank accounts and the bank accounts for your subaccounts\n\n**Query Params**\n- **from** - Lower bound of date range. Leave undefined to export settlement from day one.\n- **to** - Upper bound of date range. Leave undefined to export settlements till date.\n- **subaccount** - Provide a subaccount code to export only settlements for that subaccount. Set to `none` to export only transactions for the account." - } - ], - "decision": [ - { - "api": "resolve", - "endpoint": "{BIN)", - "method": "GET", - "params": [ - { - "parameter": "bin", - "required": true, - "type": "String" - } - ], - "description": "**Path Params**\n- **bin** (_required_) - First 6 characters of card" - } - ], - "invoice": [ - { - "api": "archive", - "endpoint": ":id_or_code", - "method": "POST", - "params": [], - "description": "Used to archive an invoice. Invoice will no longer be fetched on list or returned on verify." - } - ], - "verifications": [ - { - "api": "resolve", - "endpoint": "https://api.paystack.co/verifications", - "method": "POST", - "params": [ - { - "parameter": "", - "required": false, - "type": "String" - }, - { - "parameter": "Body Parameters", - "required": false, - "type": "String" - }, - { - "parameter": "verification_type", - "required": true, - "type": "String" - }, - { - "parameter": "phone", - "required": true, - "type": "String" - }, - { - "parameter": "callback_url", - "required": false, - "type": "String" - } - ], - "description": "Using the Truecaller API you can verify the authenticity of a customer. It returns the customer's name, phone number, email, social media handles and organization as available on their Truecaller profile.\n\n**Body Parameters**\n- **verification_type** _(required)_\n- **phone** _(required)_ - Customer phone number starting with country code (without the + prefix)\n- **callback_url** - Link on server to receive the truecaller details" - } - ] -} \ No newline at end of file + "subaccount": [ + { + "api": "update", + "endpoint": "https://api.paystack.co/subaccount", + "method": "PUT", + "params": [], + "description": null + }, + { + "api": "fetch", + "endpoint": "https://api.paystack.co/subaccount", + "method": "GET", + "params": [], + "description": null + }, + { + "api": "list", + "endpoint": "https://api.paystack.co/subaccount", + "method": "GET", + "params": [ + { + "parameter": "perPage", + "required": false, + "type": "String" + }, + { + "parameter": "page", + "required": false, + "type": "Number" + } + ], + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" + }, + { + "api": "create", + "endpoint": "https://api.paystack.co/subaccount", + "method": "POST", + "params": [ + { + "parameter": "business_name", + "required": true, + "type": "String" + }, + { + "parameter": "settlement_bank", + "required": true, + "type": "String" + }, + { + "parameter": "account_number", + "required": true, + "type": "String" + }, + { + "parameter": "percentage_charge", + "required": true, + "type": "String" + }, + { + "parameter": "primary_contact_email", + "required": false, + "type": "String" + }, + { + "parameter": "primary_contact_name", + "required": false, + "type": "String" + }, + { + "parameter": "primary_contact_phone", + "required": false, + "type": "String" + }, + { + "parameter": "metadata", + "required": false, + "type": "String" + }, + { + "parameter": "settlement_schedule", + "required": false, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "eceive payments for the created subaccount by providing their code when doing a transaction. More details here: [Split Payments Overview](https://developers.paystack.co/v1.0/docs/splitpaymentsoverview", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **business_name** (_required_) - Name of business for subaccount\n- **settlement_bank** (_required_) - Name of Bank (see list of accepted names by calling [List Banks](https://developers.paystack.co/v1.0/docs/list-banks)\n- **account_number** (_required_) - NUBAN Bank Account Number\n- **percentage_charge** (_required_) - What is the default percentage charged when receiving on behalf of this subaccount?\n- **primary_contact_email** - A contact email for the subaccount\n- **primary_contact_name** - A name for the contact person for this subaccount\n- **primary_contact_phone** - A phone number to call for this subaccount\n- **metadata** - Stringified JSON object\n- **settlement_schedule** - Any of `auto`, `weekly`, `monthly`, `manual`. Auto means payout is T+1 and manual means payout to the subaccount should only be made when requested.\n\nReceive payments for the created subaccount by providing their code when doing a transaction. More details here: [Split Payments Overview](https://developers.paystack.co/v1.0/docs/split-payments-overview)" + } + ], + "page": [ + { + "api": "update", + "endpoint": "https://api.paystack.co/page/", + "method": "PUT", + "params": [ + { + "parameter": "name", + "required": false, + "type": "String" + }, + { + "parameter": "description", + "required": false, + "type": "String" + }, + { + "parameter": "amount", + "required": false, + "type": "Number" + }, + { + "parameter": "active", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **name** - Name of page\n- **description** - Short description of page\n- **amount** - Amount to be charged in kobo. Will override the amount for existing subscriptions.\n- **active** - Set to false to deactivate page url." + }, + { + "api": "fetch", + "endpoint": "https://api.paystack.co/page/id_or_plan_code", + "method": "GET", + "params": [], + "description": null + }, + { + "api": "list", + "endpoint": "https://api.paystack.co/page", + "method": "GET", + "params": [ + { + "parameter": "perPage", + "required": false, + "type": "String" + }, + { + "parameter": "page", + "required": false, + "type": "Number" + }, + { + "parameter": "interval", + "required": false, + "type": "String" + }, + { + "parameter": "amount", + "required": false, + "type": "Number" + } + ], + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **interval** - Filter list by plans with specified interval\n- **amount** - Filter list by plans with specified amount (in kobo)" + }, + { + "api": "check", + "endpoint": "https://api.paystack.co/page/check_slug_availability/slug", + "method": "GET", + "params": [ + { + "parameter": "slug", + "required": true, + "type": "String" + } + ], + "description": "**Path Params**\n- **slug** (_required_) - URL slug to be confirmed" + }, + { + "api": "create", + "endpoint": "https://api.paystack.co/page", + "method": "POST", + "params": [ + { + "parameter": "name", + "required": true, + "type": "String" + }, + { + "parameter": "description", + "required": false, + "type": "String" + }, + { + "parameter": "amount", + "required": false, + "type": "Number" + }, + { + "parameter": "slug", + "required": false, + "type": "String" + }, + { + "parameter": "redirect_url", + "required": false, + "type": "String" + }, + { + "parameter": "send_invoices", + "required": false, + "type": "String" + }, + { + "parameter": "custom_fields", + "required": false, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "end pages created to your customers by giving out a link in this format https://paystack.com/pay/:slug. For instance, a valid link for the page above would be https://paystack.com/pay/5nApBwZkv", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **name** (_required_) - Name of page\n- **description** - Short description of page\n- **amount** - Default amount you want to accept using this page. If none is set, customer is free to provide any amount of their choice. The latter scenario is useful for accepting donations\n- **slug** - URL slug you would like to be associated with this page. Page will be accessible at https://paystack.com/pay/[slug]\n- **redirect_url** - If you would like Paystack to redirect someplace upon successful payment, specify the URL here.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers\n- **custom_fields** - If you would like to accept custom fields, specify them here. See sample code for details.\n\nSend pages created to your customers by giving out a link in this format https://paystack.com/pay/:slug. For instance, a valid link for the page above would be https://paystack.com/pay/5nApBwZkvY" + } + ], + "transfer": [ + { + "api": "list", + "endpoint": "https://api.paystack.co/transfer", + "method": "GET", + "params": [ + { + "parameter": "perPage", + "required": false, + "type": "String" + }, + { + "parameter": "page", + "required": false, + "type": "Number" + } + ], + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" + }, + { + "api": "finalize", + "endpoint": "https://api.paystack.co/transfer/finalize_transfer", + "method": "POST", + "params": [ + { + "parameter": "transfer_code", + "required": true, + "type": "String" + }, + { + "parameter": "otp", + "required": true, + "type": "String" + } + ], + "description": "**Body Params**\n- **transfer_code** (_required_) - Transfer code\n- **otp** (_required_) - OTP sent to business phone to verify transfer." + }, + { + "api": "initiate", + "endpoint": "https://api.paystack.co/transfer", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "source", + "required": true, + "type": "String" + }, + { + "parameter": "amount", + "required": false, + "type": "Number" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + }, + { + "parameter": "reason", + "required": false, + "type": "String" + }, + { + "parameter": "recipient", + "required": true, + "type": "String" + }, + { + "parameter": "reference", + "required": false, + "type": "String" + } + ], + "description": "Status of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’.\n\n**Body Params**\n- **source** (_required_) - Where should we transfer from? Only balance for now\n- **amount** - Amount to transfer in kobo\n- **currency** - NGN\n- **reason**\n- **recipient** (_required_) - Code for transfer recipient\n- **reference** - If specified, the field should be a unique identifier (in lowercase) for the object. Only `-` `,` `_` and alphanumeric characters allowed." + }, + { + "api": "verify", + "endpoint": "{reference}", + "method": "GET", + "params": [ + { + "parameter": "perPage", + "required": false, + "type": "String" + }, + { + "parameter": "page", + "required": false, + "type": "Number" + } + ], + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" + }, + { + "api": "disable", + "endpoint": "https://api.paystack.co/transfer/disable_otp", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "n the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. An OTP is sent to you on your business phone", + "required": true, + "type": "String" + } + ], + "description": "In the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. You will get an OTP.\n\nIn the event that you want to be able to complete transfers programmatically without use of OTPs, this endpoint helps disable that….with an OTP. No arguments required. An OTP is sent to you on your business phone." + }, + { + "api": "enable", + "endpoint": "https://api.paystack.co/transfer/enable_otp", + "method": "POST", + "params": [], + "description": "In the event that a customer wants to stop being able to complete transfers programmatically, this endpoint helps turn OTP requirement back on. No arguments required." + }, + { + "api": "initiate", + "endpoint": "https://api.paystack.co/transfer/bulk", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "(no name)", + "required": false, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "tatus of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’", + "required": true, + "type": "String" + } + ], + "description": "You need to disable the Transfers OTP requirement to use this endpoint.\n\n**Body Params**\n- **(no name)**\n\nStatus of transfer object returned will be ‘pending’ if OTP is disabled. In the event that an OTP is required, status will read ‘otp’." + }, + { + "api": "finalize", + "endpoint": "https://api.paystack.co/transfer/disable_otp_finalize", + "method": "POST", + "params": [ + { + "parameter": "otp", + "required": true, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **otp** (_required_) - OTP sent to business phone to verify disabling OTP requirement\n\n" + }, + { + "api": "fetch", + "endpoint": "https://api.paystack.co/transfer/id", + "method": "GET", + "params": [ + { + "parameter": "id_or_code", + "required": true, + "type": "String" + } + ], + "description": "**Path Params**\n- **id_or_code** (_required_) - An ID or code for the transfer whose details you want to retrieve." + }, + { + "api": "list", + "endpoint": "https://api.paystack.co/transfer/id_or_code", + "method": "GET", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Query Params", + "required": false, + "type": "String" + }, + { + "parameter": "perPage", + "required": false, + "type": "String" + }, + { + "parameter": "page", + "required": false, + "type": "Number" + } + ], + "description": "This lists all bulk charge batches created by the integration. Statuses can be `active`, `paused`, or `complete`.\n\n**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" + }, + { + "api": "resend", + "endpoint": "https://api.paystack.co/transfer/resend_otp", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "transfer_code", + "required": true, + "type": "String" + }, + { + "parameter": "reason", + "required": true, + "type": "String" + } + ], + "description": "Creates a new recipient. An duplicate account number will lead to the retrieval of the existing record.\n\n**Body Params**\n- **transfer_code** (_required_) - Transfer code\n- **reason** (_required_) - either `resend_otp` or `transfer`" + } + ], + "paymentrequest": [ + { + "api": "create", + "endpoint": "https://api.paystack.co/paymentrequest", + "method": "POST", + "params": [ + { + "parameter": "customer", + "required": true, + "type": "String" + }, + { + "parameter": "due_date", + "required": true, + "type": "String" + }, + { + "parameter": "amount", + "required": true, + "type": "Number" + }, + { + "parameter": "description", + "required": false, + "type": "String" + }, + { + "parameter": "line_items", + "required": false, + "type": "String" + }, + { + "parameter": "tax", + "required": false, + "type": "String" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + }, + { + "parameter": "send_notification", + "required": false, + "type": "String" + }, + { + "parameter": "draft", + "required": false, + "type": "String" + }, + { + "parameter": "send_notification", + "required": false, + "type": "String" + }, + { + "parameter": "has_invoice", + "required": false, + "type": "String" + }, + { + "parameter": "invoice_number", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **customer** (_required_) - Customer ID or code\n- **due_date** (_required_) - ISO 8601 representation of request due date\n- **amount** (_required_) - Invoice amount. Only useful if line items and tax values are ignored. endpoint will throw a friendly warning if neither is available.\n- **description**\n- **line_items** - Array of line items in the format `[{\"name\":\"item 1\", \"amount\":2000}]`\n- **tax** - Array of taxes to be charged in the format `[{\"name\":\"VAT\", \"amount\":2000}]`\n- **currency** - Defaults to Naira\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`.\n- **draft** - Indicate if request should be saved as draft. Defaults to `false` and overrides send_notification.\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`.\n- **has_invoice** - Set to `true` to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no `line_items` or `tax` passed.\n- **invoice_number** - Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point." + }, + { + "api": "finalize", + "endpoint": "https://api.paystack.co/paymentrequest/finalize/ID_OR_CODE", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "send_notification", + "required": false, + "type": "String" + } + ], + "description": "Publishes invoice that is draft by sending customer the invoice via email\n\n**Body Params**\n- **send_notification** - Indicates whether Paystack sends an email notification to customer. Defaults to `true`" + }, + { + "api": "send", + "endpoint": "https://api.paystack.co/paymentrequest/notify/ID_OR_CODE", + "method": "POST", + "params": [ + { + "parameter": "id", + "required": false, + "type": "String" + } + ], + "description": "**Path Params**\n- **id** - Invoice code for which you want to send a notification for" + }, + { + "api": "list", + "endpoint": "https://api.paystack.co/paymentrequest", + "method": "GET", + "params": [ + { + "parameter": "customer", + "required": false, + "type": "String" + }, + { + "parameter": "status", + "required": false, + "type": "String" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + }, + { + "parameter": "paid", + "required": false, + "type": "String" + }, + { + "parameter": "include_archive", + "required": false, + "type": "String" + }, + { + "parameter": "payment_request", + "required": false, + "type": "String" + } + ], + "description": "**Query Params**\n- **customer** - Specify an ID for the customer whose requests you want to retrieve\n- **status** - Filter requests by status ('failed', 'success', 'abandoned')\n- **currency** - Filter requests sent in a particular currency.\n- **paid** - Filter requests that have been paid for \n- **include_archive** - Includes archived requests in the response\n- **payment_request** - Filter specific invoice by passing invoice code" + }, + { + "api": "view", + "endpoint": "https://api.paystack.co/paymentrequest/REQUEST_ID_OR_CODE", + "method": "GET", + "params": [ + { + "parameter": "id", + "required": true, + "type": "String" + } + ], + "description": "**Path Params**\n- **id** _(required)_ - An ID for the Invoice" + }, + { + "api": "invoice", + "endpoint": "https://api.paystack.co/paymentrequest/totals", + "method": "GET", + "params": [], + "description": null + }, + { + "api": "update", + "endpoint": "https://api.paystack.co/paymentrequest/ID_OR_CODE", + "method": "PUT", + "params": [ + { + "parameter": "description", + "required": false, + "type": "String" + }, + { + "parameter": "amount", + "required": false, + "type": "Number" + }, + { + "parameter": "line_item", + "required": false, + "type": "String" + }, + { + "parameter": "tax", + "required": false, + "type": "String" + }, + { + "parameter": "due_date", + "required": false, + "type": "String" + }, + { + "parameter": "metadata", + "required": false, + "type": "String" + }, + { + "parameter": "send_notification", + "required": false, + "type": "String" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + }, + { + "parameter": "customer", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **description**\n- **amount**\n- **line_item**\n- **tax**\n- **due_date**\n- **metadata**\n- **send_notification**\n- **currency** - only works in draft mode\n- **customer** - only works in draft mode" + }, + { + "api": "verify", + "endpoint": "https://api.paystack.co/paymentrequest/verify/ID_OR_CODE", + "method": "GET", + "params": [ + { + "parameter": "ID", + "required": false, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "ote that a key is added called `pending_amount` when you fetch an invoice. This is because when paying for an invoice, you can choose to pay part but not all. Whenever a successful transaction is made, the key updates to reveal what’s left of the invoice to pay", + "required": false, + "type": "String" + } + ], + "description": "**Path Params**\n- **ID** - The invoice code for the Payment Request to be verified\n\nNote that a key is added called `pending_amount` when you fetch an invoice. This is because when paying for an invoice, you can choose to pay part but not all. Whenever a successful transaction is made, the key updates to reveal what’s left of the invoice to pay." + } + ], + "transferrecipient": [ + { + "api": "create", + "endpoint": "https://api.paystack.co/transferrecipient", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "type", + "required": true, + "type": "String" + }, + { + "parameter": "name", + "required": true, + "type": "String" + }, + { + "parameter": "metadata", + "required": false, + "type": "String" + }, + { + "parameter": "bank_code", + "required": true, + "type": "String" + }, + { + "parameter": "account_number", + "required": true, + "type": "String" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + }, + { + "parameter": "description", + "required": false, + "type": "String" + } + ], + "description": "Creates a new recipient. An duplicate account number will lead to the retrieval of the existing record.\n\n**Body Params**\n- **type** (_required_) - Recipient Type (Only nuban at this time)\n- **name** (_required_) - A name for the recipient\n- **metadata** - Store additional information about your recipient in a structured format. JSON\n- **bank_code** (_required_) - Required if type is nuban. You can find a list of bank codes at [api.paystack.co/bank](https://api.paystack.co/bank)\n- **account_number** (_required_) - Required if type is `nuban`\n- **currency** - Currency for the account receiving the transfer.\n- **description**" + }, + { + "api": "delete", + "endpoint": "{recipient_code_or_id}", + "method": "DELETE", + "params": [], + "description": null + }, + { + "api": "list", + "endpoint": "https://api.paystack.co/transferrecipient", + "method": "GET", + "params": [ + { + "parameter": "perPage", + "required": false, + "type": "String" + }, + { + "parameter": "page", + "required": false, + "type": "Number" + } + ], + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" + }, + { + "api": "update", + "endpoint": "{recipient_code_or_id}", + "method": "PUT", + "params": [], + "description": null + } + ], + "subscription": [ + { + "api": "disable", + "endpoint": "https://api.paystack.co/subscription/disable", + "method": "POST", + "params": [ + { + "parameter": "code", + "required": true, + "type": "String" + }, + { + "parameter": "token", + "required": true, + "type": "String" + } + ], + "description": "**Body Params**\n- **code** (_required_) - Subscription code\n- **token** (_required_) - Email token" + }, + { + "api": "fetch", + "endpoint": ":id_or_subscription_code", + "method": "GET", + "params": [], + "description": null + }, + { + "api": "create", + "endpoint": "https://api.paystack.co/subscription", + "method": "POST", + "params": [ + { + "parameter": "customer", + "required": true, + "type": "String" + }, + { + "parameter": "plan", + "required": true, + "type": "String" + }, + { + "parameter": "authorization", + "required": false, + "type": "String" + }, + { + "parameter": "start_date", + "required": false, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "ote the `email_token` attribute for the subscription object. We create one on each subscription so customers can cancel their subscriptions from within the invoices sent to their mailboxes. Since they are not authorized, the email tokens are what we use to authenticate the requests over the API", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **customer** (_required_) - Customer's email address or customer code\n- **plan** (_required_) - Plan code\n- **authorization** - If customer has multiple authorizations, you can set the desired authorization you wish to use for this subscription here. If this is not supplied, the customer's most recent authorization would be used\n- **start_date** - Set the date for the first debit. (ISO 8601 format)\n\nNote the `email_token` attribute for the subscription object. We create one on each subscription so customers can cancel their subscriptions from within the invoices sent to their mailboxes. Since they are not authorized, the email tokens are what we use to authenticate the requests over the API." + }, + { + "api": "list", + "endpoint": "https://api.paystack.co/subscription", + "method": "GET", + "params": [ + { + "parameter": "perPage", + "required": false, + "type": "String" + }, + { + "parameter": "page", + "required": false, + "type": "Number" + }, + { + "parameter": "customer", + "required": false, + "type": "String" + }, + { + "parameter": "plan", + "required": false, + "type": "String" + } + ], + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **customer** - Filter by Customer ID\n- **plan** - Filter by Plan ID" + }, + { + "api": "enable", + "endpoint": "https://api.paystack.co/subscription/enable", + "method": "POST", + "params": [ + { + "parameter": "code", + "required": true, + "type": "String" + }, + { + "parameter": "token", + "required": true, + "type": "String" + } + ], + "description": "**Body Params**\n- **code** (_required_) - Subscription code\n- **token** (_required_) - Email token" + } + ], + "bulkcharge": [ + { + "api": "fetch", + "endpoint": "https://api.paystack.co/bulkcharge/id_or_code", + "method": "GET", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Path Params", + "required": false, + "type": "String" + }, + { + "parameter": "id_or_code", + "required": true, + "type": "String" + } + ], + "description": "This endpoint retrieves a specific batch code. It also returns useful information on its progress by way of the `total_charges` and `pending_charges` attributes.\n\n**Path Params**\n- **id_or_code** (_required_) - An ID or code for the transfer whose details you want to retrieve." + }, + { + "api": "fetch", + "endpoint": "https://api.paystack.co/bulkcharge/id_or_code/charges", + "method": "GET", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Path Params", + "required": false, + "type": "String" + }, + { + "parameter": "id_or_code", + "required": true, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Query Params", + "required": false, + "type": "String" + }, + { + "parameter": "status", + "required": false, + "type": "String" + }, + { + "parameter": "perPage", + "required": false, + "type": "String" + }, + { + "parameter": "page", + "required": false, + "type": "Number" + }, + { + "parameter": "", + "required": false, + "type": "String" + } + ], + "description": "This endpoint retrieves the charges associated with a specified batch code. Pagination parameters are available. You can also filter by status. Charge statuses can be `pending`, `success` or `failed`.\n\n**Path Params**\n- **id_or_code** (_required_) - An ID or code for the batch whose charges you want to retrieve.\n\n**Query Params**\n- **status** - `pending`, `success` or `failed`\n- **perPage**\n- **page**\n" + }, + { + "api": "initiate", + "endpoint": "https://api.paystack.co/bulkcharge", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "(no_name)", + "required": false, + "type": "String" + } + ], + "description": "Send an array of objects with authorization codes and amount in kobo so we can process transactions as a batch.\n\n**Body Params**\n- **(no_name)**" + }, + { + "api": "resume", + "endpoint": "https://api.paystack.co/bulkcharge/resume/batch_code", + "method": "GET", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Path Params", + "required": false, + "type": "String" + }, + { + "parameter": "batch_code", + "required": true, + "type": "String" + } + ], + "description": "Use this endpoint to pause processing a batch\n\n**Path Params**\n- **batch_code** (_required_)" + }, + { + "api": "pause", + "endpoint": "https://api.paystack.co/bulkcharge/pause/batch_code", + "method": "GET", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Path Params", + "required": false, + "type": "String" + }, + { + "parameter": "batch_code", + "required": true, + "type": "String" + } + ], + "description": "Use this endpoint to pause processing a batch\n\n**Path Params**\n- **batch_code** (_required_)" + } + ], + "bank": [ + { + "api": "list", + "endpoint": "https://api.paystack.co/bank", + "method": "GET", + "params": [], + "description": null + }, + { + "api": "resolve", + "endpoint": "?account_number=ACCOUNT_NUMBER&bank_code=BANK_CODE", + "method": "GET", + "params": [ + { + "parameter": "account_number", + "required": false, + "type": "String" + }, + { + "parameter": "bank_code", + "required": false, + "type": "String" + } + ], + "description": "**Path Params**\n- **account_number** - Account Number\n- **bank_code** - Bank Code" + }, + { + "api": "resolve", + "endpoint": "{BVN}", + "method": "GET", + "params": [ + { + "parameter": "bvn", + "required": true, + "type": "String" + } + ], + "description": "**Path Params**\n- **bvn** (_required_) - 11 digit BVN" + }, + { + "api": "match", + "endpoint": "{ACCOUNT_NUMBER}&bank_code={BANK_CODE}&bvn={BVN}", + "method": "GET", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Path Params", + "required": false, + "type": "String" + }, + { + "parameter": "*account_number* _(required)_ Bank account numbe", + "required": true, + "type": "String" + }, + { + "parameter": "*bank_code* _(required)_ Bank code from [List Bank endpoint](https://api.paystack.co/bank", + "required": true, + "type": "String" + }, + { + "parameter": "*bvn* _(required)_ 11 digit BV", + "required": true, + "type": "String" + } + ], + "description": "The Match BVN endpoint checks if the account number for a bank belongs to a user's BVN\n\n**Path Params**\n- *account_number* _(required)_ - Bank account number\n- *bank_code* _(required)_ - Bank code from [List Bank endpoint](https://api.paystack.co/bank)\n- *bvn* _(required)_ - 11 digit BVN" + } + ], + "charge": [ + { + "api": "submit", + "endpoint": "https://api.paystack.co/charge/submit_otp", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "otp", + "required": true, + "type": "String" + }, + { + "parameter": "reference", + "required": true, + "type": "String" + } + ], + "description": "Submit OTP to complete a charge\n\n**Body Params**\n- **otp** (_required_) - OTP submitted by user\n- **reference** (_required_) - reference for ongoing transaction" + }, + { + "api": "submit", + "endpoint": "https://api.paystack.co/charge/submit_pin", + "method": "POST", + "params": [ + { + "parameter": "pin", + "required": true, + "type": "String" + }, + { + "parameter": "reference", + "required": true, + "type": "String" + } + ], + "description": "**Body Params**\n- **pin** (_required_) - PIN submitted by user\n- **reference** (_required_) - reference for transaction that requested pin" + }, + { + "api": "submit", + "endpoint": "https://api.paystack.co/charge/submit_birthday", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "birthday", + "required": true, + "type": "String" + }, + { + "parameter": "reference", + "required": true, + "type": "String" + } + ], + "description": "Submit Birthday when requested\n\n**Body Params**\n- **birthday** (_required_) - Birthday number submitted by user\n- **reference** (_required_) - reference for ongoing transaction" + }, + { + "api": "tokenize", + "endpoint": "https://api.paystack.co/charge/tokenize", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "email", + "required": true, + "type": "String" + }, + { + "parameter": "card", + "required": true, + "type": "String" + }, + { + "parameter": "card.number", + "required": true, + "type": "String" + }, + { + "parameter": "card.cvv", + "required": true, + "type": "String" + }, + { + "parameter": "card.expiry_month", + "required": true, + "type": "String" + }, + { + "parameter": "card.expiry_year", + "required": true, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + } + ], + "description": "Send an array of objects with authorization codes and amount in kobo so we can process transactions as a batch.\n\n**Body Params**\n- **email** (_required_) - Customer's email address\n- **card** (_required_) - Card to tokenize\n- **card.number** (_required_) - Card to tokenize\n- **card.cvv** (_required_) - Card security code\n- **card.expiry_month** (_required_) - Expiry month of card\n- **card.expiry_year** (_required_) - Expiry year of card\n" + }, + { + "api": "check", + "endpoint": "https://api.paystack.co/charge/reference", + "method": "GET", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "reference", + "required": true, + "type": "String" + } + ], + "description": "When you get \"pending\" as a charge status, wait 30 seconds or more, then make a check to see if its status has changed. Don't call too early as you may get a lot more pending than you should.\n\n**Body Params**\n- **reference** (_required_) - The reference to check" + }, + { + "api": "charge", + "endpoint": "https://api.paystack.co/charge", + "method": "POST", + "params": [ + { + "parameter": "imple guide to charging cards directly https://developers.paystack.co/docs/chargingfromyourbacken", + "required": false, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "email", + "required": true, + "type": "String" + }, + { + "parameter": "amount", + "required": true, + "type": "Number" + }, + { + "parameter": "card", + "required": true, + "type": "String" + }, + { + "parameter": "card.number", + "required": true, + "type": "String" + }, + { + "parameter": "card.cvv", + "required": true, + "type": "String" + }, + { + "parameter": "card.expiry_month", + "required": true, + "type": "String" + }, + { + "parameter": "card.expiry_year", + "required": true, + "type": "String" + }, + { + "parameter": "bank", + "required": false, + "type": "String" + }, + { + "parameter": "bank.code", + "required": true, + "type": "String" + }, + { + "parameter": "bank.account_number", + "required": true, + "type": "String" + }, + { + "parameter": "authorization_code", + "required": false, + "type": "String" + }, + { + "parameter": "pin", + "required": false, + "type": "String" + }, + { + "parameter": "metadata", + "required": false, + "type": "String" + } + ], + "description": "Send card details or bank details or authorization code to start a charge.\nSimple guide to charging cards directly https://developers.paystack.co/docs/charging-from-your-backend\n\n**Body Params**\n- **email** (_required_) - Customer's email address\n- **amount** (_required_) - Amount in kobo\n- **card** (_required_) - Card number\n- **card.number** (_required_) - Card to tokenize\n- **card.cvv** (_required_) - Card security code\n- **card.expiry_month** (_required_) - Expiry month of card\n- **card.expiry_year** (_required_) - Expiry year of card\n- **bank** - Bank account to charge (don't send if charging an authorization code or card)\n- **bank.code** (_required_) - A code for the [bank](https://developers.paystack.co/v1.0/ref/banks) (check banks for the banks supported). Only the ones for which paywithbank is true will work.\n- **bank.account_number** (_required_) - 10 digit nuban for the account to charge\n- **authorization_code** - An authorization code to charge (don't send if charging a card or bank account)\n- **pin** - 4-digit PIN (send with a non-reusable authorization code)\n- **metadata** - A JSON object" + }, + { + "api": "submit", + "endpoint": "https://api.paystack.co/charge/submit_phone", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "phone", + "required": true, + "type": "String" + }, + { + "parameter": "reference", + "required": true, + "type": "String" + } + ], + "description": "Submit Phone when requested\n\n**Body Params**\n- **phone** (_required_) - Phone number submitted by user\n- **reference** (_required_) - reference for ongoing transaction" + } + ], + "transaction": [ + { + "api": "verify", + "endpoint": "{REFERENCE}", + "method": "GET", + "params": [ + { + "parameter": "reference", + "required": true, + "type": "String" + } + ], + "description": "**Path Params**\n- **reference** (_required_)" + }, + { + "api": "list", + "endpoint": "https://api.paystack.co/transaction", + "method": "GET", + "params": [ + { + "parameter": "perPage", + "required": false, + "type": "String" + }, + { + "parameter": "page", + "required": false, + "type": "Number" + }, + { + "parameter": "customer", + "required": false, + "type": "String" + }, + { + "parameter": "status", + "required": false, + "type": "String" + }, + { + "parameter": "from", + "required": false, + "type": "String" + }, + { + "parameter": "to", + "required": false, + "type": "String" + }, + { + "parameter": "amount", + "required": false, + "type": "Number" + } + ], + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **customer** - Specify an ID for the customer whose transactions you want to retrieve\n- **status** - Filter transactions by status ('failed', 'success', 'abandoned')\n- **from** - A timestamp from which to start listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21\n- **to** - A timestamp at which to stop listing transaction e.g. 2016-09-24T00:00:05.000Z, 2016-09-21\n- **amount** - Filter transactions by amount. Specify the amount in kobo." + }, + { + "api": "view", + "endpoint": ":id_or_reference", + "method": "GET", + "params": [], + "description": null + }, + { + "api": "charge", + "endpoint": "https://api.paystack.co/transaction/charge_authorization", + "method": "POST", + "params": [ + { + "parameter": "reference", + "required": false, + "type": "String" + }, + { + "parameter": "authorization_code", + "required": true, + "type": "String" + }, + { + "parameter": "amount", + "required": true, + "type": "Number" + }, + { + "parameter": "plan", + "required": false, + "type": "String" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + }, + { + "parameter": " email", + "required": true, + "type": "String" + }, + { + "parameter": "metadata", + "required": false, + "type": "String" + }, + { + "parameter": "subaccount", + "required": false, + "type": "String" + }, + { + "parameter": "transaction_charge", + "required": false, + "type": "String" + }, + { + "parameter": "bearer", + "required": false, + "type": "String" + }, + { + "parameter": "invoice_limit", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **reference** - Unique transaction reference. Only `-` `,` `.` `,` `=` and alphanumeric characters allowed. System will generate one if none is provided\n- **authorization_code** - (_required_) Valid authorization code to charge\n- **amount** - (_required_) Amount in kobo\n- **plan** - If transaction is to create a subscription to a predefined plan, provide plan code here\n- **currency** - Currency in which amount should be charged\n- ** email** (_required_) - Customer's email address\n- **metadata** - Add a `custom_fields` attribute which has an array of objects if you would like the fields to be added to your transaction when displayed on the dashboard.\n- **subaccount** - The code for the subaccount that owns the payment.\n- **transaction_charge** - A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split).\n- **bearer** - Who bears Paystack charges? `account` or `subaccount`?\n- **invoice_limit** - Number of invoices to raise during the subscription. Overrides `invoice_limit` set on plan." + }, + { + "api": "export", + "endpoint": "https://api.paystack.co/transaction/export", + "method": "GET", + "params": [ + { + "parameter": "from", + "required": false, + "type": "String" + }, + { + "parameter": "to", + "required": false, + "type": "String" + }, + { + "parameter": "settled", + "required": false, + "type": "String" + }, + { + "parameter": "payment_page", + "required": false, + "type": "String" + }, + { + "parameter": "customer", + "required": false, + "type": "String" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + }, + { + "parameter": "settlement", + "required": false, + "type": "String" + }, + { + "parameter": "amount", + "required": false, + "type": "Number" + }, + { + "parameter": "status", + "required": false, + "type": "String" + } + ], + "description": "**Query Params**\n- **from** - Lower bound of date range. Leave undefined to export transactions from day one.\n- **to** - Upper bound of date range. Leave undefined to export transactions till date.\n- **settled** - Set to `true` to export only settled transactions. `false` for pending transactions. Leave undefined to export all transactions\n- **payment_page** - Specify a payment page's id to export only transactions conducted on said page\n- **customer** - Specify customer id.\n- **currency** - Currency in which you are charging the customer in.\n- **settlement** - An ID for the settlement whose transactions we should export\n- **amount** - Amount for transactions to export\n- **status** - Status for transactions to export" + }, + { + "api": "check", + "endpoint": "https://api.paystack.co/transaction/check_authorization", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "authorization_code", + "required": true, + "type": "String" + }, + { + "parameter": "amount", + "required": true, + "type": "Number" + }, + { + "parameter": "email", + "required": true, + "type": "String" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "n test mode, we will return insufficient funds for an amount greater than or equal 500,000 naira", + "required": false, + "type": "String" + } + ], + "description": "All mastercard and visa authorizations can be checked with this endpoint to know if they have funds for the payment you seek.\n\n**Body Params**\n- **authorization_code** (_required_) - Authorization code for mastercard or VISA authorization belonging to email.\n- **amount** (_required_) - Amount in kobo\n- **email** (_required_) - Customer's email address\n- **currency** - A currency for the amount we want to check\n\nIn test mode, we will return insufficient funds for an amount greater than or equal 500,000 naira." + }, + { + "api": "transaction", + "endpoint": "https://api.paystack.co/transaction/totals", + "method": "GET", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Query Params", + "required": false, + "type": "String" + }, + { + "parameter": "from", + "required": false, + "type": "String" + }, + { + "parameter": "to", + "required": false, + "type": "String" + } + ], + "description": "Total amount received on your account\n\n**Query Params**\n- **from** - Lower bound of date range. Leave undefined to show totals from day one.\n- **to** - Upper bound of date range. Leave undefined to show totals till date." + }, + { + "api": "initialize", + "endpoint": "https://api.paystack.co/transaction/initialize", + "method": "POST", + "params": [ + { + "parameter": "email", + "required": true, + "type": "String" + }, + { + "parameter": "amount", + "required": true, + "type": "Number" + }, + { + "parameter": "reference", + "required": false, + "type": "String" + }, + { + "parameter": "callback_url", + "required": false, + "type": "String" + }, + { + "parameter": "plan", + "required": false, + "type": "String" + }, + { + "parameter": "invoice_limit", + "required": false, + "type": "String" + }, + { + "parameter": "metadata", + "required": false, + "type": "String" + }, + { + "parameter": "subaccount", + "required": false, + "type": "String" + }, + { + "parameter": "transaction_charge", + "required": false, + "type": "String" + }, + { + "parameter": "bearer", + "required": false, + "type": "String" + }, + { + "parameter": "channels", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **email** (_required_) - Customer's email address\n- **amount** (_required_) - Amount in kobo\n- **reference** - Generate a reference or leave this param blank for Paystack to generate one for you\n- **callback_url** - Overrides the callback URL set on Paystack dashboard.\n- **plan** - If transaction is to create a subscription to a predefined plan, provide plan code here. This would invalidate the value provided in `amount`\n- **invoice_limit** - Number of times to charge customer during subscription to plan\n- **metadata** - Stringified JSON object. Add a `custom_fields` attribute which has an array of objects if you would like the fields to be added to your transaction when displayed on the dashboard.\n- **subaccount** - The code for the subaccount that owns the payment.\n- **transaction_charge** - A flat fee to charge the subaccount for this transaction, in kobo. This overrides the split percentage set when the subaccount was created. Ideally, you will need to use this if you are splitting in flat rates (since subaccount creation only allows for percentage split).\n- **bearer** - Who bears Paystack charges? `account` or `subaccount` (defaults to `account`).\n- **channels** - Send us 'card' or 'bank' or 'card','bank' as an array to specify what options to show the user paying" + }, + { + "api": "fetch", + "endpoint": "https://api.paystack.co/transaction/id", + "method": "GET", + "params": [ + { + "parameter": "id", + "required": true, + "type": "String" + } + ], + "description": "**Path Params**\n- **id** (_required_) - An ID for the transaction to fetch" + } + ], + "plan": [ + { + "api": "update", + "endpoint": ":id_or_plan_code", + "method": "PUT", + "params": [ + { + "parameter": "name", + "required": false, + "type": "String" + }, + { + "parameter": "description", + "required": false, + "type": "String" + }, + { + "parameter": "amount", + "required": false, + "type": "Number" + }, + { + "parameter": "interval", + "required": false, + "type": "String" + }, + { + "parameter": "send_invoices", + "required": false, + "type": "String" + }, + { + "parameter": "send_sms", + "required": false, + "type": "String" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + }, + { + "parameter": "invoice_limit", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **name** - Name of plan\n- **description** - Short description of plan\n- **amount** - Amount to be charged in kobo. Will override the amount for existing subscriptions.\n- **interval** - Interval in words. Valid intervals are `hourly`, `daily`, `weekly`, `monthly`, `annually`.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers.\n- **send_sms** - Set to false if you don't want text messages to be sent to your customers\n- **currency** - Currency in which amount is set\n- **invoice_limit** - Number of invoices to raise during subscription to this plan. Will not override `invoice_limit` set on active subscriptions." + }, + { + "api": "create", + "endpoint": "https://api.paystack.co/plan", + "method": "POST", + "params": [ + { + "parameter": "name", + "required": true, + "type": "String" + }, + { + "parameter": "description", + "required": false, + "type": "String" + }, + { + "parameter": "amount", + "required": true, + "type": "Number" + }, + { + "parameter": "interval", + "required": true, + "type": "String" + }, + { + "parameter": "send_invoices", + "required": false, + "type": "String" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + }, + { + "parameter": "invoice_limit", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **name** (_required_) - Name of plan\n- **description** - Short description of plan\n- **amount** (_required_) - Amount to be charged in kobo\n- **interval** (_required_) - Interval in words. Valid intervals are `hourly`, `daily`, `weekly`, `monthly`, `annually`.\n- **send_invoices** - Set to false if you don't want invoices to be sent to your customers\n- **currency** - Currency in which amount is set\n- **invoice_limit** - Number of invoices to raise during subscription to this plan. Can be overridden by specifying an `invoice_limit` while subscribing." + }, + { + "api": "list", + "endpoint": "https://api.paystack.co/plan", + "method": "GET", + "params": [ + { + "parameter": "perPage", + "required": false, + "type": "String" + }, + { + "parameter": "page", + "required": false, + "type": "Number" + }, + { + "parameter": "interval", + "required": false, + "type": "String" + }, + { + "parameter": "amount", + "required": false, + "type": "Number" + } + ], + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve\n- **interval** - Filter list by plans with specified interval\n- **amount** - Filter list by plans with specified amount (in kobo)" + }, + { + "api": "fetch", + "endpoint": "https://api.paystack.co/plan/id_or_plan_code", + "method": "GET", + "params": [], + "description": null + } + ], + "customer": [ + { + "api": "update", + "endpoint": "https://api.paystack.co/customer/:ID_OR_CUSTOMER_CODE", + "method": "PUT", + "params": [ + { + "parameter": "first_name", + "required": false, + "type": "String" + }, + { + "parameter": "last_name", + "required": false, + "type": "String" + }, + { + "parameter": "phone", + "required": false, + "type": "String" + }, + { + "parameter": "metadata", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **first_name** - Customer's first name\n- **last_name** - Customer's last name\n- **phone** - Customer's phone number\n- **metadata** - A set of key/value pairs that you can attach to the customer. It can be used to store additional information in a structured format." + }, + { + "api": "list", + "endpoint": "https://api.paystack.co/customer", + "method": "GET", + "params": [ + { + "parameter": "perPage", + "required": false, + "type": "String" + }, + { + "parameter": "page", + "required": false, + "type": "Number" + } + ], + "description": "**Query Params**\n- **perPage** - Specify how many records you want to retrieve per page\n- **page** - Specify exactly what page you want to retrieve" + }, + { + "api": "create", + "endpoint": "https://api.paystack.co/customer", + "method": "POST", + "params": [ + { + "parameter": "email", + "required": true, + "type": "String" + }, + { + "parameter": "first_name", + "required": false, + "type": "String" + }, + { + "parameter": "last_name", + "required": false, + "type": "String" + }, + { + "parameter": "phone", + "required": false, + "type": "String" + }, + { + "parameter": "metadata", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **email** (_required_) - Customer's email address\n- **first_name** - Customer's first name\n- **last_name** - Customer's last name\n- **phone** - Customer's phone number\n- **metadata** - A set of key/value pairs that you can attach to the customer. It can be used to store additional information in a structured format." + }, + { + "api": "fetch", + "endpoint": ":id_or_customer_code", + "method": "GET", + "params": [ + { + "parameter": "exclude_transactions", + "required": false, + "type": "String" + } + ], + "description": "**Query Params**\n- **exclude_transactions** - By default, fetching a customer returns all their transactions. Set this to true to disable this behaviour." + }, + { + "api": "white/blacklist", + "endpoint": "https://api.paystack.co/customer/set_risk_action", + "method": "POST", + "params": [ + { + "parameter": "customer", + "required": false, + "type": "String" + }, + { + "parameter": "risk_action", + "required": false, + "type": "String" + } + ], + "description": "**Body Params**\n- **customer** - Customer's ID, code, or email address\n- **risk_action** - One of the possible risk actions. `allow` to whitelist. `deny` to blacklist." + }, + { + "api": "deactivate", + "endpoint": "https://api.paystack.co/customer/deactivate_authorization", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "authorization_code", + "required": true, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "", + "required": false, + "type": "String" + } + ], + "description": "For when the card needs to be forgotten...\n\n**Body Params**\n- **authorization_code** (_required_) - Authorization code to be deactivated\n\n" + } + ], + "refund": [ + { + "api": "create", + "endpoint": "https://api.paystack.co/refund", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Params", + "required": false, + "type": "String" + }, + { + "parameter": "transaction", + "required": true, + "type": "String" + }, + { + "parameter": "amount", + "required": false, + "type": "Number" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + }, + { + "parameter": "customer_note", + "required": false, + "type": "String" + }, + { + "parameter": "merchant_note", + "required": false, + "type": "String" + } + ], + "description": "This creates a refund which is then processed by the Paystack team\n\n**Body Params**\n- **transaction** _(required)_: Identifier for transaction to be refunded\n- **amount** _(optional)_: How much in kobo to be refunded to the customer. Amount is optional(defaults to original transaction amount) and cannot be more than the original transaction amount.\n- **currency**: Three-letter ISO currency\n- **customer_note** _(optional)_: customer reason\n- **merchant_note** _(optional)_: merchant reason" + }, + { + "api": "fetch", + "endpoint": ":id", + "method": "GET", + "params": [ + { + "parameter": "id", + "required": false, + "type": "String" + } + ], + "description": "**Path Params**\n- **id** - ID of the transaction to be refunded" + }, + { + "api": "fetch", + "endpoint": ":id", + "method": "GET", + "params": [ + { + "parameter": "id", + "required": false, + "type": "String" + } + ], + "description": "**Path Params**\n- **id** - ID of the transaction to be refunded" + }, + { + "api": "list", + "endpoint": "https://api.paystack.co/refund", + "method": "GET", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "transaction", + "required": false, + "type": "String" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + } + ], + "description": "**Query Parameters**\n\n- **transaction**\n- **currency**" + }, + { + "api": "list", + "endpoint": "https://api.paystack.co/refund", + "method": "GET", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "transaction", + "required": false, + "type": "String" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + } + ], + "description": "**Query Parameters**\n\n- **transaction**\n- **currency**" + } + ], + "integration": [ + { + "api": "update", + "endpoint": "https://api.paystack.co/integration/payment_session_timeout", + "method": "PUT", + "params": [ + { + "parameter": "timeout", + "required": false, + "type": "String" + } + ], + "description": "**Query Params**\n- **timeout** - Time before stopping session (in seconds). Set to 0 to cancel session timeouts" + }, + { + "api": "fetch", + "endpoint": "https://api.paystack.co/integration/payment_session_timeout", + "method": "GET", + "params": [], + "description": null + } + ], + "refund?from&to&page&perPage&transaction&status": [ + { + "api": "list", + "endpoint": "?from&to&page&perPage&transaction&status", + "method": "GET", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Query Params", + "required": false, + "type": "String" + }, + { + "parameter": "transaction", + "required": true, + "type": "String" + }, + { + "parameter": "amount", + "required": false, + "type": "Number" + }, + { + "parameter": "currency", + "required": false, + "type": "String" + }, + { + "parameter": "customer_note", + "required": false, + "type": "String" + }, + { + "parameter": "merchant_note", + "required": false, + "type": "String" + } + ], + "description": "This lists all the disputes logged against your transactions\n\n**Query Params**\n- **transaction** _(required)_: Identifier for transaction to be refunded\n- **amount** _(optional)_: How much in kobo to be refunded to the customer. Amount is optional(defaults to original transaction amount) and cannot be more than the original transaction amount.\n- **currency**: Three-letter ISO currency\n- **customer_note** _(optional)_: customer reason\n- **merchant_note** _(optional)_: merchant reason" + } + ], + "balance": [ + { + "api": "check", + "endpoint": "https://api.paystack.co/balance", + "method": "GET", + "params": [], + "description": "You can only transfer from what you have" + }, + { + "api": "balance", + "endpoint": "https://api.paystack.co/balance/ledger", + "method": "GET", + "params": [], + "description": "Returns all activity carried out from and to the Paystack Balance" + } + ], + "settlement": [ + { + "api": "fetch", + "endpoint": "https://api.paystack.co/settlement", + "method": "GET", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Query Params", + "required": false, + "type": "String" + }, + { + "parameter": "from", + "required": false, + "type": "String" + }, + { + "parameter": "to", + "required": false, + "type": "String" + }, + { + "parameter": "subaccount", + "required": false, + "type": "String" + } + ], + "description": "Settlements made to your bank accounts and the bank accounts for your subaccounts\n\n**Query Params**\n- **from** - Lower bound of date range. Leave undefined to export settlement from day one.\n- **to** - Upper bound of date range. Leave undefined to export settlements till date.\n- **subaccount** - Provide a subaccount code to export only settlements for that subaccount. Set to `none` to export only transactions for the account." + } + ], + "decision": [ + { + "api": "resolve", + "endpoint": "{BIN)", + "method": "GET", + "params": [ + { + "parameter": "bin", + "required": true, + "type": "String" + } + ], + "description": "**Path Params**\n- **bin** (_required_) - First 6 characters of card" + } + ], + "invoice": [ + { + "api": "archive", + "endpoint": ":id_or_code", + "method": "POST", + "params": [], + "description": "Used to archive an invoice. Invoice will no longer be fetched on list or returned on verify." + } + ], + "verifications": [ + { + "api": "resolve", + "endpoint": "https://api.paystack.co/verifications", + "method": "POST", + "params": [ + { + "parameter": "", + "required": false, + "type": "String" + }, + { + "parameter": "Body Parameters", + "required": false, + "type": "String" + }, + { + "parameter": "verification_type", + "required": true, + "type": "String" + }, + { + "parameter": "phone", + "required": true, + "type": "String" + }, + { + "parameter": "callback_url", + "required": false, + "type": "String" + } + ], + "description": "Using the Truecaller API you can verify the authenticity of a customer. It returns the customer's name, phone number, email, social media handles and organization as available on their Truecaller profile.\n\n**Body Parameters**\n- **verification_type** _(required)_\n- **phone** _(required)_ - Customer phone number starting with country code (without the + prefix)\n- **callback_url** - Link on server to receive the truecaller details" + } + ] +} diff --git a/public/index.html b/public/index.html index ab1ad8a..8ef6d70 100644 --- a/public/index.html +++ b/public/index.html @@ -1,13 +1,11 @@ + + Express + + - - Express - - - - -

Express

-

Welcome to Express

- - + +

Express

+

Welcome to Express

+ diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 9453385..05a1470 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -1,8 +1,8 @@ body { padding: 50px; - font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; + font: 14px 'Lucida Grande', Helvetica, Arial, sans-serif; } a { - color: #00B7FF; + color: #00b7ff; } diff --git a/readme.md b/readme.md index dd33355..d53993b 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,6 @@ [![Paystack Logo](https://res.cloudinary.com/drps6uoe4/image/upload/c_scale,w_200/v1584835701/Paystack-CeruleanBlue-StackBlue-HL_2_neik7g.png)](https://paystack.com) - The Paystack CLI helps you build, test, and manage your Paystack integration right from the terminal. With the Paystack CLI, you can: @@ -12,9 +11,8 @@ Trigger webhook events to easily test your integration Create, retrieve, update, and delete API objects Clone real life sample applications with fully integrated payment channels. - And of course the Paystack CLI is open source with a [public repository](https://github.com/lukman-paystack/paystack-cli) - on GitHub. Contributions, features, sample apps from developers are encouraged. +on GitHub. Contributions, features, sample apps from developers are encouraged. ## Installation @@ -28,17 +26,17 @@ $ paystack $ login ``` - ## Get started ### API -Paystack CLI allows you to make API calls to the Paystack API right from the terminal, for example to initialize a transaction, run +Paystack CLI allows you to make API calls to the Paystack API right from the terminal, for example to initialize a transaction, run ```sh $ transaction initialize --amount 1000 --email customer@email.com ``` -The terminal's output would look like this + +The terminal's output would look like this ```sh authorization_url - - - -- - -- - - - - - - - - - - - https://checkout.paystack.com/9wvzhxlk66uylzp @@ -53,6 +51,7 @@ $ transaction verify --reference T394541625653843 --domain live ``` #### output + ```sh id - - - -- - -- - - - - - - - - - - - 521587687 domain - - - -- - -- - - - - - - - - - - - live @@ -74,9 +73,12 @@ transaction_date - - - -- - -- - - - - - - - - - - - 2020-02-27T17:27:31.000Z ``` - ### Webhook -You can tunnel Paystack webhook events directly to your localhost without any third party software directly from your terminal + +You can tunnel Paystack webhook events directly to your localhost without any third party software directly from your terminal. + +You first need to sign up (or login) on [ngrok](https://ngrok.com/) and obtain your auth token. +Then add it as an environment variable `NGROK_AUTH_TOKEN` ``` $ webhook listen localhost:8995/pay/pstk-webhook?country=ng @@ -88,6 +90,7 @@ You can tunnel Paystack webhook events directly to your localhost without any th > Tunelling webhook events to localhost:8995/pay/pstk-webhook?country=ng > Webhook events would now be received at localhost:8995/pay/pstk-webhook?country=ng ``` + NOTE - This command is only avalaible in test mode, and by using this command, the CLI would automatically make changes to the Test Webhook URL set on your Paystack dashboard. You can also run an health check on your live/test webhook endpoint from your terminal @@ -97,32 +100,25 @@ $ webhook ping --domain live ``` #### output + ```sh -- - - - - - - - - - - - - - - - - - -- -- - - - - - - +- - - - - - - - - - - - - - - - - - -- -- - - - - - - Sending sample charge.success event payload to https://paycash.pstk.xyz/pay/pstk-webhook?country=ng 401 - - Unauthorized Unauthorized ``` - ### Sample Apps + We have built different sample apps and embedded them in the CLI, you can setup a sample project in your terminal by running ```sh $ sample sample-react "~/Desktop/Work" ``` +By default, all commands are run in test mode, to switch to live, append the flag _"--domain live"_ at the end of your command - -By default, all commands are run in test mode, to switch to live, append the flag *"--domain live"* at the end of your command - - - - -License ----- +## License MIT - -