stancer
v1.0.6
Published
Stancer API wrapper for NodeJS.
Downloads
18
Maintainers
Readme
Stancer Node.js Library
The Stancer Node library provides convenient access to the Stancer API from applications written in server-side JavaScript.
This package isn't an official package but a community made.
Documentation
Installation
To install the latest version on npm locally and save it in your package's package.json file:
npm install stancer-api --save
To install the latest development version locally, without updating your project's package.json file:
npm install git+https://github.com/Arkmind/stancer-api.git
Usage
Simple usage
import { Client } from "stancer-api";
const client = new Client({
stest: process.env.SECRET_TEST_STANCER_API_KEY,
sprod: process.env.SECRET_PROD_STANCER_API_KEY,
});
client.customer.get('cust_id');API Reference
The export Client as a property named payment that is an instance of Payment, containing methods to manipulate payments.
Get payment data Client.payment.get(id: string)
Create a payment Client.payment.create(data: PaymentCreate)
PaymentCreate
Update a payment Client.payment.update(id: string, data: PaymentUpdate)
PaymentUpdate
List all payment Client.payment.list(data: PaymentList)
PaymentList
The export Client as a property named creditCard that is an instance of CreditCard, containing methods to manipulate credit cards.
Get credit card data Client.creditCard.get(id: string)
Create a credit card Client.creditCard.create(data: CreditCardCreate)
CreditCardCreate
Update a credit card Client.creditCard.update(id: string, data: CreditCardUpdate)
CreditCardUpdate
Delete a credit card Client.creditCard.delete(data: CreditCardDelete)
CreditCardDelete
The export Client as a property named sepa that is an instance of Sepa, containing methods to manipulate SEPAs.
Get SEPA data Client.sepa.get(id: string)
Create a SEPA Client.sepa.create(data: SepaCreate)
SepaCreate
Update a SEPA Client.sepa.update(id: string, data: SepaUpdate)
SepaUpdate
Delete a SEPA Client.sepa.delete(data: SepaDelete)
SepaDelete
The export Client as a property named customer that is an instance of Customer, containing methods to manipulate Customers.
Get Customer data Client.customer.get(id: string)
Create a Customer Client.customer.create(data: CustomerCreate)
CustomerCreate
Update a Customer Client.customer.update(id: string, data: CustomerUpdate)
CustomerUpdate
Delete a Customer Client.customer.delete(data: CustomerDelete)
CustomerDelete
The export Client as a property named refund that is an instance of Refund, containing methods to manipulate Refunds.
Get Refund data Client.refund.get(id: string)
Create a Refund Client.refund.create(data: CustomerCreate)
RefundCreate
The export Client as a property named dispute that is an instance of Dispute, containing methods to manipulate Disputes.
Get Dispute data Client.dispute.get(id: string)
List all Dispute Client.dispute.delete(data: DisputeList)
DisputeList
The export Client as a property named payout that is an instance of Payout, containing methods to manipulate Payouts.
Get a Payout detail Client.payout.get(id: string, type: PayoutTypes, data?: PayoutList)
PayoutTypes, PayoutList
List all Payouts Client.payout.list(data: PayoutList)
PayoutList
Contribute
Clone the Git repository and start building good stuff.
$ git clone [email protected]:Arkmind/stancer-api.git
$ cd stancer-api
$ npm installWhen done create a pull request respecting git convention.
