Using Stripe webhooks with autoform

Hi everyone! For starters I am fairly new to Meteor.js so i am by no means an aficionado. I have begun a basic website where users can post/view etc. And in order to have subscriptions i am currently using Stripe. The way i would like my system to work is by having users enter all of their information for their post. Then when they click submit have the stripe webhook check if the payment succeeds and respond to the website. Then completing the post.

My Code is as follows:

Add Post Page

{{#autoForm collection=“Posts” id=“insertPostForm” type=“insert”}}

Post duration

{{> afFormGroup name="expiryDate" options=expiryOptions}} {{> afQuickField name='post'}}


{{> afQuickField name='address'}}
{{> afQuickField name='status' options='allowed'}}


{{> afQuickField name='details'}}
{{> afQuickField name='yearCreated'}}
Pay With Stripe Add Post
{{/autoForm}} `

I am currently using the matb33:collection-hooks package to try and go through stripe checkout before inserting the post. Stripe will open on submit button click however the post will be created whether or not the stripe authentication passes.

'//Stripe Integration Testing
Post.before.insert(function(userid, doc) {{
key: 'pk_test_hefwefhuiwehfwe79',
amount: 5000, // this is equivalent to $50
name: 'post',
description: 'On how to use Stripe ($50.00)',
panelLabel: 'Pay Now',
token: function(res) {
stripeToken =;;'chargeCard', stripeToken);


The problem is that i cant find a way to get the stripe webhook to go before the post succeeds. Leading me to the issue where a user can create a posting without having to pay anything. Any help would be appreciated guys! thanks for the help!