Video Guide: Watch Video Guide
This module connects Magento with Subscription Platform so customers can buy products as subscriptions, admins can manage subscription plans, and synced orders/customers can be reviewed from Magento.
Contents
What Was Built
Admin Product Setup
Admins can add subscription schedules on product edit pages.
Each schedule includes:
-
Delivery frequency, for example
1 -
Delivery interval, either
WeeksorMonths - Discount value
The discount type is selected once per product:
- Percentage off
- Amount off
- Flat rate
For configurable products, subscription schedules are managed on the child variants, not the parent product.
Product Page Subscription Widget
On the storefront product page, customers see a Save and Subscribe section.
They can choose:
- One-time purchase
- Subscription purchase
- Delivery schedule
The price updates based on the subscription discount.
For configurable products, the widget updates when the customer selects a variant such as size/color.
Cart and Checkout Discount
When the customer adds a subscription item to cart:
- The subscription price is applied in cart and checkout
- Selected delivery schedule is shown in item details
- One-time purchase items are not treated as subscriptions
Subscription Platform Product Sync
When a Magento product is saved, the module syncs it to Subscription Platform.
It creates or updates:
- Subscription Platform product
- One-time plan
- Subscription plans
- Plan prices
Magento stores the returned Subscription Platform IDs so future saves update the same records.
Order and Customer Sync
When a subscription order reaches an allowed order status, the module sends the customer and subscription data to Subscription Platform.
The module:
- Creates or finds the customer in Subscription Platform
- Creates a Subscription Platform subscription for each subscription order item
- Stores the Subscription Platform subscription ID against the Magento order item
One-time orders are skipped.
Admin Logs Page
Admin menu:
Subscription Platform > Logs
This page helps review important Subscription Platform logs from Magento admin.
Admin Subscriptions Page
Admin menu:
Subscription Platform > Subscriptions
This page shows synced Subscription Platform subscription orders.
It includes:
- Magento order link
- Customer
- Product
- Delivery schedule
- Discount
- Price
- Date
- Subscription Platform subscription link
Customer Account Portal
Customer account menu:
Manage Subscriptions
This page opens the Subscription Platform in-app customer portal inside Magento.
Customers can manage their subscriptions from their Magento account area.
The portal uses:
- Saved platform instance URL
- Saved platform client ID
- Logged-in customer email
How To Implement
1. Check Subscription Platform Settings
Go to:
Stores > Configuration > Subscription Platform
Ensure these fields are configured:
- Enabled = Yes
- Instance URL
- Client ID
- Client Secret
2. Configure Simple Product Subscription
- Go to Magento admin product edit.
- Open a simple product.
- Add one or more subscription schedules.
- Save the product.
- Open the product on the storefront.
- Confirm the Save and Subscribe section appears.
- Select a subscription schedule.
- Add to cart.
- Confirm cart price is discounted.
- Place the order.
- Move order to the allowed status if needed.
-
Check
Subscription Platform > Subscriptions. - Confirm the subscription appears with a Subscription Platform link.
3. Configure Configurable Product Subscription
- Open a configurable product in admin.
- Confirm Subscription Platform schedules are not managed on the parent.
- Open a child variant.
- Add subscription schedules on the child variant.
- Save the child product.
- Open the configurable product on storefront.
- Select the matching variant.
- Confirm subscription options appear for that variant.
- Add subscription item to cart.
- Confirm cart and checkout use the subscription price.
- Place the order.
-
Confirm synced subscription appears in
Subscription Platform > Subscriptions.
4. Configure One-Time Purchase Flow
- Open a product that has subscription options.
- Select One-time purchase.
- Add to cart.
- Place the order.
- Confirm the order is not synced as a Subscription Platform subscription.
5. Configure Customer Portal Access
- Log in as a customer.
-
Go to
My Account. -
Click
Manage Subscriptions. - Confirm the portal loader appears.
- Confirm the Subscription Platform portal loads inside the Magento account page.
6. Register Webhook For Recurring Orders
In SubscriptionFlow dashboard, go to:
Settings > Administration Settings > Automation > Webhook
Click Configure Webhook and register a new webhook with
these
values:
-
Name:
Invoice Paid Order Create -
URL to notify:
https://yourmagentourl.com/subscriptionflow/invoice/webhook -
Module:
Invoices -
Event:
Invoice Paid -
Payload Type:
Default -
Method:
POST
URL Parameters:
-
Append Entity Parameter:
invoice_id=Invoices > Id
Preview URL example:
https://yourmagentourl.com/subscriptionflow/invoice/webhook?invoice_id=...
Register webhook for recurring orders endpoint examples:
Local example:
http://rocking.magento.com/subscriptionflow/invoice/webhook
Live example:
https://your-magento-domain.com/subscriptionflow/invoice/webhook
SubscriptionFlow should send a POST request to this endpoint.
Useful Checks
Check Magento Logs
Important logs are in:
var/log/subscription-module.log
Useful messages include:
- Product synced
- Plan synced
- Customer synced
- Subscription synced
- Portal config checked
Check Synced Subscriptions In Admin
Go to:
Subscription Platform > Subscriptions
Click the Subscription Platform link to open the subscription in Subscription Platform.
Notes
-
Subscription schedules support only
WeeksandMonths. - Configurable parent products should not be used for subscription schedules.
- Child variants should have their own schedules.
- The customer portal only works for logged-in customers.
-
If the customer portal does not load, check browser console logs
starting with
[Subscription Platform Portal].
MagentoSubscriptionsSubscription PlatformDocumentation
End of document.
Comments
0 comments
Article is closed for comments.