Deprecation Warning!
This package is deprecated in favor of using the standard Stripe package from NPM in conjunction with Meteor's Promise or async/await integration. You can read more about promises and async/await in this blog post.
Stripe Sync
A wrapper for Meteor style synchronous Stripe API calls.
###Notice### As of version 2.0.0 you will no longer need to manually add a package that includes the StripeAPI as it is now included due to the variability of stripe versions being used in those packages
Example Usage
Stripe = StripeSync(key);
try{
var account = Stripe.account.retrieve()
}catch(error){
throw new Meteor.Error(1001, error.message);
}
Wrapped API
This package wraps the methods below. These are all the methods that are listed in the stripe-node github documentation.
- accounts
create(params)
retrieve()
update(accountId[, params])
list([params])
- 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)
createSubscription(customerId, params)
updateSubscription(customerId, subscriptionId, [, params])
cancelSubscription(customerId, subscriptionId, [, params])
listSubscriptions(params)
createSource(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[, subscriptionId])
pay(invoiceId)
- plans
create(params)
list([params])
update(planId[, params])
retrieve(planId)
del(planId)
- recipients
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)