Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module provides integration with Recurly Commerce, a subscription management platform for Shopify. It allows you to handle subscription billing, process webhooks, and manage customer portals by connecting to Recurly Commerce's REST API. This integration is specifically for Recurly Commerce and not for standard Recurly.

Provides Drupal integration with Recurly Commerce (formerly Prive), a Shopify-first subscription management platform acquired by Recurly in 2024. This module enables subscription billing, webhook handling, and customer portal management for sites that need to integrate with Recurly Commerce's REST API.

IMPORTANT: This module is for Recurly Commerce (Shopify integration), NOT standard Recurly. They are completely different products with different APIs, authentication methods, and admin portals. If you need standard Recurly integration, this is not the right module.

Features

This module provides:

  • REST API Client: Complete PHP client for Recurly Commerce REST API with Bearer token authentication
  • Webhook Handling: Secure webhook endpoint with HMAC-SHA256 signature verification
  • Event System: Symfony event dispatching for incoming webhooks, allowing custom modules to react to subscription events
  • Drush Commands: Command-line tools for:
    • Testing API connections
    • Listing subscriptions
    • Managing webhooks (create, list, delete)
  • Secure Credential Storage: Integration with the Key module for secure API key storage
  • Comprehensive Testing: Kernel tests for API service and webhook validation

Use Cases:

  • Integrate Drupal with Shopify subscription businesses
  • Process subscription lifecycle events (created, updated, cancelled)
  • Handle billing events (successful payments, failed attempts)
  • Manage customer subscriptions from Drupal
  • Sync subscription data between Recurly Commerce and Drupal

Post-Installation

After enabling the module:

  1. Configure API Credentials: Navigate to /admin/config/services/recurly-api
  2. Create API Key in Recurly Commerce:
  3. Store API Key Securely:
    • Install and enable the Key module if not already installed
    • Create a new key at /admin/config/system/keys
    • Select "Configuration" as the key type
    • Paste your Recurly Commerce API key
    • Save the key
  4. Configure Module Settings:
    • Select your API key from the dropdown
    • Optionally configure webhook signing key (provided when you create webhooks)
    • Enable webhook logging if desired for debugging
  5. Test Connection:
    drush recurly:test-connection
  6. Create Webhooks (optional, but recommended):
    drush recurly:create-webhook https://yoursite.com/recurly/webhook --events="subscriptions/created"
    drush recurly:create-webhook https://yoursite.com/recurly/webhook --events="billingAttempts/failed"

    Note: Recurly Commerce only supports ONE event topic per webhook, so you must create separate webhooks for each event type you want to receive.

  7. React to Webhooks (optional): Create an event subscriber in your custom module to process webhook events.

Additional Requirements

Required Modules:

PHP Requirements:

  • Drupal 9.4+, 10, or 11
  • Guzzle HTTP client (included with Drupal core)

External Services:

Similar projects

Recurly (https://www.drupal.org/project/recurly)

  • This is for the standard Recurly platform (v3.recurly.com)
  • Uses HTTP Basic Authentication and the recurly/recurly-client PHP library
  • If you're using standard Recurly (not Shopify integration), use that module instead
  • This module (Recurly Commerce API) is for the Shopify-specific Recurly Commerce platform (formerly Prive)

Key Differences:

Feature Standard Recurly Module This Module (Recurly Commerce) Platform Recurly (universal) Recurly Commerce (Shopify-first) API URL v3.recurly.com subs.api.tryprive.com Auth HTTP Basic Bearer Token Admin recurly.com admin.tryprive.com Library recurly/recurly-client REST API (Guzzle) Webhooks Multiple topics per webhook ONE topic per webhook

Community Documentation

Official Recurly Commerce Documentation:

Module Documentation:

  • Full README with code examples: See README.md in the module
  • Drush command reference: Run drush recurly --help
  • API usage examples: See README.md "API Usage" section

Quick Start Example

// Get subscriptions
$recurly = \Drupal::service('recurly_commerce_api');
$subscriptions = $recurly->get('/subscriptions', ['limit' => 10]);

// Create webhook
$webhook = $recurly->post('/webhooks', [
  'address' => 'https://example.com/recurly/webhook',
  'topic' => 'subscriptions/created',
]);

// Update subscription status
$result = $recurly->patch('/subscriptions/sub_123/status', [
  'status' => 'paused'
]);

Activity

Total releases
1
First release
Nov 2025
Latest release
8 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.x-dev Dev Nov 2, 2025