Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Stripe API

231 sites Security covered Drupal 8–11 Stripe ecosystem
View on drupal.org

This module makes the Stripe PHP library available as a service within Drupal, allowing developers to easily integrate Stripe functionality into their custom modules. It handles API key storage and provides a webhook endpoint for processing incoming Stripe events.

4.0.x

This module provides the Stripe PHP library as a service. It provides:

  • API key storage via Key.
  • A "@stripe_api.stripe_api" service that can be injected into your PHP classes
  • A web hook route at /stripe/webhook, which will validate incoming webhooks and dispatch a stripe_api.webhook event that can be subscribed to

Once you've enabled the module and set your API keys, you are free to use the Stripe API library in your custom module. Simply injecting the "@stripe_api.stripe_api" into your class is sufficient to open a connection. For example:

use Drupal\stripe_api\StripeApiService;
use Stripe\Subscription;

class MySpecialClass {
  public function __construct(StripeApiService $stripe_api) {
    $this->stripeApi = $stripe_api;
  }
  public function loadSubscriptionsMultiple($args = []) {
    $stripe_client = $this->stripeApi->getStripeClient();
    $subscriptions = $stripe_client->subscriptions->all();
    if (!count($subscriptions->data)) {
      return FALSE;
    }

    return $subscriptions;
  }
}

Requirements

In order to use this module, you must manage your Drupal site dependencies using Composer. See Using Composer to manage Drupal site dependencies for instructions.

Related Modules

7.x-1.x

This module provides a simple abstraction of the Stripe PHP SDK. It does not (and will not) provide any additional functionality. This module is designed to be required by other contrib/custom modules.

See project README.md for more information.

πŸ‡ΊπŸ‡¦

This module is maintained by Ukrainian developers.
Please consider supporting Ukraine in a fight for their freedom and safety of Europe.

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Oct 2025
Latest release
9 months ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core Release date
4.0.2 Stable 8–11 Nov 6, 2025
4.0.1 Stable 8–11 Oct 15, 2025
4.0.0 Stable 8–10 Oct 13, 2025
4.0.x-dev Dev 8–11 Oct 13, 2025