Manual

By default, the "manual" payment gateway is set. This will show a message that a user should send an email to the public email address. The admin can change the premium expiration date in the user admin.

Pricing

The pricing can be configured in the .env file in the web root:

# Premium pricing
PREMIUM_PRICE_MONTHLY=""
PREMIUM_PRICE_YEARLY=""
PREMIUM_PRICE_CURRENCY=""

The default values are:

# Premium pricing
PREMIUM_PRICE_MONTHLY=39
PREMIUM_PRICE_YEARLY=399
PREMIUM_PRICE_CURRENCY="USD"

Configure Stripe

Gateway

To configure Stripe, open the .env file in the web root and set the PAYMENT_GATEWAY to "stripe". Follow the steps below to configure the other settings.

PAYMENT_GATEWAY="stripe"

API keys

On the Stripe dashboard, go to Developers > API keys. Here you will find the publishable and secret keys.

# Developers > API keys > Publishable key
STRIPE_PUBLIC_KEY=""
# Developers > API keys > Secret key
STRIPE_SECRET_KEY=""
Stripe - Developers - API keys

Webhook

Now go to Developers > Webhooks and click "Add endpoint".

Your endpoint is the domain where you installed the script with the addition /api/webhooks/stripe. For example https://example.com/api/webhooks/stripe.

At "Events to send" select the following items:

  • customer.deleted
  • invoice.payment_succeeded
  • customer.subscription.updated
Stripe - Developers - Add endpoint

Add products

You have to add two products, one with monthly billing for the montly subscription, and one with annual billing for the yearly subscription.

Go to Products and click "Add a product". Enter a "Name" and "Price". Leave "Standard pricing" and "Recurring", and don't add a trial period.

Stripe - Products Stripe - Add product

Click "Save product", now the product details will be shown as below. Copy the API ID. This starts with price_ and looks like price_1Gz2U9FClLTitVS9B01ZH1xT.

Stripe - Product details

Enter the "price_xxxxxxxx" ids in the .env file.

STRIPE_PLAN_ID_MONTHLY=""
STRIPE_PLAN_ID_YEARLY=""