This weekend we were all set for a soft invitation-only launch. Until we realized we couldn’t get paid. That’s bad for business.
It’s all my fault. I was charged with the task of enabling users to leave us with their sweet bundles of cash. Easy enough, I thought.
Since we are hosting our backend with Parse.com (an excellent «Backend as a Service»), we would ideally use Stripe.com for payments, since they are nicely integrated with Parse.com. Only problem is, you need a US or UK registered business and bank account to use Stripe.com.
We have neither. Yet.
We decided to go for PayPal’s new REST API instead. It has a beautiful little SDK for Node.js. I had to build a little payment proxy outside of Parse.com, since Parse.com doesn’t allow using just any package, only ones they have pre-approved.
A few hundred lines of code later it all works in sandbox mode, and we are good to go.
Until we test it in our production environment. Nothing works as expected. After some intense debugging, I finally go to PayPal’s developer portal to triple-check the settings. That’s when I see the fine print:
«PayPal’s new REST API is not available outside of the US.»
Actually, the print isn’t all that fine. It’s staring at my face – and I wonder why I didn’t see this before.
Let this be a reminder to all of you, to make absolutely sure that a service will work for you before you spend your precious hours implementing it.
In the meantime, we will have to do PayPal’s standard payment and manually update users’ credit balances on a regular basis.
Hello, I’m currently working on a Parse application and I’m having the same problem with Paypal payments. Can you please describe the aproach you took to solve Paypal payments in your app. By looking at your post I’m assuming you have an additional node.js server which has the paypal sdk on it and it handles the payments…
Hope to hear from you
Yes that was the original solution. We ran a node.js instance over at Heroku.com with the paypal sdk on it. We used express to set up a few REST end-points that we called with Parse.Cloud.httpRequest from within our cloud backend.
Thanks for the quick reply, I’m gonna try to make it work with Classic Paypal API first, and if that fails I’ll guess I’ll have to take your approach, but I kinda dislike the idea of having an extra server just to handle the payments.
Yes it is rather ugly.
What happens! Read the next episode of Lillytales, the story about the crew behind Lilly Sleep and Lilly Labs:
Why Little Lilly refuses to print #lillygram letters from more than a 150 people