Zephr User Guide

Stripe

16 views 0

Zephr includes out-of-the-box integration with Stripe. Use this guide to find out how to use Stripe as your payment provider within Zephr.

Prerequisites

In order to use the Zephr/Stripe integration, you will need to be using the Stripe API Version 2020-08-27.

Integrating with Stripe

Navigate to Settings > Extensions within your Zephr Admin Console, and select Stripe.

Connection Settings

Select the Connection Settings option. Here you will need to enter some configuration details based upon your pre-existing Stripe Account. You will need to provide the following details:

  • Publishable Key
  • Secret Key
  • Currency Code

Stripe has detailed documentation for finding your API keys and checking your currency code.

Once complete, click Done.

On the main Stripe screen, click Save. Then click Use As Payment Provider to set Stripe as your payment provider for all out-of-the-box Zephr payment forms.

Configuration in Stripe

To complete your integration, you will need to set up a webhook within Stripe to fire to Zephr, sharing when there has been a successful payment.

To do this, navigate to the Webhooks section of your Stripe Admin Console.

Set up a new webhook, using the Endpoint URL of <https://<your-cdn-domain>/blaize/payment/stripe/subscriptionChargedCallback>. Under <your-cdn-domain>, enter the URL you have pointing to the Zephr CDN.

Under Events to Send, select invoice.payment_succeeded, then click Add Endpoint.

Stripe - Stripe Webhook Configuration

Testing your Configuration

To test your configuration, make sure you have at least one Product set up that is linked to a Payment Option and a Feature.

Within that Feature, create a journey for Registered users to see a Payment Form, and test this rule accordingly.

A series of test card numbers are available in the Stripe Documentation to allow you to test payment. Following successful payment, your user will be granted the relevant Product within Zephr, and have access to the Feature Content.

Promo Codes

Promo Codes allow you to link Stripe Coupons to Zephr Products, making the promo code field available for use on your out-of-the-box payment forms.

Before setting these up in Zephr, you will need to create the discount options within Stripe, and link them to the relevant Product Plan (which will be used on your payment form). A full guide for creating Coupons within Stripe is available here, however generalised details for setting this up are available below:

To create a Coupon in Stripe, navigate to your Stripe Dashboard and select Coupons > Create.

Give your Coupon a Name, and then select if it is a Percentage Discount, for a percentage off the total price – e.g. 10%, or a Fixed Discount, for a fixed amount off the total price – e.g. £10.

Set the percentage or amount below.

If relevant, set this to apply to specific products, then set the duration. This promo code can be available forever, for use once, or for use over multiple months. This will determine how often your user can take advantage of the promo code.

Set your redemption limits based upon how many times a user should be able to use this promo code, and the length of time the code should be valid for.

Finally, tick ‘Use Customer-Facing Coupon Codes’ and set the code(s) you want users to add to validate the discount on the payment form.

Click Confirm Coupon.

 Using Promo Codes on a Payment Form

Once you have created a coupon, navigate to the Feature you wish to display a Payment Form on and add a new Outcome with a Payment Form component within it.

Give your form a Title and under ‘Select a Product’ select the Product that is linked to the relevant product and promo code in Stripe.

Add your Payment Options accordingly.

Next, toggle Enable Promo Codes to on.

Click Save, then save your Outcome and add it to your Feature Rule. Publish your rule accordingly.

Once complete, you will see a field on your payment form for entering a Promo Code.

Payment Forms - Braintree Promo Code

A more detailed guide to creating a payment form is available here.