Conekta Node v 1.0.0
Wrapper to connect with https://api.conekta.io.
Install
npm install conekta
Usage
var conekta = require('conekta'); conekta.api_key = '9YxqfRnx4sMQDnRsqdYn';conekta.locale = 'es'; conekta.Charge.create({ description: 'Stogies', amount: 50000, currency: 'MXN', reference_id: '9839-wolf_pack', card: 'tok_test_visa_4242', details: { email: 'logan@x-men.org' }}, function(res) { console.log(res.toObject());}, function(err) { console.log(err.message_to_purchaser);});
Endpoints
//Chargeconekta.Charge.create(hash, success, error);conekta.Charge.where(hash, success, error);conekta.Charge.find(charge_id, success, error); conekta.Plan.create(hash, success, error);conekta.Plan.where(hash, success, error);conekta.Plan.find(plan_id, success, error); conekta.Event.where(hash, success, error); conekta.Customer.create(hash, success, error);conekta.Customer.where(hash, success, error);conekta.Customer.find(customer_id, hash, success, error); conekta.Payee.create(hash, success, error);conekta.Payee.where(hash, success, error);conekta.Payee.find(payee_id, success, error); conekta.Payout.create(hash, success, error);conekta.Payout.where(hash, success, error);conekta.Payout.find(payout_id, success, error);
Documentation
Please see https://www.conekta.io/docs/api for up-to-date documentation.
Tests
$ npm test
License
Developed by Conekta. Available with MIT License.