There are 7 steps for getting started.
1) Create an account at https://www.cospot.com/register or log in at https://www.cospot.com/login.
2) You will get automatically directed to your home page. Go to Settings > Sites. Click on the gear icon.
3) Copy the site write key that appears there.
4) Put the following snippet on every page of your website, except for the first page that your users see after they log in:
<script>
cospot = {
write_key: '{{ write_key }}'
};
</script>
<script src="//www.cospot.com/js/cospot.js" async></script>
{{ write_key }} should be replaced with your site write key.
5) For the first page that your users see after they log in (for example, https://app.ninjaoutreach.com/), you should add this snippet instead, which passes 2 extra pieces of information:
<script>
cospot = {
write_key: '{{ write_key }}',
user_id: '{{ user_id }}',
stripe_customer_id: '{{ stripe_customer_id }}'
};
</script>
<script src="//www.cospot.com/js/cospot.js" async></script>
{{ user_id }}: this should be the user_id that you use to identify users in your app.
{{ stripe_customer_id }}: this should be the customer_id that the user has in Stripe.
The purpose of having {{ user_id }} and {{ stripe_customer_id }} is to create a connection between the user who is logging in and the user's payments on Stripe.
6) Set up a webhook on Stripe by going in to Account settings > Webhooks > Add Endpoint and putting in the following URL:
https://www.cospot.com/api/webhooks/stripe?write_key={{ write_key }}
You can select "Send me all events."
7) Contact Alan (either inside CoSpot or via alan@cospot.com) when you're finished with steps 1-6. I'll confirm that they're working, and also do a couple final steps to get you all set up.