Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Download Tracker 1.0.7 — Minor update available for module download_tracker (1.0.7). Release: Directory2Block Slideshow 1.0.8 — Minor update available for module directory2block_slideshow (1.0.8). Release: Mautic Audiences 1.1.5 — Minor update available for module mautic_audiences (1.1.5). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Stripe Customer Portal

No security coverage

Part of the Stripe ecosystem · 9 projects

View on drupal.org

This Stripe Customer Portal module provides a simple and efficient way to integrate Stripe's Customer Portal feature into Drupal websites. It adds a new 'stripe_customer_id' field type and a field formatter that creates a new session for the Stripe customer and generates a link to access the Stripe Customer Portal.

Features:

  • Easy integration with Stripe's Customer Portal.
  • Custom 'stripe_customer_id' field type to store Stripe Customer IDs.
  • Field formatter to generate a link to access the Stripe Customer Portal.

The module allows you to seamlessly manage customer subscriptions and billing information using Stripe's powerful platform while ensuring a user-friendly experience for your customers.

For more information on Stripe and the Customer Portal, please refer to the following resources:

- Stripe Customer Portal
- Stripe API Reference
- Stripe PHP Library

Requirements

Stripe module 2.0+

Please note: This module requires the Stripe PHP library, which is a part of the Stripe module, to function. Make sure to install it using Composer.

Installation and usage

- Install this module using composer as usual and enable it.
- Go to the entity that you want to add the field to, "most probably the User entity"
- Add new field of type "Stripe Customer ID"
- Name your field and save it
- Go to the entity "Manage display" page
- Edit your newly created field and fill in the Link Title and the Return URL (both are mandatory)
- The return URL can be internal link "starts with /" or external link "starts with https"
- Save

In most cases, you also need to hide the field from the entity add/edit form or grant access to authorized users only.
- Go to the entity "form display"
- Move the field to the "disabled" section

Otherwise, you need to grant access to the field using any of the content access modules or techniques.

Integration with Webform and Stripe Webform Payment module

Despite the fact that this module is independent of these modules and can work with any other modules, and even when you want to save the customer ID manually, it is designed to work seamlessly with the Webform module and Stripe Webform Payment.

When using Stripe Webform Payment to create a new Stripe customer, the module can pass the Customer ID as a token to your webform. Webform handlers can then save this token in an entity using the custom 'stripe_customer_id' field provided by the Stripe Customer Portal module.

Once the Customer ID is stored, the field formatter generates a link to access the Stripe Customer Portal, enabling customers to manage their subscriptions, billing information, and other related actions. This integration ensures a streamlined user experience and a secure way to manage Stripe customer information within your Drupal website.

For more information on Webform and Stripe Webform Payment, please refer to the following resources:

- Webform module
- Stripe Webform Payment module

This module has been tested with Drupal 9.

Happy coding!

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
May 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.0-alpha1 Pre-release May 3, 2023