Skip to content

Customer Portal APIs (0.0.1)

Comprehensive API documentation for the customer-facing subscription portal. These APIs enable customers to manage their subscriptions, update billing information, modify delivery schedules, and access their account details through your storefront.

Important: These APIs must be called from your shop's domain (e.g., https://www.myshop.com/apps/subscriptions/cp/api/**) and require customer authentication. Unauthenticated requests will return a 401 Unauthorized error.

Languages
Servers
https://www.myshop.com/apps

Customer Portal

Core customer portal APIs for managing customer account settings, authentication, and portal configurations.

Operations

Calculate refund amount preview

Request

Calculates the refund amount that would be issued if a specific subscription order fulfillment were refunded. This provides a preview without actually processing the refund.

What it calculates:

  • Total refund amount (order amount minus processing fees)
  • Restocking fees (if applicable)
  • Gateway fees that cannot be refunded
  • Net refund amount customer will receive

Use Cases:

  • Show customer how much they'll get back before confirming refund
  • Display refund breakdown in customer portal
  • Validate refund eligibility

Important Notes:

  • This is a preview only - does not process refund
  • Refund amount may vary based on payment gateway
  • Some gateways don't refund processing fees
  • Refunds can only be issued for fulfilled orders

Authentication: Customer must be logged in and own the subscription

Path
idinteger(int64)required

Billing attempt ID

Query
subscriptionContractIdinteger(int64)

Subscription contract ID for validation

curl -i -X GET \
  'https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/refund-preview/{id}?subscriptionContractId=0'

Responses

Refund preview calculated successfully

Bodyapplication/json
Response
application/json
{ "orderAmount": 45.99, "processingFees": 1.5, "restockingFee": 0, "refundAmount": 44.49, "currency": "USD" }

Get available ways to earn loyalty points

Request

Returns all active point earning campaigns and rules that the customer can participate in. This shows customers how they can earn more points.

Common Earning Methods:

  • Points per dollar spent on purchases
  • Bonus points for first subscription
  • Points for referring friends
  • Birthday bonus points
  • Social media follows (Instagram, Facebook, Twitter)
  • Product reviews
  • Account creation bonus

Response includes:

  • Campaign name and description
  • Points awarded
  • Action required (e.g., 'Follow on Instagram')
  • Icon/image URL
  • Terms and conditions

Use Cases:

  • Display 'Ways to Earn' section in customer portal
  • Show earning opportunities on product pages
  • Encourage customer engagement

Authentication: Customer must be logged in via Shopify customer session

Query
customerIdstring

Customer ID (optional, auto-detected from session)

curl -i -X GET \
  'https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/earn-options?customerId=string'

Responses

Earning options retrieved successfully

Bodyapplication/json
Response
application/json
[ { "name": "Purchase Rewards", "description": "Earn 5 points for every $1 spent", "pointsAmount": 5, "action": "Make a purchase" }, { "name": "Refer a Friend", "description": "Earn 500 points when your friend makes their first purchase", "pointsAmount": 500, "action": "Share referral link" } ]

Get customer portal settings

Request

Retrieves the customer portal configuration and settings for the authenticated shop. The customer portal is the self-service interface where subscribers can manage their subscriptions, update payment methods, modify delivery addresses, and more.

What is the Customer Portal? The customer portal is a dedicated web interface that allows your subscribers to manage their subscription accounts independently. This reduces support burden and improves customer experience by enabling self-service subscription management.

Settings Returned:

  • Display Configuration:

    • Portal theme and branding settings
    • Custom colors and logo
    • Layout preferences
    • Custom CSS selectors
  • Feature Toggles:

    • Enable/disable subscription pausing
    • Enable/disable order skipping
    • Enable/disable product swapping
    • Enable/disable frequency changes
    • Enable/disable quantity modifications
    • Enable/disable address editing
    • Enable/disable payment method updates
    • Enable/disable subscription cancellation
  • Subscription Management Options:

    • Maximum pause duration allowed
    • Minimum subscription duration requirements
    • Skip limits per billing cycle
    • Product swap availability
    • One-time product add-ons
  • Communication Settings:

    • Email notification preferences
    • Custom portal messaging
    • Support contact information
    • Help text and instructions
  • Access Control:

    • Portal authentication method
    • Password requirements
    • Magic link settings
    • Session duration
  • Advanced Options:

    • Custom domain configuration
    • Redirect URLs
    • Webhook endpoints
    • Analytics tracking settings

Use Cases:

  • Display customer portal with correct branding and theme
  • Determine which features are available to subscribers
  • Build custom portal interfaces using your settings
  • Sync portal configuration across systems
  • Validate subscription management capabilities
  • Configure third-party integrations

Important Notes:

  • Settings are shop-specific and unique per merchant
  • Some features may be restricted based on subscription plan
  • Changes to settings are reflected immediately in the portal
  • Custom CSS must be valid and secure
  • Portal URL is typically: shop-domain.com/apps/subscriptions

Common Configuration Scenarios:

1. Standard Self-Service Portal:

  • Allow pausing (up to 3 months)
  • Allow skipping (max 2 consecutive orders)
  • Allow frequency changes
  • Allow quantity updates
  • Allow address editing
  • Enable payment method updates
  • Enable cancellation with feedback

2. Locked-Down Portal (Minimal Self-Service):

  • Disable pausing
  • Disable skipping
  • Disable cancellation (require support contact)
  • Allow address editing only
  • Allow payment method updates only

3. Full-Service Portal (Maximum Flexibility):

  • Enable all subscription management features
  • Allow unlimited pauses and skips
  • Enable product swapping
  • Enable one-time add-ons
  • Allow subscription splitting/merging
  • Custom branding and domain

Authentication: Requires valid X-API-Key header

Path
idstringrequired
curl -i -X GET \
  'https://www.myshop.com/apps/subscriptions/cp/api/customer-portal-settings/{id}'

Responses

Customer portal settings successfully retrieved

Bodyapplication/json
idinteger(int64)
shopstringrequired
orderFrequencyTextstringrequired
totalProductsTextstringrequired
nextOrderTextstringrequired
statusTextstringrequired
cancelSubscriptionBtnTextstringrequired
noSubscriptionMessagestringrequired
subscriptionNoTextstringrequired
updatePaymentMessagestringrequired
cardLastFourDigitTextstringrequired
cardExpiryTextstringrequired
cardHolderNameTextstringrequired
cardTypeTextstringrequired
paymentMethodTypeTextstringrequired
cancelAccordionTitlestringrequired
paymentDetailAccordionTitlestringrequired
upcomingOrderAccordionTitlestringrequired
paymentInfoTextstringrequired
updatePaymentBtnTextstringrequired
nextOrderDateLblstringrequired
statusLblstringrequired
quantityLblstringrequired
amountLblstringrequired
orderNoLblstringrequired
editFrequencyBtnTextstringrequired
cancelFreqBtnTextstringrequired
updateFreqBtnTextstringrequired
pauseResumeSubboolean
changeNextOrderDateboolean
cancelSubboolean
changeOrderFrequencyboolean
createAdditionalOrderboolean
manageSubscriptionButtonTextstring
editChangeOrderBtnTextstring
cancelChangeOrderBtnTextstring
updateChangeOrderBtnTextstring
editProductButtonTextstring
deleteButtonTextstring
updateButtonTextstring
cancelButtonTextstring
addProductButtonTextstring
addProductLabelTextstring
activeBadgeTextstring
closeBadgeTextstring
skipOrderButtonTextstring
productLabelTextstring
seeMoreDetailsTextstring
hideDetailsTextstring
productInSubscriptionTextstring
subTotalLabelTextstring
paymentNotificationTextstring
editProductFlagboolean
deleteProductFlagboolean
showShipmentboolean
magicLinkEmailFlagboolean
addAdditionalProductboolean
successTextstring
cancelSubscriptionConfirmPrepaidTextstring
cancelSubscriptionConfirmPayAsYouGoTextstring
cancelSubscriptionPrepaidButtonTextstring
cancelSubscriptionPayAsYouGoButtonTextstring
upcomingFulfillmentTextstring
creditCardTextstring
endingWithTextstring
weekTextstring
dayTextstring
monthTextstring
yearTextstring
skipBadgeTextstring
queueBadgeTextstring
shippingLabelTextstring
failureTextstring
sendEmailTextstring
chooseDifferentProductActionTextstring
chooseDifferentProductTextstring
confirmSkipFulfillmentBtnTextstring
confirmSkipOrderstring
skipFulfillmentButtonTextstring
confirmCommonTextstring
orderNowDescriptionTextstring
discountDetailsTitleTextstring
emailAddressTextstring
emailMagicLinkTextstring
retriveMagicLinkTextstring
validEmailMessagestring
saveButtonTextstring
orderDateTextstring
address1LabelTextstring
address2LabelTextstring
companyLabelTextstring
cityLabelTextstring
countryLabelTextstring
firstNameLabelTextstring
lastNameLabelTextstring
phoneLabelTextstring
provinceLabelTextstring
zipLabelTextstring
addressHeaderTitleTextstring
changeShippingAddressFlagboolean
updateEditShippingButtonTextstring
cancelEditShippingButtonTextstring
pauseSubscriptionTextstring
resumeSubscriptionTextstring
pauseBadgeTextstring
customerPortalSettingJsonstring
productFilterConfigstring
discountNoteTitlestring
initialDiscountNoteDescriptionstring
afterCycleDiscountNoteDescriptionstring
productRemovedTooltipstring
deliveryPriceTextstring
shippingOptionTextstring
nextDeliveryDatestring
everyLabelTextstring
orderNoteFlagboolean
orderNoteTextstring
useUrlWithCustomerIdboolean
expiredTokenTextstring
portalLoginLinkTextstring
localeDatestring
productSelectionOptionstring
Enum"ALL_PRODUCTS""PRODUCTS_FROM_ALL_PLANS""PRODUCTS_FROM_CURRENT_PLAN"
includeOutOfStockProductboolean
customerIdTextstring
helloNameTextstring
goBackButtonTextstring
changeVariantLabelTextstring
provinceCodeLabelTextstring
countryCodeLabelTextstring
pleaseWaitLoaderTextstring
openBadgeTextstring
cancelSubscriptionMinimumBillingIterationsMessagestring
topHtmlstring
bottomHtmlstring
updateShipmentBillingDateboolean
discountCodeTextstring
discountCodeApplyButtonTextstring
discountCodeboolean
applySellingPlanBasedDiscountboolean
overrideDaysToRescheduleOrderboolean
applySubscriptionDiscountForOtpboolean
applySubscriptionDiscountboolean
allowSwapWhenContractIsFreezeboolean
removeDiscountCodeAutomaticallyboolean
removeDiscountCodeLabelstring
enableSplitContractboolean
splitContractMessagestring
splitContractTextstring
enableMergeContractboolean
subscriptionDiscountTypeUnitstring
Enum"PERCENTAGE""AMOUNT"
subscriptionDiscountnumber(double)
upSellMessagestring
freezeOrderTillMinCycleboolean
freezeUpdateSubscriptionMessagestring
subscriptionContractFreezeMessagestring
preventCancellationBeforeDaysMessagestring
offerDiscountOnCancellationboolean
enableSkipFulFillmentboolean
discountPercentageOnCancellationstring
discountMessageOnCancellationstring
discountRecurringCycleLimitOnCancellationstring
frequencyChangeWarningTitlestring
frequencyChangeWarningDescriptionstring
discountCouponRemoveTextstring
pleaseSelectTextstring
shippingAddressNotAvailableTextstring
sellingPlanNameTextstring
discountCouponNotAppliedTextstring
shopPayPaymentUpdateTextstring
addOneTimeProductboolean
allowOrderNowboolean
selectProductLabelTextstring
purchaseOptionLabelTextstring
finishLabelTextstring
nextBtnTextstring
previousBtnTextstring
closeBtnTextstring
deleteConfirmationMsgTextstring
deleteMsgTextstring
yesBtnTextstring
noBtnTextstring
oneTimePurchaseNoteTextstring
clickHereTextstring
productAddMessageTextstring
choosePurchaseOptionLabelTextstring
oneTimePurchaseMessageTextstring
contractUpdateMessageTextstring
oneTimePurchaseDisplayMessageTextstring
addProductFinishedMessageTextstring
contractErrorMessageTextstring
addToSubscriptionTitleCPstring
oneTimePurchaseTitleCPstring
seeMoreProductBtnTextstring
viewAttributeLabelTextstring
attributeNameLabelTextstring
swapProductLabelTextstring
swapProductSearchBarTextstring
enableSwapProductFeatureboolean
enableTabletForceViewboolean
swapProductBtnTextstring
attributeValuestring
addNewButtonTextstring
attributeHeadingTextstring
enableViewAttributesboolean
enableSkipIndividualProductboolean
enableEditOrderNotesboolean
showSellingPlanFrequenciesboolean
totalPricePerDeliveryTextstring
fulfilledTextstring
dateFormatstring
discountCouponAppliedTextstring
subscriptionPausedMessageTextstring
subscriptionActivatedMessageTextstring
unableToUpdateSubscriptionStatusMessageTextstring
selectCancellationReasonLabelTextstring
upcomingOrderChangePopupSuccessTitleTextstring
upcomingOrderChangePopupSuccessDescriptionTextstring
upcomingOrderChangePopupSuccessClosebtnTextstring
upcomingOrderChangePopupFailureTitleTextstring
upcomingOrderChangePopupFailureDescriptionTextstring
upcomingOrderChangePopupFailureClosebtnTextstring
variantIdsToFreezeEditRemovestring
preventCancellationBeforeDaysstring
preventAddRemoveSwapBeforeDaysstring
allowCancellationBeforeDaysstring
allowAddRemoveSwapBeforeDaysstring
disAllowVariantIdsForOneTimeProductAddstring
disAllowProductIdsForOneTimeProductAddstring
disAllowVariantIdsForSubscriptionProductAddstring
allowProductIdsForSubscriptionProductAddstring
hideAddSubscriptionProductSectionboolean
allowOnlyOneTimeProductOnAddProductFlagboolean
requireFieldMessagestring
validNumberRequiredMessagestring
variantLblstring
priceLblstring
oneTimePurchaseOnlyTextstring
rescheduleTextstring
popUpSuccessMessagestring
popUpErrorMessagestring
orderNowTextstring
upcomingOrderPlaceNowAlertTextstring
upcomingOrderSkipAlertTextstring
deliveryFrequencyTextstring
editDeliveryInternalTextstring
maxCycleTextstring
minCycleTextstring
selectProductToAddstring
searchProductBtnTextstring
areyousureCommonMessageTextstring
areyousureResumeMessageTextstring
areyousurePauseMessageTextstring
editCommonTextstring
viewMoreTextstring
variantLblTextstring
totalLblTextstring
deleteProductTitleTextstring
greetingTextstring
productLblTextstring
hasBeenRemovedTextstring
orderTotalTextstring
addDiscountCodeTextstring
addDiscountCodeAlertTextstring
removeDiscountCodeAlertTextstring
shopPayLblTextstring
paypalLblTextstring
unknownPaymentReachoutUsTextstring
addToOrderLabelTextstring
upcomingTabTitlestring
scheduledTabTitlestring
historyTabTitlestring
noOrderNotAvailableMessagestring
continueTextstring
confirmSwapTextstring
confirmAddProductstring
minQtyToAllowDuringAddProductinteger(int32)
allowSplitContractboolean
enableSwapProductVariantboolean
enableEditAttributesboolean
discountAccordionTitlestring
redeemRewardsTextV2string
rewardsTextV2string
yourRewardsTextV2string
yourAvailableRewardsPointsTextV2string
cancellationDateTitleTextstring
pauseTillDateTitleTextstring
selectedCancellationReasonTitleTextstring
selectedPauseReasonTitleTextstring
cancellationNoteTitleTextstring
pauseNoteTitleTextstring
selectSplitMethodLabelTextstring
splitWithOrderPlacedSelectOptionTextstring
splitWithoutOrderPlacedSelectOptionTextstring
contractCancelledBadgeTextstring
chooseAnotherPaymentMethodTitleTextstring
selectPaymentMethodTitleTextstring
changePaymentMessagestring
updatePaymentMethodTitleTextstring
enableRedirectMyAccountButtonboolean
reschedulingPoliciesstring
enableRedirectToProductPageboolean
enableAllowOnlyOneDiscountCodeboolean
upcomingTabHeaderHTMLstring
schedulesTabHeaderHTMLstring
historyTabHeaderHTMLstring
allowedProductIdsForOneTimeProductAddstring
allowToAddProductQuantityMinMaxReachedboolean
allowReschedulingContractTrialPeriodboolean
allowToEditQuantityIfProductOutOfStockboolean
displayCountryByLanguageboolean
allowToEditQuantityInSingleBABProductboolean
fromDeliveryDateAddDayinteger(int32)
toDeliveryDateAddDayinteger(int32)
showNextOrderDeliveryDateboolean
singleBABDeletedProductPlaceholderImagestring
allowToSpecificZipCodestring
allowToSpecificZipCodeForLocalDeliverystring
customJsstring
allowAddOneTimeProductOrderIdPrepaidboolean
discountMessageOnPausestring
swapMessageOnPausestring
giftMessageOnPausestring
skipMessageOnPausestring
pauseMessageOnPausestring
changeDateMessageOnPausestring
changeAddressMessageOnPausestring
updateFrequencyMessageOnPausestring
skipDaysFromCurrentDateinteger(int32)
skipDaysToCurrentDateinteger(int32)
goBackRedirectLinkstring
resumeSubboolean
allowToSameReasonAgainboolean
deleteOneTimePurchaseProductboolean
billingDateRestrictFromDatestring
billingDateRestrictToDaysinteger(int32)
multiCurrencyAvailableboolean
babProductBadgeTextV2string
addAdditionalProductInBABboolean
disableRescheduleTimeSelectorboolean
filterDeliveryFrequencyOnCustomerTagsboolean
customerPortalLandingPagestring
pauseAccordionTitlestring
disabledKeyFieldFlagboolean
discountCarryForwardstring
Enum"NONE""EXISTING_PLAN""PRODUCT_PLAN""PRODUCT_THEN_EXISTING"
allowProductTagsForSubscriptionProductAddstring
disAllowProductTagsForSubscriptionProductAddstring
allowEditQuantityPrepaidSeparatePlanboolean
enableUpsellProductsboolean
maxIterationReachedTextstring
nextTierAmountTieredDiscountTextstring
nextTierPercentageTieredDiscountTextstring
amountTieredDiscountTextstring
percentageTieredDiscountTextstring
sectionTitleTextstring
sectionMinMaxTextV2string
sectionedBabBadgeTextstring
noDeliveryMethodLabelTextstring
selectedProductLabelTextV2string
discountAppliedTextV2string
minProductsInSubscriptionContractstring
addToSubscriptionDiscriptionTextV2string
splitContractConfirmButtonTextstring
welcomeTextstring
enableProductDescriptionboolean
allowToAutoAddProductboolean
rescheduleOrderDescriptionstring
splitWithoutOrderPlacedSelectOptionHelpTextstring
splitWithOrderPlacedSelectOptionHelpTextstring
splitContractNoteTextstring
retryFailedOrderConfirmationTextV2string
retryFailedOrderDescriptionTextV2string
enableUpdateDeliveryMethodboolean
shopCustomizationDataArray of objects(UpdateShopCustomizationRequest)
editQuantityLabelTextstring
Response
application/json
{ "id": 12345, "shop": "example-shop.myshopify.com", "portalEnabled": true, "customDomain": "subscriptions.example.com", "allowPause": true, "maxPauseDuration": 90, "allowSkip": true, "maxConsecutiveSkips": 2, "allowFrequencyChange": true, "allowQuantityChange": true, "allowProductSwap": true, "allowAddressEdit": true, "allowPaymentMethodUpdate": true, "allowCancellation": true, "requireCancellationReason": true, "enableOneTimeProducts": true, "minimumSubscriptionCycles": 3, "theme": { "primaryColor": "#4A90E2", "secondaryColor": "#50E3C2", "accentColor": "#F5A623", "fontFamily": "'Helvetica Neue', Arial, sans-serif", "logoUrl": "https://cdn.shopify.com/s/files/1/0000/0000/files/logo.png", "customCss": ".subscription-card { border-radius: 8px; }" }, "authentication": { "method": "MAGIC_LINK", "sessionDuration": 3600, "requireEmailVerification": true }, "notifications": { "sendSkipConfirmation": true, "sendPauseConfirmation": true, "sendFrequencyChangeConfirmation": true, "sendCancellationConfirmation": true }, "supportContact": { "email": "support@example.com", "phone": "+1-800-123-4567", "chatEnabled": true }, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-02-20T14:45:00Z" }

Subscription Management

APIs for customers to view and manage their subscription contracts including status updates, frequency changes, and cancellations.

Operations

Billing & Payments

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

Operations

Product Catalog

APIs for retrieving product information, selling plans, variant data, and subscription-enabled products available to customers.

Operations

Delivery & Shipping

APIs for managing delivery schedules, shipping addresses, delivery methods, and tracking order status.

Customer Retention

APIs for handling subscription cancellations, retention activities, and customer feedback management.

Loyalty Integration

APIs for integrating loyalty programs with subscriptions including points redemption and earning options.

Customization

APIs for accessing portal customization settings, translations, and theme configurations.