1.0.1 • Published 4 years ago

@endpay/endpay v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

EndPay Node JS

Complete documentation

This library is an implementation made in javascript of the EndPay API, it is incomplete and only contemplates functionalities that will be used by banks and payments, if you want to add the rest, do it without problems.

Support Version

Current support EndPay API version 1.0

Install

Npm:

npm install --save endpay

Yarn:

yarn add endpay

Getting started

Authenticate with your Commerce ID Key, and Secret Key

Make sure you have created your free account on EndPay and that you have your Credentials.

// CommonJS
const EndPay = require('endpay');

// ES6 / Typescript
import EndPay from 'endpay'

const endPay = new EndPay({
  commerceId: 'COMMERCE_ID',
  apiKey: 'YOUR_API_KEY'
})

Payments

Create payment

endPay.payments
  .create({
    subject: 'First Product',
    amount: '1000'
  })
  .then(response => {})
  .catch(error => console.log(error)) // Handle the error.

Read payment

endPay.payments
  .read(paymentId)
  .then(response => {})
  .catch(error => console.log(error)) // Handle the error.

Delete payment

endPay.payments
  .delete(paymentId)
  .then(response => {})
  .catch(error => console.log(error)) // Handle the error.
1.0.1

4 years ago