APIs for managing Shopify delivery profiles, shipping rates, zones, and free shipping configuration for subscription memberships
- Get detailed customer subscription information
External (0.0.1)
Request
Changes the status of a subscription contract. This allows pausing, resuming, or activating subscriptions to control billing and delivery.
Key Features:
- Pause Subscriptions: Temporarily stop billing and deliveries
- Resume Subscriptions: Reactivate paused subscriptions
- Activate Subscriptions: Start inactive subscriptions
- Activity Logging: All status changes are logged for audit trail
- Customer Restrictions: Includes minimum cycle checks when called from customer portal
Status Values:
- ACTIVE: Subscription is active and billing/delivering normally
- PAUSED: Subscription is temporarily paused (no billing, no deliveries)
- CANCELLED: Subscription is cancelled (use DELETE endpoint instead)
Pause vs. Cancel:
- Pause: Temporary hold, customer can resume anytime
- Cancel: Permanent termination, requires creating new subscription to restart
Common Use Cases:
- Vacation Hold: Customer going on vacation, pause deliveries temporarily
- Financial Pause: Customer needs temporary break from payments
- Product Surplus: Customer has too much product, pause until they use it
- Seasonal Pause: Pause subscriptions during off-season (e.g., lawn care in winter)
- Resume After Pause: Customer ready to restart after temporary hold
- Reactivate Failed: Reactivate subscription after payment method updated
Pause Behavior:
- Billing Paused: No charges while paused
- Deliveries Paused: No orders created while paused
- Next Billing Date: Preserved or recalculated on resume (merchant setting)
- Unlimited Duration: Pauses can be indefinite unless merchant sets limits
Resume Behavior:
- Immediate Reactivation: Subscription becomes active immediately
- Next Billing Date: Calculated based on pause duration settings
- Deliveries Resume: Next delivery scheduled according to interval
Customer Portal Restrictions: When called from customer portal (vs. merchant API):
- Minimum Cycles: Cannot pause/cancel until minimum billing cycles met
- Freeze Period: Updates may be frozen until minimum requirements satisfied
- Retention Rules: Special retention discounts may be offered on cancellation
Important Notes:
- Customer Communication: Consider sending email notifications on status changes
- Billing Cycles Not Lost: Paused cycles don't count toward minimums
- No Pro-rata: No refunds or credits when pausing mid-cycle
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-status
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-status?contractId=12345&status=PAUSED&api_key=string' \
-H 'X-API-Key: string'Request
Changes the delivery shipping address for a subscription contract. This allows customers to update where their subscription orders are delivered.
Key Features:
- Full Address Update: Change complete shipping address in one call
- Address Validation: System validates address format and country codes
- Immediate Effect: New address applies to the next delivery
- Activity Logging: All address changes are logged for audit trail
- International Support: Supports addresses in all countries
Required Address Fields:
- firstName: Recipient's first name
- lastName: Recipient's last name
- address1: Street address line 1
- city: City name
- countryCode: ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
- zip: Postal/ZIP code
Optional Address Fields:
- address2: Apartment, suite, unit number
- company: Company name (for business addresses)
- phone: Contact phone number
- provinceCode: State/province code (e.g., CA, NY, ON)
Common Use Cases:
- Customer Moved: Update address after relocation
- Temporary Address: Ship to vacation home or temporary location
- Gift Recipient: Change recipient for gift subscriptions
- Correct Typos: Fix address errors from initial signup
- Business to Home: Switch between business and residential addresses
- Seasonal Address: Update for snowbird/seasonal residents
Country and Province Codes:
- countryCode: Use ISO 3166-1 alpha-2 codes
- Examples: US (United States), CA (Canada), GB (United Kingdom), AU (Australia)
- provinceCode: Use ISO 3166-2 subdivision codes
- US Examples: CA (California), NY (New York), TX (Texas)
- Canada Examples: ON (Ontario), BC (British Columbia), QC (Quebec)
Address Validation:
- Format Validation: System checks required fields are present
- Country Validation: Verifies country code is valid
- Province Validation: Checks province code matches country
- Postal Code: Validates postal code format for country
Important Notes:
- Shipping Rate Recalculation: New address may have different shipping costs
- Delivery Method: System automatically selects appropriate delivery method
- Next Order Only: Only affects future orders, not orders already placed
- Address Book: Consider updating customer's default address separately
- PO Boxes: Some delivery methods may not support PO Box addresses
Shipping Cost Impact:
- Changing address may change shipping costs for future deliveries
- International addresses typically have higher shipping costs
- Remote/rural areas may have additional delivery fees
- Consider notifying customer of cost changes
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
New shipping address details
- https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-shipping-address
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-shipping-address?contractId=12345&api_key=string' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"firstName": "John",
"lastName": "Doe",
"address1": "123 Main Street",
"address2": "Apt 4B",
"city": "San Francisco",
"provinceCode": "CA",
"countryCode": "US",
"zip": "94102",
"phone": "+1-415-555-0123",
"company": "Acme Corp"
}'{ "get__typename": "string", "id": "string", "createdAt": {}, "updatedAt": {}, "nextBillingDate": {}, "status": "ACTIVE", "deliveryPrice": { "get__typename": "string", "amount": {}, "currencyCode": "USD" }, "lastPaymentStatus": "SUCCEEDED", "billingPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ], "maxCycles": 0, "minCycles": 0 }, "deliveryPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ] }, "lines": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "customerPaymentMethod": { "get__typename": "string", "id": "string", "instrument": { … }, "revokedAt": {}, "revokedReason": "AUTHORIZE_NET_GATEWAY_NOT_ENABLED" }, "deliveryMethod": { "get__typename": "string", "id": "string", "methodType": "SHIPPING", "serviceCode": "string", "minDeliveryDateTime": {}, "maxDeliveryDateTime": {}, "additionalInformation": { … }, "brandedPromise": { … } }, "originOrder": { "get__typename": "string", "id": "string", "name": "string", "fulfillmentOrders": { … } }, "customer": { "get__typename": "string", "id": "string", "email": "string", "displayName": "string", "firstName": "string", "lastName": "string", "phone": "string" }, "discounts": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "note": "string", "customAttributes": [ { … } ], "billingAttempts": { "get__typename": "string", "nodes": [ … ] } }
Request
Changes the delivery/shipping frequency of a subscription contract. This allows customers to modify how often they receive their subscription orders.
Key Features:
- Flexible Delivery: Change delivery frequency (daily, weekly, monthly, yearly)
- Custom Intervals: Set custom interval counts (e.g., every 2 weeks, every 3 months)
- Independent from Billing: Delivery interval can differ from billing interval
- Immediate Effect: Changes apply to the next delivery cycle
- Activity Logging: All changes are logged for audit trail
Delivery Interval Options:
- DAY: Daily delivery (intervalCount: how many days)
- WEEK: Weekly delivery (intervalCount: how many weeks)
- MONTH: Monthly delivery (intervalCount: how many months)
- YEAR: Yearly delivery (intervalCount: how many years)
Common Examples:
intervalCount=1, interval=MONTH: Deliver monthlyintervalCount=2, interval=WEEK: Deliver every 2 weeksintervalCount=3, interval=MONTH: Deliver quarterlyintervalCount=1, interval=WEEK: Deliver weeklyintervalCount=6, interval=MONTH: Deliver twice a year
Billing vs. Delivery Intervals: These can be different! For example:
- Bill monthly, deliver weekly: Customer pays monthly but receives weekly shipments
- Bill quarterly, deliver monthly: Customer pays every 3 months but receives monthly shipments
- Bill annually, deliver monthly: Customer pays yearly upfront for monthly deliveries
Common Use Cases:
- Customer wants deliveries less frequently (save on shipping)
- Customer wants deliveries more frequently (use products faster)
- Adjust delivery to match consumption rate
- Seasonal frequency changes (more in summer, less in winter)
- Align deliveries with schedule (delivery when home from vacation)
Important Notes:
- Billing Date Unchanged: Only affects delivery schedule, not billing schedule
- Next Delivery Date: System recalculates next delivery date based on new interval
- Order Fulfillment: Each delivery creates a new order at the specified interval
- Prepaid Memberships: Particularly useful for prepaid plans with multiple deliveries
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-interval
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-interval?contractId=12345&api_key=string&deliveryIntervalCount=1&deliveryInterval=MONTH' \
-H 'X-API-Key: string'{ "get__typename": "string", "id": "string", "createdAt": {}, "updatedAt": {}, "nextBillingDate": {}, "status": "ACTIVE", "deliveryPrice": { "get__typename": "string", "amount": {}, "currencyCode": "USD" }, "lastPaymentStatus": "SUCCEEDED", "billingPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ], "maxCycles": 0, "minCycles": 0 }, "deliveryPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ] }, "lines": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "customerPaymentMethod": { "get__typename": "string", "id": "string", "instrument": { … }, "revokedAt": {}, "revokedReason": "AUTHORIZE_NET_GATEWAY_NOT_ENABLED" }, "deliveryMethod": { "get__typename": "string", "id": "string", "methodType": "SHIPPING", "serviceCode": "string", "minDeliveryDateTime": {}, "maxDeliveryDateTime": {}, "additionalInformation": { … }, "brandedPromise": { … } }, "originOrder": { "get__typename": "string", "id": "string", "name": "string", "fulfillmentOrders": { … } }, "customer": { "get__typename": "string", "id": "string", "email": "string", "displayName": "string", "firstName": "string", "lastName": "string", "phone": "string" }, "discounts": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "note": "string", "customAttributes": [ { … } ], "billingAttempts": { "get__typename": "string", "nodes": [ … ] } }
Request
Changes the billing frequency of a subscription contract. This allows customers to modify how often they are charged for their membership.
Key Features:
- Flexible Billing: Change billing frequency (daily, weekly, monthly, yearly)
- Custom Intervals: Set custom interval counts (e.g., every 2 weeks, every 3 months)
- Immediate Effect: Changes apply to the next billing cycle
- Independent from Delivery: Billing interval can differ from delivery interval
- Activity Logging: All changes are logged for audit trail
Billing Interval Options:
- DAY: Daily billing (intervalCount: how many days)
- WEEK: Weekly billing (intervalCount: how many weeks)
- MONTH: Monthly billing (intervalCount: how many months)
- YEAR: Yearly billing (intervalCount: how many years)
Common Examples:
intervalCount=1, interval=MONTH: Bill monthlyintervalCount=2, interval=WEEK: Bill every 2 weeksintervalCount=3, interval=MONTH: Bill quarterlyintervalCount=6, interval=MONTH: Bill semi-annuallyintervalCount=1, interval=YEAR: Bill annually
Common Use Cases:
- Customer wants to change from monthly to quarterly billing
- Switch from annual to monthly payments
- Adjust billing frequency to match cash flow
- Promotional frequency changes
- Align billing with payday schedules
Important Notes:
- Next Billing Date: System recalculates the next billing date based on new interval
- Pro-rata Billing: No pro-rata adjustment; new interval starts from next billing date
- Minimum Cycles: Respects minimum billing cycle requirements if configured
- Customer Portal Protection: Includes freeze checks if called from customer portal
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-billing-interval
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-billing-interval?contractId=12345&api_key=string&intervalCount=1&interval=MONTH' \
-H 'X-API-Key: string'{ "get__typename": "string", "id": "string", "createdAt": {}, "updatedAt": {}, "nextBillingDate": {}, "status": "ACTIVE", "deliveryPrice": { "get__typename": "string", "amount": {}, "currencyCode": "USD" }, "lastPaymentStatus": "SUCCEEDED", "billingPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ], "maxCycles": 0, "minCycles": 0 }, "deliveryPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ] }, "lines": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "customerPaymentMethod": { "get__typename": "string", "id": "string", "instrument": { … }, "revokedAt": {}, "revokedReason": "AUTHORIZE_NET_GATEWAY_NOT_ENABLED" }, "deliveryMethod": { "get__typename": "string", "id": "string", "methodType": "SHIPPING", "serviceCode": "string", "minDeliveryDateTime": {}, "maxDeliveryDateTime": {}, "additionalInformation": { … }, "brandedPromise": { … } }, "originOrder": { "get__typename": "string", "id": "string", "name": "string", "fulfillmentOrders": { … } }, "customer": { "get__typename": "string", "id": "string", "email": "string", "displayName": "string", "firstName": "string", "lastName": "string", "phone": "string" }, "discounts": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "note": "string", "customAttributes": [ { … } ], "billingAttempts": { "get__typename": "string", "nodes": [ … ] } }
Request
Updates the next billing date for a subscription contract. This reschedules when the next payment will be charged for the membership.
Key Features:
- Flexible Rescheduling: Move billing date forward or backward
- Immediate Effect: Changes take effect immediately in the billing schedule
- Automatic Adjustments: Future billing dates recalculate based on frequency
- Customer Portal Compatible: Can be triggered from customer self-service portal
- Activity Logging: All changes are tracked in activity logs
Billing Date Update Rules:
- New date must be in the future (past dates are rejected)
- Cannot update if contract is paused or cancelled
- Cannot update if minimum billing cycles enforcement is active
- Date format must be ISO 8601 with timezone (e.g., 2024-12-25T10:00:00Z)
- Subsequent billing dates auto-calculate based on delivery frequency
Common Use Cases:
- Customer requests to postpone next delivery/billing
- Align billing date with customer payday or preference
- Skip a billing cycle due to vacation or temporary hold
- Synchronize multiple subscriptions to bill on same day
- Resolve payment timing conflicts or scheduling issues
- Adjust for seasonal demand or customer availability
Important Notes:
- Changing billing date does NOT change the billing cycle frequency
- If minimum cycles are configured, this may be restricted
- Activity logs capture old date, new date, and change source
- Customer receives updated billing schedule notification
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-billing-date
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-billing-date?contractId=12345&api_key=string&nextBillingDate=2024-12-25T10%3A00%3A00Z' \
-H 'X-API-Key: string'{ "get__typename": "string", "id": "string", "createdAt": {}, "updatedAt": {}, "nextBillingDate": {}, "status": "ACTIVE", "deliveryPrice": { "get__typename": "string", "amount": {}, "currencyCode": "USD" }, "lastPaymentStatus": "SUCCEEDED", "billingPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ], "maxCycles": 0, "minCycles": 0 }, "deliveryPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ] }, "lines": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "customerPaymentMethod": { "get__typename": "string", "id": "string", "instrument": { … }, "revokedAt": {}, "revokedReason": "AUTHORIZE_NET_GATEWAY_NOT_ENABLED" }, "deliveryMethod": { "get__typename": "string", "id": "string", "methodType": "SHIPPING", "serviceCode": "string", "minDeliveryDateTime": {}, "maxDeliveryDateTime": {}, "additionalInformation": { … }, "brandedPromise": { … } }, "originOrder": { "get__typename": "string", "id": "string", "name": "string", "fulfillmentOrders": { … } }, "customer": { "get__typename": "string", "id": "string", "email": "string", "displayName": "string", "firstName": "string", "lastName": "string", "phone": "string" }, "discounts": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "note": "string", "customAttributes": [ { … } ], "billingAttempts": { "get__typename": "string", "nodes": [ … ] } }
Request
Replaces an existing product variant with a new variant in a subscription contract. This allows customers to swap products in their membership while maintaining their subscription.
Key Features:
- Product Swapping: Replace any line item's variant with a different variant
- Quantity Preservation: Maintains the same quantity after variant swap
- Price Updates: New variant pricing is applied automatically
- Flexible Identification: Identify old variant by lineId OR variantId
- Activity Logging: All variant changes are logged for audit trail
Identification Methods: You can identify the old variant using either:
- oldLineId: The Shopify line item ID from the subscription contract
- oldVariantId: The Shopify product variant ID At least one of these must be provided.
Common Use Cases:
- Customer wants to change product flavor/color/size in their membership
- Swap discontinued products with new alternatives
- Change product preferences mid-subscription
- Update seasonal product selections
- Replace out-of-stock variants with alternatives
Important Notes:
- Immediate Effect: Variant change applies to the next billing cycle
- Validation: System validates new variant exists and is available
- Same Product: Old and new variants can be from different products
- Price Changes: Customer is charged the new variant's price
Variant ID Format:
- Accepts both numeric IDs and GraphQL IDs (gid://shopify/ProductVariant/...)
- System automatically converts to correct format
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contract-update-variant
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://membership-admin.appstle.com/api/external/v2/subscription-contract-update-variant?contractId=12345&api_key=string&oldLineId=gid%3A%2F%2Fshopify%2FSubscriptionLine%2F123&oldVariantId=40123456789&newVariantId=40987654321&skipBilling=false' \
-H 'X-API-Key: string'{ "get__typename": "string", "id": "string", "createdAt": {}, "updatedAt": {}, "nextBillingDate": {}, "status": "ACTIVE", "deliveryPrice": { "get__typename": "string", "amount": {}, "currencyCode": "USD" }, "lastPaymentStatus": "SUCCEEDED", "billingPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ], "maxCycles": 0, "minCycles": 0 }, "deliveryPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ] }, "lines": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "customerPaymentMethod": { "get__typename": "string", "id": "string", "instrument": { … }, "revokedAt": {}, "revokedReason": "AUTHORIZE_NET_GATEWAY_NOT_ENABLED" }, "deliveryMethod": { "get__typename": "string", "id": "string", "methodType": "SHIPPING", "serviceCode": "string", "minDeliveryDateTime": {}, "maxDeliveryDateTime": {}, "additionalInformation": { … }, "brandedPromise": { … } }, "originOrder": { "get__typename": "string", "id": "string", "name": "string", "fulfillmentOrders": { … } }, "customer": { "get__typename": "string", "id": "string", "email": "string", "displayName": "string", "firstName": "string", "lastName": "string", "phone": "string" }, "discounts": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "note": "string", "customAttributes": [ { … } ], "billingAttempts": { "get__typename": "string", "nodes": [ … ] } }
Request
Adds a new product (line item) to an existing subscription contract. This allows customers or merchants to add products to their recurring subscription orders.
Key Features:
- Add Products: Include new products in future subscription deliveries
- Quantity Control: Specify how many units of the product to add
- Price Override: Set custom pricing for the added product
- Immediate Effect: Changes apply to next billing cycle
- Activity Logging: All additions are tracked in activity logs
Required Parameters:
- contractId: Subscription contract ID to modify
- variantId: Shopify product variant ID (with gid:// prefix or numeric)
- quantity: Number of units to add (must be positive integer)
- price: Price per unit in shop's base currency
Product Variant ID Format: Accepts two formats:
- Shopify GID:
gid://shopify/ProductVariant/12345678901 - Numeric ID:
12345678901
Price Behavior:
- Price is per unit, not total
- Must be in shop's base currency (USD, EUR, etc.)
- Can override product's default price
- Does not include taxes or shipping
- Total line item cost = price × quantity
Line Item Addition Rules:
- Product variant must exist in Shopify catalog
- Product must be active and available
- Variant must have sufficient inventory (if tracked)
- Contract must be ACTIVE or PAUSED (not CANCELLED)
- Cannot add duplicate variants (use update quantity instead)
Common Use Cases:
- Customer adds complementary product to existing subscription
- Upsell additional products through customer portal
- Merchant adds bonus items to customer subscriptions
- Build custom "add-on" product selection interfaces
- Cross-sell related products to existing subscribers
- Create bundle upgrades (add multiple products at once)
Post-Addition Effects:
- Next billing amount increases by (price × quantity)
- Product appears in all future subscription deliveries
- Customer receives confirmation of subscription update
- Activity log records the addition with source (portal/merchant)
- Contract's next billing date remains unchanged
Integration Example:
PUT /api/external/v2/subscription-contract-add-line-item?
contractId=123456&
variantId=gid://shopify/ProductVariant/987654321&
quantity=2&
price=19.99This adds 2 units of variant 987654321 at $19.99 each ($39.98 total) to contract 123456.
Important Notes:
- Changes apply to NEXT billing cycle, not current/past orders
- If product is out of stock, order may be delayed or skipped
- Price changes don't affect historical orders
- Consider inventory availability before adding products
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contract-add-line-item
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://membership-admin.appstle.com/api/external/v2/subscription-contract-add-line-item?contractId=12345&api_key=string&quantity=2&variantId=gid%3A%2F%2Fshopify%2FProductVariant%2F987654321&price=19.99' \
-H 'X-API-Key: string'{ "get__typename": "string", "id": "string", "createdAt": {}, "updatedAt": {}, "nextBillingDate": {}, "status": "ACTIVE", "deliveryPrice": { "get__typename": "string", "amount": {}, "currencyCode": "USD" }, "lastPaymentStatus": "SUCCEEDED", "billingPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ], "maxCycles": 0, "minCycles": 0 }, "deliveryPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ] }, "lines": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "customerPaymentMethod": { "get__typename": "string", "id": "string", "instrument": { … }, "revokedAt": {}, "revokedReason": "AUTHORIZE_NET_GATEWAY_NOT_ENABLED" }, "deliveryMethod": { "get__typename": "string", "id": "string", "methodType": "SHIPPING", "serviceCode": "string", "minDeliveryDateTime": {}, "maxDeliveryDateTime": {}, "additionalInformation": { … }, "brandedPromise": { … } }, "originOrder": { "get__typename": "string", "id": "string", "name": "string", "fulfillmentOrders": { … } }, "customer": { "get__typename": "string", "id": "string", "email": "string", "displayName": "string", "firstName": "string", "lastName": "string", "phone": "string" }, "discounts": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "note": "string", "customAttributes": [ { … } ], "billingAttempts": { "get__typename": "string", "nodes": [ … ] } }
Request
Retrieves comprehensive details for all subscription contracts associated with a specific customer. This endpoint returns complete subscription contract data including products, pricing, billing schedule, and status.
Key Information Returned:
- Contract Details: Contract ID, status (active, paused, cancelled), creation date
- Products: Line items with product names, variants, quantities, and prices
- Billing Information: Next billing date, billing frequency, payment method
- Delivery Details: Shipping address, delivery method, delivery frequency
- Pricing: Subtotal, discounts applied, total amount per cycle
- Membership Plan: Associated subscription plan name and details
- Order History: Past billing attempts and fulfillment records
Subscription Contract Details Include:
- Contract ID: Unique identifier for the subscription
- Customer ID: Shopify customer ID associated with the contract
- Status: ACTIVE, PAUSED, CANCELLED, EXPIRED
- Billing Cycle: Number of completed billing cycles
- Next Billing Date: When the next payment will be charged
- Delivery Date: When the next order will be shipped
- Products: All line items in the subscription with pricing
- Discount Codes: Applied discount codes and their values
- Custom Attributes: Any custom metadata or tags
Common Use Cases:
- Display full subscription list in customer account dashboard
- Retrieve all contract details for customer support inquiries
- Build custom customer portal with subscription management
- Sync subscription data to external CRM or analytics systems
- Generate customer subscription reports and analytics
- Validate customer's active subscriptions before offering upgrades
- Show subscription history and upcoming deliveries
Response Format: Returns a List of SubscriptionContractDetailsDTO objects, one per active/paused contract. If customer has no subscriptions, returns an empty list.
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{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/subscription-customers-detail/valid/6789012345?api_key=string' \
-H 'X-API-Key: string'Customer subscription details successfully retrieved (may be empty list if no subscriptions)
{ "id": 0, "shop": "string", "graphSubscriptionContractId": "string", "subscriptionContractId": 0, "billingPolicyInterval": "string", "billingPolicyIntervalCount": 0, "currencyCode": "string", "customerId": 0, "graphCustomerId": "string", "deliveryPolicyInterval": "string", "deliveryPolicyIntervalCount": 0, "status": "string", "graphOrderId": "string", "orderId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "nextBillingDate": "2019-08-24T14:15:22Z", "orderAmount": 0.1, "orderName": "string", "customerName": "string", "customerEmail": "string", "subscriptionCreatedEmailSent": true, "endsAt": "2019-08-24T14:15:22Z", "startsAt": "2019-08-24T14:15:22Z", "subscriptionCreatedEmailSentStatus": "SENT", "minCycles": 0, "maxCycles": 0, "customerFirstName": "string", "customerLastName": "string", "autoCharge": true, "importedId": "string", "stopUpComingOrderEmail": true, "pausedFromActive": true, "subscriptionCreatedSmsSentStatus": "SENT", "phone": "string", "activatedOn": "2019-08-24T14:15:22Z", "pausedOn": "2019-08-24T14:15:22Z", "cancelledOn": "2019-08-24T14:15:22Z", "contractDetailsJSON": "string", "cancellationFeedback": "string", "orderNote": "string", "orderNoteAttributes": "string", "allowDeliveryPriceOverride": true, "orderAmountUSD": 0.1, "billingDateAfterTrial": "2019-08-24T14:15:22Z", "trialEndDate": "2019-08-24T14:15:22Z", "pausedBySecurityChallenge": true, "dunning": true, "contractAmount": 0.1, "contractAmountUSD": 0.1, "upcomingSwapRule": "string", "emailBouncedOrFailed": true }
Request
Automatically generates and emails a secure magic link to the customer for accessing their subscription management portal. This is a convenience endpoint that combines token generation and email delivery in a single API call.
Key Features:
- Automated Delivery: Generates magic link and sends email in one operation
- Customer Lookup: Finds customer by email address automatically
- Branded Emails: Uses shop's configured email templates and branding
- Subscription Validation: Only sends if customer has active subscriptions
- Time-Limited Links: Email contains token that expires after configured duration
Email Contents: The sent email typically includes:
- Magic Link Button: One-click access to customer portal
- Link URL: Full URL with embedded authentication token
- Expiration Notice: When the link will expire (e.g., "Valid for 24 hours")
- Shop Branding: Store logo, colors, and custom messaging
- Help Text: Instructions on how to use the portal
Workflow:
- API receives customer email address
- System looks up customer in Shopify by email
- Validates customer has active subscription contracts
- Generates secure JWT authentication token
- Constructs magic link URL with token
- Sends branded email with magic link to customer
- Returns success confirmation to API caller
Email Template Customization: Email appearance and content can be customized via:
- Shop's email notification settings in admin
- Custom email templates for magic links
- Localization settings for customer's language
- Custom branding (logo, colors, footer)
Common Use Cases:
- Customer support: send portal access link to customers over phone/chat
- Automated workflows: trigger magic link emails based on events
- Forgot password alternative: passwordless portal access
- Post-purchase flows: send portal access after first order
- Reactivation campaigns: re-engage paused/cancelled customers
- Customer onboarding: welcome emails with portal access
- Subscription reminders: include portal link in reminder emails
Integration Example:
GET /api/external/v2/subscription-contracts-email-magic-link?
email=customer@example.com&
api_key=your_api_keyThis sends a magic link email to customer@example.com for portal access.
Error Handling:
- If customer not found, returns 400 Bad Request
- If customer has no active subscriptions, returns 400
- If email service fails, returns 500 Internal Server Error
- Invalid email format returns 400 Bad Request
Email Delivery Notes:
- Emails are sent asynchronously (may take 1-5 minutes to deliver)
- Check spam folders if customer doesn't receive email
- Respect customer's email preferences and unsubscribe status
- Rate limits may apply to prevent abuse
Security Considerations:
- Only send to verified customer email addresses
- Email contains passwordless authentication link
- Links expire after configured duration (default: 24-72 hours)
- Sending to wrong email grants that person subscription access
- Consider email verification before using this endpoint
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contracts-email-magic-link
- 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-contracts-email-magic-link?api_key=string&email=customer%40example.com' \
-H 'X-API-Key: string'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" }