Setup Steps

日本語での設定方法の解説はこちらを参照ください:C5J Stripe Subscription アドオンの設定方法(conrete5.co.jp サイト)

 


Prerequisites

Please create an account on the Stripe side in advance.

 

Setup Flow

1. Set up the plan (Stripe)

The following four settings are required on the Stripe side.

  1. Add a product (plan)
  2. Set the consumption tax
  3. Webhook settings
  4. Apply to use the production environment

 

2. Create a group for the plan (concrete5)

From Dashboard > Member > UserGroup page, create the user group you want to use for the plan.

 

3. Get the access key to Stripe and set it as an add-on (Stripe & concrete5)

In order to access Stripe from concrete5, you need a "publishable key" and "secret key" issued by Stripe.

Go to the Stripe Dashboard page and go to Development > API Keys from the left side menu. Click on the "Public Key" and "Secret Key" in the standard key to copy them. (The figure below is for a test run. It may be slightly different during production.

 

Set the obtained keys in the API Settings tab on the concrete5 Dashboard > Stripe > Settings page.

 

4.Setting up a Webhook (Stripe)

To use the add-on, you need to set up a webhook on the Stripe side.

For the endpoint URL to be set in Stripe, set the URL displayed in "Required Webhook".

There are five events to be set on the Stripe side as follows:

  • customer.subscription.updated
  • customer.subscription.deleted
  • customer.updated
  • customer.deleted
  • invoice.payment_action_required

After configuring the settings, set the secret key displayed to "Stripe Webhook Secret" in the API Settings tab on the concrete5 Dashboard > Stripe > Settings page.

Once the settings are complete, click Save at the bottom of the page.

 

5. configure your plan(concrete5)

Go to Dashboard > Stripe > Plan page. Click [+Add Plan] at the top of the page.

The Add Plan page will appear.

 

  • Stripe Plan:
  • Name:
  • Handle:
  • Group:
  • Description:
When you are done, click [Add Plan] at the bottom of the page.

Repeat this process for each plan you want to use with concrete5.

 

6. Create an application page(concrete5)

Create an application page for the plan.

Click the + icon on the toolbar to display the block list. Find the "Stripe Plan List" block in the list.

It is in the Other category, so scroll down to it, or type "Stripe" in the search box to display it in the list and insert it into the page.

The Add Stripe Plan List popup will appear.

Select the plans you want to see under "Select Plans". If you want to list all of them, set "All Plans".

The "Success Page" is the page to go to after a successful payment. By default, http(s)://[your site URL]/index.php/account/billing will be displayed.

The "Cancel Page" is the page to go to after canceling the payment. By default, the top page of the site will be displayed.

 

If you want to set the "Success Page" and "Cancel Page" uniformly, please refer to the option settings described below.

Once you have completed the settings, click [New] at the bottom of the pop-up.

 

A list of plans will be displayed with the settings you made. (The figure below shows an example of the settings for the Elemental theme.

 

If you want to create the application page in a hierarchy other than the home page, or if you want to set the URL slug to something other than "pricing", you need to set the "Pricing page URL" in the Options tab of the Settings page.

 

Option settings

The C5J Stripe Subscription add-on provides the following features as options.

 

 

Display settings in local currency

You can find the settings in the API Settings tab of Dashboard > Stripe > Settings page.

Setting up the display in the local currency.

Rather than converting the currency, it will display the cost in the format you choose. Payment will be made in the currency set in the plan (product) created on the Stripe side.

 

Admin approval when signing up for a plan

You can find the settings in the [Optional Settings] tab of the Dashboard > Stripe > Settings page.

By default, when a plan is subscribed, the subscription process will proceed automatically, but if you enable the "Require admin approval to create new subscription." checkbox, admin approval will be required.

 

The data will be passed to the Stripe side in draft form until the administrator approves it. If the administrator rejects the approval, the data is passed to Stripe as cancelled.

If the administrator rejects the approval, the data is passed to the Stripe side as cancelled.

 

Whether Checkout is available

You can find the settings in the [Optional Settings] tab of the Dashboard > Stripe > Settings page.

This is a setting that allows you to proceed without checking a box that makes you prove that you agree to the Terms of Service when you sign up.

When checked, a field to set the URL of the condition page will appear.

 

Default settings for each page

You can find the settings in the [Optional Settings] tab of the Dashboard > Stripe > Settings page.

The URLs for the successful payment page, payment cancellation page, and pricing (application) page can be set individually.

The default is as follows. (Depending on your concrete5 settings, index.php may not be displayed)

  • Payment success page
    • http(s)://[your site URL]/index.php/account/billing
  • Cancel page
    • http(s)://[your site URL]/index.php
  • Pricing (application) page
    • http(s)://[your site URL]/index.php/pricing

 

If you want to set the URL to something other than the above, change it.

 

Email Notification

You can find the settings in the [Email Settings] tab of the Dashboard > Stripe > Settings page.

Set whether or not to send the following email when a user signs up for a plan.

  • Send an email to the user.
  • Send an email to the administrator.

If you want to use this setting, you need to register the "customer.subscription.created" event on the Stripe side in advance.

 

Subscription List and Details

If you go to Dashboard > Stripe > Subscriptions page, you can see a list of users who are currently subscribed to a plan or have cancelled.

The status shown is the status shown on the Customers > Subscriptions page on the Stripe side. If you canceled the payment but it still shows as active, check the status and settings on the Stripe side.

(Recurring payments are often set to be cancelled at the end of the billing period, so a one-month subscription may show as "active" until the next month.)

 

Click on the user name to display the Dashboard > Members > User Search > User Details page.

Clicking on a Stripe plan name will bring up the Dashboard > Stripe > Plans > Plan Details page.

Click on the Stripe ID, or the row near the status, to see the details of the contract.