Skip to main content
SubscriptionFlow Docs
WooCommerce

SubscriptionFlow In-App Portal Integration (WooCommerce)

Updated In-App PortalWooCommerece

Purpose

The In-App Portal integration allows WooCommerce customers to manage their subscriptions directly on your website, without redirection to external portals. This guide explains how to configure the SubscriptionFlow In-App Portal step-by-step.

Prerequisites

  • SubscriptionFlow plugin is already installed & configured. 
  • Client ID & Secret Key are already saved. 
  • Domain is whitelisted in SubscriptionFlow. 
  • WooCommerce is active.

1. Navigate to Portal Manager

Login to your SubscriptionFlow Admin Panel. 
Go to Subscription-Flow → Customer Portal 
 
Picture 1, Picture

2. Make Auto Enable Portal Option to TRUE    • Go to SubscriptionFlow Administration Setting → Preferences.  • Preferences à Advance Setting à Auto Enable Portal (TRUE)

Picture 1, Picture

Picture 1, Picture

3. Get the In-App Portal Script

Copy the header script provided: 

 

Replace 'yourorg' with your actual SubscriptionFlow site code. 
 
Picture 1, Picture

4. Add the Script to WordPress Header

Place the script in your theme’s header.php before . 
Or use a plugin like Header & Footer Scripts to inject site-wide.

5. Add the Manage Subscription Button

On the page where you want to show the portal, add this button: 
Manage My Subscription 
This triggers the SubscriptionFlow Portal popup.

6. Create Portal Session for Logged-in Users

Add the following script to initialize the session: 
const portalFlow = new window.PortalFlowInApp(); 
portalFlow.createPortalSession('your-client-id', 'user@example.com'); 
Dynamically pass the logged-in WooCommerce user email. 
Picture 1, Picture 
 
Example in PHP: 
 

 

7. Whitelist Domain in SubscriptionFlow

To ensure the In-App Portal functions correctly on your site: 

  • Login to SubscriptionFlow Admin Panel. 
  • Navigate to Portal Manager > In-App Portal > Whitelist URL. 
  • Add your website domain (e.g., https://yourdomain.com). 
  • Save the settings.

 
 
Picture 1, Picture

8. Configure Webhook in SubscriptionFlow

Go to Settings → Webhooks → Add Webhook.

Set the following parameters: 
Webhook Name: e.g., "Create WooCommerce Customer". 
URL to notify: Enter the REST API endpoint of your WooCommerce site: 
https://yourdomain.com/wp-json/api/sf-create-update-user

Select Module and Event

  • Module: Customers
  • Event: Customer Created

Payload & Method

  • Payload Type: Custom (recommended to control fields).
  • Method: POST

Add URL Parameters

  • You have to append entity parameters.
  • Example:
    • Parameter Name: customer_id
    • Entity: Customers
    • Value Field: Id

Save the Webhook

  • Click Save.
  • SubscriptionFlow will now POST data to your WooCommerce site when a customer is created.

9. Test In-App Portal

Login as a test WooCommerce customer. 
Click the Manage Subscription button. 
The SubscriptionFlow portal should open as a popup with your user details.

Additional Notes

  • You can style the button using CSS to match your site theme. 
  • This method keeps users on your domain while accessing SubscriptionFlow.
Was this article helpful?2 out of 2 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.