How to Activate Stripe in my eDirectory
Introduction
To effectively monetize your eDirectory platform, integrating a reliable payment gateway is crucial for processing subscriptions and other transactions from your users. Stripe is a robust and popular payment solution that offers a wide range of features, including support for one-time payments, recurring subscriptions, and promotional trial periods. This comprehensive guide will walk you through the necessary steps to seamlessly integrate Stripe with your eDirectory website, enabling you to offer flexible payment options to your sponsors and automate your billing processes.
Benefits of Utilizing Stripe:
- Subscriptions: Provide your sponsors with a variety of subscription plans and billing intervals to suit their needs.
- Recurring Payments: Automate the billing cycle for subscriptions, saving you administrative time and ensuring consistent revenue streams.
- Trial Incentives: Attract new users by offering promotional periods, such as a free trial for the first month of a subscription.
Step-by-Step Integration Guide:
Stage 1: Obtaining Your Stripe API Keys
Before you can enable Stripe on your eDirectory site, you need to retrieve your API keys from your Stripe dashboard. These keys are essential for securely connecting your website to your Stripe account.
- Navigate to the Stripe Website: Open your web browser and visit the official Stripe website.
- Create a Stripe Account: If you don't have an existing Stripe account, sign up for a new one.
- Confirm Your Email Address: After creating your account, check your email inbox for a confirmation link from Stripe and follow the instructions to verify your account.
- Activate Your Stripe Account: To fully activate your account and obtain your live API keys, you will need to add your credit card information within the Stripe dashboard.
Important Note: Live API keys can only be accessed when the Test mode in your Stripe dashboard is disabled. Stripe requires valid credit card details to disable test mode.
- Get the Secret Key: After activating your account and disabling test mode, go to the “Developers” section. To do this, use the search bar located at the top of your Stripe dashboard and type “Developers.” In the displayed results, click on the “Developers” menu.
- Reveal and Copy Your Secret API Key: Locate the “Secret Key” section. Then, click the “Reveal live key” button to display your active secret key. Copy this key carefully and store it in a secure location.
Important Note: For security reasons, your live secret key will only be displayed once. Ensure you copy it accurately before clicking the "Done" button.
Stage 2: Enabling Stripe on Your eDirectory Website
With your Stripe Secret Key in hand, follow these steps to activate Stripe as a payment gateway within your eDirectory Site Manager.
- Log in to the Site Manager: Access the administrative backend of your eDirectory website using your login credentials.
- Navigate to Payment Gateway Settings: Go to the "Settings" tab, then select "Products & Plans" and finally click on the "Additional settings & payment gateways" tab.
- Enable Stripe:
- Locate the "Stripe" toggle button and enable it.
- In the "API Key" field, paste the Stripe Secret Key that you copied in Stage 1.
- If you intend to offer recurring subscription payments, ensure the "Auto Bill" option is also enabled.
- Configure Trial Plans (Optional):
- To offer free trials for specific subscription plans, navigate to "Products & Plans." and then select the tab "Manage Plans"
- For each plan where you want to offer a trial, enable the trial option by defining the trial duration in days.
Stage 3: Configuring the Stripe Webhook URL
To ensure the seamless automatic renewal of subscription payments, you need to configure a webhook URL within your Stripe account. Webhooks allow Stripe to communicate important events, such as successful payments, to your eDirectory website in real-time.
- Sign in to Your Stripe Dashboard: Access your Stripe account through the Stripe website.
- Open the Webhooks Tab: Under the "Developers" option, click on the "Webhooks" tab.
- Add a New Endpoint: Click the "Create an event destination" button.
- Enter the Webhook URL: In the "Endpoint URL" field, enter the protocol /sponsors/billing/stripe_webhook.php with your actual website domain, see example below:
https://yourdomain.com/sponsors/billing/stripe_webhook.php
Important Note: If your website uses HTTPS, ensure the URL starts with https://
.
- Select Events to Listen To: Click the "Select events" button.
- Choose the "invoice.payment_succeeded" Event: In the event selection modal, search for "invoice.payment_succeeded" check the box next to it, and then click "Add events."
- Save the Webhook Endpoint: Finally, click the "Add endpoint" button to save your webhook configuration.
Note: If your eDirectory website utilizes add-on domains or multiple domains, you will need to create a separate webhook endpoint in Stripe for each domain, using the corresponding domain in the Webhook URL.
Conclusion
By following these detailed steps, you can successfully integrate Stripe as a payment gateway on your eDirectory website. This integration enables you to offer a secure and convenient payment experience for your users, while also automating your subscription billing processes. If you encounter any questions or require further assistance during this setup, please do not hesitate to reach out to our dedicated support team at support@edirectory.com.