Skip to content

External APIs (0.0.1)

Comprehensive API documentation for managing subscriptions, payments, and related operations. These APIs allow you to programmatically manage subscription lifecycles, handle payments, configure products, and integrate subscription functionality into your applications.

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

Subscription Management

Core APIs for managing the complete subscription lifecycle including creation, updates, pausing, resuming, and cancellation of subscriptions.

Operations

Subscription Payments

APIs for managing subscription payment methods, processing payments, handling payment retries, and updating billing information.

Operations

Subscription Contracts

APIs for managing subscription contracts including delivery schedules, pricing, order notes, billing cycles, and shipping addresses.

Operations

Subscription Products

APIs for managing products within subscriptions including adding, removing, updating quantities, and swapping products.

Operations

Billing & Payments

APIs for handling billing operations, payment processing, and financial transactions related to subscriptions.

Operations

Subscription Discounts

APIs for managing discounts and promotional codes applied to subscriptions.

Operations

Subscription One-Time Products

APIs for managing one-time add-on products that can be purchased alongside recurring subscription items.

Operations

Subscription Plans

APIs for managing subscription plans, pricing tiers, and plan configurations.

Operations

Build-a-Box & Bundles

APIs for managing customizable product boxes and bundles where customers can select multiple items.

Operations

Product Catalog

APIs for managing the product catalog including product information, variants, and inventory.

Operations

Operations & Settings

APIs for managing operational settings, configurations, and administrative functions.

Operations

Get cancellation management configuration

Request

Retrieves the cancellation management and retention settings for the authenticated shop. These settings control the subscription cancellation flow, retention strategies, and customer feedback collection when subscribers attempt to cancel their subscriptions.

What is Cancellation Management? Cancellation management is a retention system that helps merchants reduce subscription churn by understanding why customers cancel and offering alternatives before they leave. It includes cancellation flows, feedback collection, retention offers (discounts, pauses, frequency changes), and automated win-back strategies.

Configuration Components:

1. Cancellation Flow Settings:

  • Enable/disable self-service cancellation in customer portal
  • Require customer to contact support for cancellation
  • Multi-step cancellation confirmation process
  • Cancellation cooldown period (prevent accidental cancellations)
  • Minimum subscription duration before cancellation allowed
  • Immediate vs. end-of-billing-cycle cancellation

2. Cancellation Reasons & Feedback:

  • Predefined cancellation reasons list
  • Custom cancellation reason options
  • Required vs. optional feedback
  • Free-form text feedback field
  • Rating/satisfaction scale
  • Exit survey questions
  • Feedback sent to merchant email/dashboard

Common Cancellation Reasons:

  • Too expensive / Can't afford
  • Don't use product enough / Have too much inventory
  • Product quality issues
  • Switching to competitor
  • Delivery issues / Shipping problems
  • Forgot to cancel earlier
  • Temporary pause needed (moving, travel, etc.)
  • Product doesn't meet expectations
  • Customer service issues
  • Other (with text field)

3. Retention Offers (Save Flow):

  • Display retention offers before final cancellation
  • Offer discount (percentage or fixed amount)
  • Offer free product/gift with next order
  • Suggest subscription pause instead of cancel
  • Suggest frequency change (deliver less often)
  • Offer to skip next order
  • Offer to swap products
  • Personalized offers based on cancellation reason

Example Retention Logic:

Reason: "Too expensive"
  → Offer: 20% discount for next 3 months
  → Offer: Switch to smaller/cheaper variant

Reason: "Have too much inventory"
  → Offer: Pause for 1-3 months
  → Offer: Change from monthly to every 2 months
  → Offer: Skip next 2 deliveries

Reason: "Product quality issues"
  → Offer: Free replacement on next order
  → Offer: Try different product variant
  → Route to customer support

4. UI/UX Configuration:

  • Cancellation button placement and styling
  • Warning messages and modal dialogs
  • Progress indicator for multi-step flow
  • Retention offer presentation (modal, inline, etc.)
  • Confirmation messages
  • Post-cancellation survey

5. Automation & Notifications:

  • Send cancellation confirmation email
  • Notify merchant of cancellations
  • Trigger win-back email campaigns
  • Schedule feedback review
  • Alert for high cancellation rate
  • Integration with CRM/analytics tools

6. Metrics & Analytics:

  • Track cancellation rate
  • Categorize cancellation reasons
  • Measure retention offer acceptance rate
  • Calculate customer lifetime value at cancellation
  • Identify churn patterns and trends
  • A/B test different retention strategies

7. Advanced Features:

  • Conditional retention offers based on:
    • Customer lifetime value
    • Subscription duration
    • Product type
    • Cancellation history
    • Customer segment
  • Win-back campaigns for cancelled subscribers
  • Automatic re-engagement emails (30, 60, 90 days post-cancel)
  • Special offers to reactivate cancelled subscriptions

Cancellation Flow Examples:

Basic Flow (No Retention):

  1. Customer clicks "Cancel Subscription"
  2. Confirmation dialog: "Are you sure?"
  3. Optional: Select cancellation reason
  4. Subscription cancelled immediately or at period end
  5. Confirmation email sent

Advanced Retention Flow:

  1. Customer clicks "Cancel Subscription"
  2. "Before you go..." - Select cancellation reason
  3. Display personalized retention offer based on reason
  4. Customer chooses: Accept offer OR Continue to cancel
  5. If continue: Additional offers or final confirmation
  6. If still cancelling: Exit survey
  7. Cancellation processed
  8. Thank you message + feedback confirmation
  9. Follow-up email campaign

Use Cases:

  • Configure cancellation flow in customer portal
  • Customize retention offers and messaging
  • Analyze cancellation patterns and trends
  • Build custom cancellation interfaces
  • Integrate with customer support tools
  • Generate churn reports and analytics
  • A/B test different retention strategies
  • Automate win-back campaigns

Important Notes:

  • Always comply with consumer protection laws regarding cancellation
  • Make cancellation process clear and accessible (FTC guidelines)
  • Don't make cancellation unnecessarily difficult
  • Respect customer's decision to cancel
  • Use retention offers ethically (not dark patterns)
  • Store cancellation feedback for product improvement
  • GDPR/privacy compliance for feedback data

Best Practices:

  • Keep cancellation process simple (2-3 steps max)
  • Offer genuine value in retention offers
  • Personalize offers based on cancellation reason
  • Make pause/skip options prominent
  • Use cancellation feedback to improve product/service
  • Set up automated win-back campaigns
  • Monitor cancellation rate and take action on trends
  • Train customer support on retention strategies
  • Test different retention messaging and offers
  • Honor cancellations promptly and professionally

Legal & Compliance:

  • FTC regulations require easy cancellation (Click-to-Cancel rule)
  • California automatic renewal law compliance
  • European consumer protection directives
  • Clear disclosure of cancellation terms
  • Process cancellations within legal timeframes
  • Provide confirmation of cancellation

Authentication: Requires valid X-API-Key header

Path
idinteger(int64)required
Query
api_keystring

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

Headers
X-API-Keystring
curl -i -X GET \
  'https://subscription-admin.appstle.com/api/external/v2/cancellation-managements/{id}?api_key=string' \
  -H 'X-API-Key: string'

Responses

Cancellation management configuration successfully retrieved

Bodyapplication/json
idinteger(int64)
shopstringrequired
cancellationTypestring
Enum"CANCEL_IMMEDIATELY""CANCELLATION_INSTRUCTIONS""CUSTOMER_RETENTION_FLOW""CANCEL_AFTER_PAUSE"
cancellationInstructionsTextstring
cancellationReasonsJSONstring
pauseInstructionsTextstring
pauseDurationCycleinteger(int32)
enableDiscountEmailboolean
discountEmailAddressstring
pauseTypestring
Enum"PAUSE_IMMEDIATELY""PAUSE_INSTRUCTIONS""CUSTOMER_RETENTION_FLOW"
pauseReasonsJSONstring
dynamicallyPauseCycleOnCancellationboolean
Response
application/json
{ "id": 12345, "shop": "example-shop.myshopify.com", "enabled": true, "allowSelfServiceCancellation": true, "requireSupportContact": false, "minimumSubscriptionDays": 30, "cancellationTiming": "END_OF_BILLING_CYCLE", "requireCancellationReason": true, "allowCustomReason": true, "cancellationReasons": [ "Too expensive", "Have too much product", "Product quality issues", "Switching to competitor", "Delivery problems", "Don't need anymore", "Temporary situation (moving, travel, etc.)", "Other" ], "collectFeedback": true, "feedbackRequired": false, "showExitSurvey": true, "retentionOffersEnabled": true, "retentionStrategies": { "Too expensive": [], "Have too much product": [], "Product quality issues": [] }, "confirmationFlow": { "multiStep": true, "showAlternatives": true, "requireConfirmation": true, "cooldownPeriod": 24 }, "notifications": { "sendCustomerConfirmation": true, "sendMerchantNotification": true, "merchantEmail": "subscriptions@example.com", "enableWinBackCampaigns": true, "winBackSchedule": [] }, "analytics": { "trackCancellationRate": true, "trackReasonFrequency": true, "trackRetentionOfferAcceptance": true, "alertOnHighChurnRate": true, "churnRateThreshold": 15 }, "uiSettings": { "buttonText": "Cancel Subscription", "buttonColor": "#DC3545", "warningMessage": "We'll be sorry to see you go! Before you cancel, let us try to help.", "confirmationMessage": "Your subscription has been cancelled. You will receive a confirmation email shortly.", "thankYouMessage": "Thank you for being a subscriber. We hope to see you again!" }, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-02-20T14:45:00Z" }

Get/Search activity logs

Request

Retrieves activity logs for all subscription-related events and changes in the authenticated shop. Activity logs provide a comprehensive audit trail of all subscription activities, changes, and system events.

What are Activity Logs? Activity logs are detailed records of every action, event, and change that occurs within your subscription system. They capture who made the change, when it happened, what was changed, and the result of the operation. This provides full traceability and audit capabilities for compliance, debugging, and customer support.

Log Information Captured:

  • Entity Information:

    • Entity ID: The specific subscription, billing attempt, or resource affected
    • Entity Type: Type of resource (subscription, billing attempt, plan, settings, etc.)
    • Event Type: Specific action performed (see Event Types below)
    • Event Source: Origin of the event (customer portal, merchant portal, API, system, etc.)
  • Event Details:

    • Status: SUCCESS, FAILURE, or INFO
    • Timestamp: When the event occurred
    • Activity By: User or system that triggered the event
    • Client IP: IP address of the requester (if applicable)
    • Additional Info: Detailed JSON payload with before/after values and context

Entity Types:

  • SUBSCRIPTION_BILLING_ATTEMPT - Billing and payment attempt events
  • SUBSCRIPTION_CONTRACT_DETAILS - Subscription contract modifications
  • SUBSCRIPTION_GROUP_PLAN - Subscription plan changes
  • SHIPPING_PROFILE - Delivery profile and shipping updates
  • CANCELLATION_MANAGEMENT - Subscription cancellation events
  • DUNNING_MANAGEMENT - Payment retry and dunning activities
  • PRODUCT_SWAP - Product replacement events
  • FREQUENCY_SWAP - Billing/delivery frequency changes
  • EMAIL_TEMPLATE - Email template modifications
  • SHOP_INFO - Shop settings and configuration changes
  • SUBSCRIPTION_WIDGET_SETTINGS - Widget configuration updates
  • CUSTOMER_PORTAL_SETTINGS - Portal settings modifications
  • SUBSCRIPTION_BUNDLING - Bundle and bundling rule changes

Event Sources:

  • CUSTOMER_PORTAL - Changes made by subscribers through the customer portal
  • MERCHANT_PORTAL - Changes made by merchants in the admin panel
  • MERCHANT_EXTERNAL_API - Changes made via API by merchants or integrations
  • SHOPIFY_EVENT - Events triggered by Shopify webhooks
  • SHOPIFY_FLOW - Events triggered by Shopify Flow automations
  • SYSTEM_EVENT - Automated system events (scheduled tasks, sync operations)
  • MERCHANT_PORTAL_BULK_AUTOMATION - Bulk operations initiated from admin panel

Common Event Types:

  • Subscription Changes: CONTRACT_PAUSED, CONTRACT_ACTIVATED, CONTRACT_CANCELLED, CONTRACT_CREATED
  • Product Changes: PRODUCT_ADD, PRODUCT_REMOVE, PRODUCT_REPLACE, PRODUCT_QUANTITY_CHANGE, PRODUCT_PRICE_CHANGE
  • Billing Changes: NEXT_BILLING_DATE_CHANGE, BILLING_INTERVAL_CHANGE, BILLING_ATTEMPT_TRIGGERED, BILLING_ATTEMPT_SKIPPED
  • Delivery Changes: DELIVERY_INTERVAL_CHANGE, SHIPPING_ADDRESS_CHANGE, DELIVERY_METHOD_UPDATED
  • Payment Changes: PAYMENT_METHOD_UPDATED, SWITCH_PAYMENT_METHODS
  • Email Events: SEND_UPCOMING_ORDER_EMAIL, SEND_TRANSACTION_FAILED_EMAIL, SEND_SUBSCRIPTION_CREATED_EMAIL
  • Discount Events: DISCOUNT_APPLIED, DISCOUNT_REMOVED, PRICING_POLICY_DISCOUNT_APPLIED
  • One-Time Products: ONE_TIME_PURCHASE_PRODUCT_ADDED, ONE_TIME_PURCHASE_PRODUCT_REMOVED

Query Parameters and Filtering:

You can filter activity logs using query parameters. All filters support standard operations:

  • equals - Exact match
  • in - Match any value in list
  • greaterThan, lessThan - Date range filtering
  • contains - Partial text match

Example Filter Queries:

  1. Get all failed billing attempts: ?entityType.equals=SUBSCRIPTION_BILLING_ATTEMPT&eventType.equals=BILLING_ATTEMPT_TRIGGERED&status.equals=FAILURE

  2. Get all customer portal changes: ?eventSource.equals=CUSTOMER_PORTAL

  3. Get logs for a specific subscription: ?entityId.equals=123456&entityType.equals=SUBSCRIPTION_CONTRACT_DETAILS

  4. Get logs within date range: ?createAt.greaterThan=2024-01-01T00:00:00Z&createAt.lessThan=2024-01-31T23:59:59Z

  5. Get all cancellation events: ?eventType.equals=CONTRACT_CANCELLED

  6. Get all API-triggered changes: ?eventSource.equals=MERCHANT_EXTERNAL_API

Pagination:

Results are paginated. Use standard Spring Data pagination parameters:

  • page - Page number (zero-indexed, default: 0)
  • size - Page size (default: 20, max: 100)
  • sort - Sort criteria (e.g., createAt,desc or id,asc)

Example: ?page=0&size=50&sort=createAt,desc

Use Cases:

  • Audit and Compliance: Track all changes for regulatory compliance and internal auditing
  • Customer Support: Review subscription history to troubleshoot customer issues
  • Debugging: Investigate failed operations and system errors
  • Analytics: Analyze customer behavior and subscription lifecycle patterns
  • Reporting: Generate reports on subscription changes, cancellations, and modifications
  • Integration Monitoring: Track API usage and automated workflow executions
  • Security: Monitor for unusual activity patterns or unauthorized changes

Important Notes:

  • Activity logs are immutable and cannot be modified or deleted via API
  • Logs are retained according to your subscription plan's retention policy
  • The additionalInfo field contains detailed JSON with event-specific context
  • For large exports, consider using pagination and filtering to reduce data transfer
  • Logs are scoped to your shop - you can only access logs for your own subscriptions
  • System events may not have an activityBy value as they're automated

Response Headers:

  • X-Total-Count - Total number of matching records
  • Link - Pagination links (first, last, next, prev)

Authentication: Requires valid api_key query parameter with appropriate permissions

Query
api_keystringrequired

Your API Key

criteriaobject(ActivityLogCriteria)required

Activity Log Search Criteria

criteria.​idobject(LongFilter)
criteria.​shopobject(StringFilter)
criteria.​entityIdobject(LongFilter)
criteria.​entityTypeobject(ActivityLogEntityTypeFilter)
criteria.​eventSourceobject(ActivityLogEventSourceFilter)
criteria.​eventTypeobject(ActivityLogEventTypeFilter)
criteria.​statusobject(ActivityLogStatusFilter)
criteria.​createAtobject(ZonedDateTimeFilter)
criteria.​activityByobject(StringFilter)
pageableobject(Pageable)required

Pagination parameters (page number and size)

Example: page=0&size=10&sort=id,desc
pageable.​pageinteger(int32)>= 0
pageable.​sizeinteger(int32)>= 1
pageable.​sortArray of strings
curl -i -X GET \
  'https://subscription-admin.appstle.com/api/external/v2/activity-logs?api_key=string&id=%5Bobject+Object%5D&shop=%5Bobject+Object%5D&entityId=%5Bobject+Object%5D&entityType=%5Bobject+Object%5D&eventSource=%5Bobject+Object%5D&eventType=%5Bobject+Object%5D&status=%5Bobject+Object%5D&createAt=%5Bobject+Object%5D&activityBy=%5Bobject+Object%5D&page=0&size=10&sort=id%2Cdesc'

Responses

Activity logs successfully retrieved. Returns paginated list of activity log entries.

Bodyapplication/jsonArray [
idinteger(int64)
shopstring
entityIdinteger(int64)
entityTypestring
Enum"SUBSCRIPTION_BILLING_ATTEMPT""SUBSCRIPTION_CONTRACT_DETAILS""SUBSCRIPTION_GROUP_PLAN""SHIPPING_PROFILE""CANCELLATION_MANAGEMENT""DUNNING_MANAGEMENT""PRODUCT_SWAP""FREQUENCY_SWAP""EMAIL_TEMPLATE""SHOP_INFO"
eventSourcestring
Enum"CUSTOMER_PORTAL""MERCHANT_PORTAL""SHOPIFY_EVENT""SYSTEM_EVENT""MERCHANT_PORTAL_BULK_AUTOMATION""MERCHANT_EXTERNAL_API""SHOPIFY_FLOW"
eventTypestring
Enum"NEXT_BILLING_DATE_CHANGE""NEXT_BILLING_TIME_CHANGE""BILLING_INTERVAL_CHANGE""DELIVERY_INTERVAL_CHANGE""BILLING_ATTEMPT_TRIGGERED""BILLING_ATTEMPT_SKIPPED""PRODUCT_ADD""PRODUCT_REMOVE""PRODUCT_REPLACE""PRODUCT_QUANTITY_CHANGE"
statusstring
Enum"SUCCESS""FAILURE""INFO""SKIPPED""PARTIAL_FAILURE"
createAtstring(date-time)
additionalInfostring
activityBystring
clientIpstring
]
Response
application/json
[ { "id": 789012, "shop": "example-shop.myshopify.com", "entityId": 123456, "entityType": "SUBSCRIPTION_CONTRACT_DETAILS", "eventSource": "CUSTOMER_PORTAL", "eventType": "NEXT_BILLING_DATE_CHANGE", "status": "SUCCESS", "createAt": "2024-02-15T10:30:45Z", "additionalInfo": "{\"oldDate\":\"2024-03-01\",\"newDate\":\"2024-03-15\",\"reason\":\"Customer requested delay\"}", "activityBy": "customer@example.com", "clientIp": "192.168.1.100" }, { "id": 789013, "shop": "example-shop.myshopify.com", "entityId": 123456, "entityType": "SUBSCRIPTION_CONTRACT_DETAILS", "eventSource": "CUSTOMER_PORTAL", "eventType": "PRODUCT_ADD", "status": "SUCCESS", "createAt": "2024-02-15T11:15:22Z", "additionalInfo": "{\"variantId\":987654321,\"quantity\":2,\"productTitle\":\"Premium Coffee Beans\",\"price\":\"24.99\"}", "activityBy": "customer@example.com", "clientIp": "192.168.1.100" }, { "id": 789014, "shop": "example-shop.myshopify.com", "entityId": 456789, "entityType": "SUBSCRIPTION_BILLING_ATTEMPT", "eventSource": "SYSTEM_EVENT", "eventType": "BILLING_ATTEMPT_TRIGGERED", "status": "FAILURE", "createAt": "2024-02-15T08:00:00Z", "additionalInfo": "{\"amount\":\"49.99\",\"currency\":\"USD\",\"errorCode\":\"INSUFFICIENT_FUNDS\",\"errorMessage\":\"Card declined - insufficient funds\"}", "activityBy": null, "clientIp": null }, { "id": 789015, "shop": "example-shop.myshopify.com", "entityId": 123456, "entityType": "SUBSCRIPTION_CONTRACT_DETAILS", "eventSource": "MERCHANT_PORTAL", "eventType": "CONTRACT_PAUSED", "status": "SUCCESS", "createAt": "2024-02-14T16:45:30Z", "additionalInfo": "{\"pauseReason\":\"Customer on vacation\",\"pauseDuration\":30,\"resumeDate\":\"2024-03-15\"}", "activityBy": "merchant-admin@example.com", "clientIp": "203.0.113.45" }, { "id": 789016, "shop": "example-shop.myshopify.com", "entityId": 789123, "entityType": "PRODUCT_SWAP", "eventSource": "MERCHANT_EXTERNAL_API", "eventType": "PRODUCT_REPLACE", "status": "SUCCESS", "createAt": "2024-02-14T14:20:15Z", "additionalInfo": "{\"oldVariantId\":111222333,\"newVariantId\":444555666,\"oldProductTitle\":\"Regular Coffee\",\"newProductTitle\":\"Premium Coffee\",\"priceChange\":5.00}", "activityBy": "api-integration", "clientIp": "198.51.100.25" } ]

Customer Portal

APIs powering the customer-facing portal where subscribers can manage their own subscriptions.

Operations

Customers

APIs for managing customer information, profiles, and account details.

Operations