APIs for managing Shopify delivery profiles, shipping rates, zones, and free shipping configuration for subscription memberships
- Generate customer portal magic link
External (0.0.1)
Request
Retrieves available billing frequency/interval options for specified Shopify selling plans (subscription plans). This endpoint returns all configured billing frequencies that customers can choose from for their subscriptions.
Key Information Returned:
- Frequency Options: List of available billing intervals (e.g., weekly, monthly, quarterly)
- Interval Units: Time unit for each option (DAYS, WEEKS, MONTHS, YEARS)
- Interval Count: Number of units between billings (e.g., 2 = every 2 weeks)
- Display Names: Customer-friendly names for each frequency option
- Plan IDs: Associated selling plan IDs for each frequency
Billing Frequency Structure: Each FrequencyInfoDTO contains:
- id: Selling plan ID (Shopify subscription plan identifier)
- name: Display name (e.g., "Deliver every 2 weeks", "Monthly subscription")
- intervalUnit: Time unit (DAY, WEEK, MONTH, YEAR)
- intervalCount: Number of units between deliveries
- billingPolicy: How billing is configured (EXACT_DAY, ANNIVERSARY)
- deliveryPolicy: How delivery is scheduled
Common Billing Intervals:
- Weekly: intervalUnit=WEEK, intervalCount=1
- Bi-Weekly: intervalUnit=WEEK, intervalCount=2
- Monthly: intervalUnit=MONTH, intervalCount=1
- Every 2 Months: intervalUnit=MONTH, intervalCount=2
- Quarterly: intervalUnit=MONTH, intervalCount=3
- Semi-Annual: intervalUnit=MONTH, intervalCount=6
- Annual: intervalUnit=YEAR, intervalCount=1
Request Parameters:
- sellingPlanIds: Comma-separated list of Shopify selling plan IDs (required)
- Example: "123456,123457,123458"
- Returns frequency options for all specified plans
Common Use Cases:
- Display available billing frequencies in customer portal
- Allow customers to change subscription delivery frequency
- Build frequency selector UI components
- Validate frequency options before updating subscription
- Sync available billing options with external systems
- Show frequency options during subscription checkout
Integration Example:
- Get customer's current subscription selling plan ID
- Call this endpoint with that selling plan ID
- Display returned frequency options to customer
- Customer selects new frequency
- Update subscription with selected frequency
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contract-details/billing-interval
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://membership-admin.appstle.com/api/external/v2/subscription-contract-details/billing-interval?api_key=string&sellingPlanIds=123456%2C123457%2C123458' \
-H 'X-API-Key: string'{ "frequencyCount": 0, "frequencyInterval": "DAY", "billingFrequencyCount": 0, "billingFrequencyInterval": "DAY", "frequencyName": "string", "discountOffer": 0.1, "discountOffer2": 0.1, "afterCycle1": 0, "afterCycle2": 0, "discountType": "PERCENTAGE", "discountType2": "PERCENTAGE", "discountEnabled": true, "discountEnabled2": true, "discountEnabledMasked": true, "discountEnabled2Masked": true, "id": "string", "frequencyType": "ON_PURCHASE_DAY", "specificDayValue": 0, "specificMonthValue": 0, "specificDayEnabled": true, "maxCycles": 0, "minCycles": 0, "cutOff": 0, "prepaidFlag": "string", "idNew": "string", "planType": "PAY_AS_YOU_GO", "deliveryPolicyPreAnchorBehavior": "ASAP", "freeTrialEnabled": true, "freeTrialCount": 0, "freeTrialInterval": "DAY", "frequencyDescription": "string", "keepOriginalNextBillingDateAfterTrial": true, "planSequence": 0, "groupName": "string", "groupId": 0, "memberOnly": true, "nonMemberOnly": true, "memberInclusiveTags": "string", "memberExclusiveTags": "string", "lifeTimeMembership": true, "rulesJson": "string" }
Request
Generates a secure, time-limited magic link that allows customers to access and manage their subscriptions. This passwordless authentication link directs customers to the subscription management portal.
Magic Link Features:
- Passwordless Access: No login credentials required, link serves as authentication
- Time-Limited: Link expires after configured duration (typically 24-72 hours)
- Single Customer: Link is bound to specific customer ID, cannot be reused for others
- Secure Token: Uses cryptographically secure JWT tokens for authentication
- Customer Portal: Directs to full-featured self-service subscription portal
Returned Information:
- Magic Link URL: Full URL to customer portal with embedded authentication token
- Token: JWT token value (can be used separately if needed)
- Expiration Time: When the magic link will expire (ISO 8601 format)
- Customer ID: Shopify customer ID the link is generated for
- Shop Domain: Store domain where subscriptions are hosted
Customer Portal Capabilities (via Magic Link):
- View all active and paused subscription contracts
- Update shipping address for upcoming deliveries
- Change payment method for future billing
- Pause or resume subscription deliveries
- Skip upcoming delivery orders
- Modify delivery frequency (e.g., monthly to bi-monthly)
- Add or remove products from subscription
- Swap product variants (size, flavor, color)
- Cancel subscription with reason feedback
- View order history and upcoming deliveries
- Apply discount codes to subscription
Common Use Cases:
- Send magic link via email for customer self-service
- Include link in transactional emails (order confirmation, shipping notices)
- Customer support: provide link to customers over phone/chat
- Embed link in customer account page or dashboard
- Automated email campaigns for subscription management reminders
- Post-purchase flows to encourage subscription modifications
- Win-back campaigns: send magic link to cancelled/paused customers
Security Notes:
- Links are single-use per session (new token generated each time)
- Tokens include shop and customer validation to prevent tampering
- Expired links automatically redirect to token request page
- Links should be sent via secure channels (HTTPS, encrypted email)
Integration Best Practices:
- Always send magic links via email or SMS (don't display on public pages)
- Set appropriate expiration time based on use case
- Include clear call-to-action in emails ("Manage Your Subscription")
- Handle expired tokens gracefully with re-send functionality
- Track magic link generation for security audit logs
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/manage-subscription-link/{customerId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://membership-admin.appstle.com/api/external/v2/manage-subscription-link/6789012345?api_key=string' \
-H 'X-API-Key: string'{ "manageSubscriptionLink": "string", "tokenExpirationTime": "2019-08-24T14:15:22Z" }
Request
Generates an authentication token for customer portal access using either customer ID or email address. This token can be used to create magic links or authenticate API requests on behalf of a customer.
Key Features:
- Flexible Lookup: Find customer by Shopify customer ID OR email address
- JWT Token: Returns cryptographically secure JSON Web Token
- Portal Access: Token grants access to customer subscription management portal
- API Authentication: Can be used in subsequent API calls for customer-specific operations
- Time-Limited: Token expires after configured duration (default: 24-72 hours)
Request Parameters: Provide either customerId OR email (not both):
- customerId: Shopify customer ID (numeric string, e.g., "6789012345")
- email: Customer's email address as registered in Shopify
Response Contains:
- customerId: Shopify customer ID associated with the token
- token: JWT authentication token for portal access
- shop: Store domain the customer belongs to
- expiresAt: Token expiration timestamp (ISO 8601)
Common Use Cases:
- Generate token to construct customer portal magic links
- Authenticate customer in headless commerce implementations
- Validate customer identity before allowing subscription changes
- Create custom portal integrations with embedded authentication
- Server-side customer lookup when only email is available
- Build custom subscription management UIs with API authentication
- Integrate with external CRM systems requiring customer tokens
Token Usage: Once generated, the token can be:
- Embedded in magic link URLs:
https://portal.example.com?token={token} - Used as Bearer token in Authorization headers for API calls
- Stored temporarily for customer session management
- Passed to frontend applications for customer-specific operations
Security Best Practices:
- Never expose tokens in client-side logs or browser storage
- Transmit tokens only over HTTPS
- Implement token rotation for long-lived sessions
- Validate token expiration before use
- Revoke tokens when customer logs out or changes credentials
Error Handling:
- If neither customerId nor email is provided, returns 400 Bad Request
- If both customerId and email are provided, customerId takes precedence
- If customer not found, returns 404 Not Found
- Invalid email format returns 400 Bad Request
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/customer-portal-token
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://membership-admin.appstle.com/api/external/v2/customer-portal-token?api_key=string&customerId=6789012345&email=customer%40example.com' \
-H 'X-API-Key: string'{ "customerId": 0, "token": "string" }