Skip to content

External (0.0.1)

Languages
Servers
https://membership-admin.appstle.com

Shipping & Delivery Profiles

APIs for managing Shopify delivery profiles, shipping rates, zones, and free shipping configuration for subscription memberships

Operations

Customer Discount History

APIs for retrieving historical discount code usage and redemption information for membership contracts

Operations

Cancellation Flow Configuration

APIs for managing membership cancellation flow settings including retention offers, survey questions, and cancel confirmation screens

Operations

Billing & Orders

APIs for managing membership billing attempts, recurring orders, payment retries, order history, and order skipping

Operations

One-Time Add-Ons

APIs for managing one-time product additions to upcoming subscription orders, including adding, retrieving, and removing one-off items

Operations

Membership Plans

APIs for managing membership/subscription plan groups, including creating plans, configuring discounts, billing intervals, and assigning products to plans

Operations

Product Bundles

APIs for managing subscription product bundles, bundle configurations, item grouping, and bundle-specific discount codes

Operations

Custom CSS Styling

APIs for retrieving custom CSS styles applied to subscription widgets and customer portal for theme customization

Operations

Customer Portal Configuration

APIs for managing customer portal settings including UI customization, text labels, feature toggles, and branding options for the member self-service portal

Operations

Membership Contracts

APIs for managing membership/subscription contracts including creation, updates, status changes, line items, discounts, and billing operations

Operations

Get billing interval options for selling plans

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:

  1. Get customer's current subscription selling plan ID
  2. Call this endpoint with that selling plan ID
  3. Display returned frequency options to customer
  4. Customer selects new frequency
  5. Update subscription with selected frequency

Authentication: Requires API key authentication via X-API-Key header or api_key parameter

Query
api_keystring

API Key (Deprecated - Use Header X-API-Key instead)

sellingPlanIdsstringrequired

Comma-separated list of Shopify selling plan IDs

Example: sellingPlanIds=123456,123457,123458
Headers
X-API-Keystring
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'

Responses

Billing interval options successfully retrieved

Bodyapplication/json
frequencyCountinteger(int32)
frequencyIntervalstring
Enum"DAY""WEEK""MONTH""YEAR"
billingFrequencyCountinteger(int32)
billingFrequencyIntervalstring
Enum"DAY""WEEK""MONTH""YEAR"
frequencyNamestring
discountOffernumber(double)
discountOffer2number(double)
afterCycle1integer(int32)
afterCycle2integer(int32)
discountTypestring
Enum"PERCENTAGE""FIXED""PRICE"
discountType2string
Enum"PERCENTAGE""FIXED""PRICE"
discountEnabledboolean
discountEnabled2boolean
discountEnabledMaskedboolean
discountEnabled2Maskedboolean
idstring
frequencyTypestring
Enum"ON_PURCHASE_DAY""ON_SPECIFIC_DAY"
specificDayValueinteger(int32)
specificMonthValueinteger(int32)
specificDayEnabledboolean
maxCyclesinteger(int32)
minCyclesinteger(int32)
cutOffinteger(int32)
prepaidFlagstring
idNewstring
planTypestring
Enum"PAY_AS_YOU_GO""PREPAID""ADVANCED_PREPAID"
deliveryPolicyPreAnchorBehaviorstring
Enum"ASAP""NEXT""$UNKNOWN"
freeTrialEnabledboolean
freeTrialCountinteger(int32)
freeTrialIntervalstring
Enum"DAY""WEEK""MONTH""YEAR"
frequencyDescriptionstring
keepOriginalNextBillingDateAfterTrialboolean
planSequenceinteger(int32)
groupNamestring
groupIdinteger(int64)
memberOnlyboolean
nonMemberOnlyboolean
memberInclusiveTagsstring
memberExclusiveTagsstring
lifeTimeMembershipboolean
rulesJsonstring
Response
application/json
{ "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" }

Generate customer portal authentication token

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:

  1. Embedded in magic link URLs: https://portal.example.com?token={token}
  2. Used as Bearer token in Authorization headers for API calls
  3. Stored temporarily for customer session management
  4. 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

Query
api_keystring

API Key (Deprecated - Use Header X-API-Key instead)

customerIdstring

Shopify customer ID (provide either customerId OR email)

Example: customerId=6789012345
emailstring

Customer email address (provide either customerId OR email)

Example: email=customer@example.com
Headers
X-API-Keystring
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'

Responses

Customer portal token generated successfully, returns customer ID and authentication token

Bodyapplication/json
customerIdinteger(int64)
tokenstring
Response
application/json
{ "customerId": 0, "token": "string" }

Bundle Settings

APIs for managing subscription bundle configuration settings including bundle behavior, pricing rules, and display options

Operations

Customer Payment Methods

APIs for managing customer payment methods, payment tokens, and payment method retrieval for subscriptions

Operations

Product Swap Rules

APIs for retrieving product swap/substitution options allowing members to exchange subscription items based on configured swap rules and variant groups

Operations

Subscription Contract Management

Operations

Subscription Billing

Operations

Billing Attempts

Operations