Firstly I see there are several Parse / Stripe questions on here however none are of any help to me.
I have a mobile application that has both free and paid features
Ok after some experimenting:
create a webhook on in the Stripe Accounts area using the URL:
https://**APPLICATION_ID**:javascript-key=**JAVASCRIPT_KEY**@api.parse.com/1/functions/update_user
In your cloud code use the same function name as the final part of your URL. in my case update_user
.
Create a test version of the webhook and place this in your cloud code for testing :
Parse.Cloud.define("update_user", function(request, response) {
response.success('** WEBHOOK WORKING **' + request);
});
When running the test in the stripe dashboard you should see:
Hope that this helps someone - Would be grateful of any input anyone has as to my implementation or a slick function to run on my User
class update.