3.0.1 • Published 8 years ago

flatmarket-client v3.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

flatmarket-client

A browser client for Flatmarket.

Installation

npm install flatmarket-client

Usage

var flatmarket = require('flatmarket-client').create({
    host: 'your-flatmarket-server.com',
})
flatmarket.getStatus()
    .then(function (status) {})
    .caught(function (err) {})

API Reference

Client.create(options)

Creates the client.

var client = Client.create(options)
options Object
  • host String

    The host. Required.

  • pathname String

    The pathname. Default '/'.

Client Instance Methods

client.createCharge(options)

Creates the charge.

client.createCharge(options)
    .then(function (payload) {})
options Object
  • email String

    The email. Required.

  • metadata Object

    Metadata about the charge. Default undefined.

  • sku String

    The SKU. Should correspond to a key in the Products Object. Required.

  • token String

    The Stripe token. Required.

License

See LICENSE.