Stripe makes it easy to start accepting credit cards on the web today. The integration method uses our built in plugin for notification handling.

The integration handles orders, recurring orders and refunds as well. It also supports lifetime commissions and coupon handling.

1.

Each customer account in stripe has an extra field called 'description'. In this integration method, we are using it. The task is to add the (tracking) cookie value into the description field found in your order form. The easiest way is to add this code to your payment form:

<input type="hidden" name="pap_custom" value="" id="pap_tdx8v2s5a" />

<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/salejs.php" type="text/javascript">
</script>
<script type="text/javascript">
  PostAffTracker.writeCookieToCustomField('pap_tdx8v2s5a');
</script>

When the form is submitted (customer is ordering), you can process the form data the standard way and before creating a charge and a customer account (with Stripe_Customer::create), you have to use the _papcustom data from the submitted form and set the value as a customer description - _"description" => $_POST['pap_custom']_

2.

Sale tracking

The sale tracking will happen automatically, both for standard and for recurring charges. The last step is to set your Stripe to inform your Post Affiliate Pro about each charge. This is done by Stripe webhooks.
Webhooks are configured in the webhooks settings section of the Stripe Dashboard. Clicking Add endpoint reveals a form to add a new URL for receiving webhooks. Enter this URL there for a live notifications:

http://URL_TO_PostAffiliatePro/plugins/Stripe/stripe.php?AccountId=Account_ID

That's it. Save your settings.

3.

Plugin activation

The last step is to activate the built-in plugin in your Post Affiliate Pro. Do not forget to configure it after activation.
That's it, you are done. All the transactions will now be tracked.


Do not forget to integrate your site with the click tracking code to make it all working.