0

I'm making an iOS app that uses Parse for the backend and Stripe for purchasing. I'm trying to add multiple credit cards to a stripe customer object through Parse cloud code and according to the Stripe API guide, the only way to do this is by using the following:

Stripe.Customers.createSource (
  request.params.customerId,
  {source: request.params.cardToken},
  function(err, card) {
    // asynchronously called
  }
);

When I run this code I get the following error: object [object Object] has no method 'createSource'

I've seen some users having similar issues that were resolved by reverting Parse cloud code to version 1.5.0: here, here, and here

But no matter which version I run this code in (1.6.14, 1.5, 1.3.5), the problem still persists. Am I missing something to make this method work? Is there another way to add multiple credit cards to the same customer?

Community
  • 1
  • 1
jchmilew
  • 198
  • 2
  • 10
  • Parse, to my knowledge, no longer supports their Stripe library. They have not updated it in years, and they have removed all documentation for it. I'd recommend using the official Stripe library on another service like Heroku or AWS lambda. – Matthew Arkin Jan 20 '16 at 18:14
  • I created a fork of the official Stripe API library that should work on Parse. https://github.com/matthewarkin/stripe-parse – Matthew Arkin Jan 20 '16 at 22:06

0 Answers0