You should use only that module through parse-develop local environment
npm install parse-develop
Documentation is available at https://stripe.com/docs/api/node.
Every resource is accessed via your stripe
instance:
var Stripe = require("stripe");
Stripe.initialize('YOUR API KEY');
// Stripe.{ RESOURCE_NAME }.{ METHOD_NAME }
Every resource method returns a promise, so you don't have to use a regular callback. E.g.
// Create a new customer and then a new charge for that customer:
Stripe.Customers.create({
email: 'foo-customer@example.com'
}).then(function(customer) {
return Stripe.Charges.create({
amount: 1600,
currency: 'usd',
customer: customer.id
});
}).then(function(charge) {
// New charge created on a new customer
}, function(err) {
// Deal with an error
});
Where you see params
it is a plain JavaScript object, e.g. { email: 'foo@example.com' }
- Account
retrieve()
- Balance
retrieve()
listTransactions([params])
retrieveTransaction(transactionId)
- Charges
create(params)
list([params])
retrieve(chargeId)
capture(chargeId[, params])
refund(chargeId[, params])
update(chargeId[, params])
updateDispute(chargeId[, params])
closeDispute(chargeId[, params])
setMetadata(chargeId, metadataObject)
(metadata info)setMetadata(chargeId, key, value)
getMetadata(chargeId)
- Coupons
create(params)
list([params])
retrieve(chargeId)
del(chargeId)
- Customers
create(params)
list([params])
update(customerId[, params])
retrieve(customerId)
del(customerId)
setMetadata(customerId, metadataObject)
(metadata info)setMetadata(customerId, key, value)
getMetadata(customerId)
updateSubscription(customerId, subscriptionId, [, params])
cancelSubscription(customerId, subscriptionId, [, params])
createCard(customerId[, params])
listCards(customerId)
retrieveCard(customerId, cardId)
updateCard(customerId, cardId[, params])
deleteCard(customerId, cardId)
deleteDiscount(customerId)
- Events (types of events)
list([params])
retrieve(eventId)
- InvoiceItems
create(params)
list([params])
update(invoiceItemId[, params])
retrieve(invoiceItemId)
del(invoiceItemId)
- Invoices
create(params)
list([params])
update(invoiceId[, params])
retrieve(invoiceId)
retrieveLines(invoiceId)
retrieveUpcoming(customerId)
pay(invoiceId)
- Plans
create(params)
list([params])
update(planId[, params])
retrieve(planId)
del(planId)
- Recipient
create(params)
list([params])
update(recipientId[, params])
retrieve(recipientId)
del(recipientId)
setMetadata(recipientId, metadataObject)
(metadata info)setMetadata(recipientId, key, value)
getMetadata(recipientId)
- Tokens
create(params)
retrieve(tokenId)
- Transfers
create(params)
list([params])
retrieve(transferId)
update(transferId[, params])
cancel(transferId)
listTransactions(transferId[, params])
setMetadata(transferId, metadataObject)
(metadata info)setMetadata(transferId, key, value)
getMetadata(transferId)
Originally by Stripe and Ask Bjørn Hansen (ask@develooper.com). Development was sponsored by YellowBot. Unofficial port from Stripe to Parse