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

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

Get past orders

Request

Retrieves paginated list of past (processed) billing attempts for a subscription contract or customer. Includes successful orders, failed attempts, and skipped orders.

Filter Options:

  • By contract ID: Get order history for specific subscription
  • By customer ID: Get all orders across all customer subscriptions
  • Pagination: Control page size and page number

Order Information:

  • Billing attempt status (SUCCESS, FAILED, SKIPPED)
  • Shopify order ID for successful attempts
  • Billing date and processing date
  • Order total and line items
  • Error messages for failed attempts

Authentication: Requires valid X-API-Key header

Query
contractIdinteger(int64)
pageableobject(Pageable)required
pageable.​pageinteger(int32)>= 0
pageable.​sizeinteger(int32)>= 1
pageable.​sortArray of strings
curl -i -X GET \
  'https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/past-orders?contractId=0&page=0&size=1&sort=string'

Responses

Successfully retrieved past orders

Bodyapplication/jsonArray [
idinteger(int64)
shopstringrequired
billingAttemptIdstring
statusstring
Enum"SUCCESS""FAILURE""REQUESTING""PROGRESS""QUEUED""SKIPPED""SOCIAL_CONNECTION_NULL""CONTRACT_CANCELLED""CONTRACT_ENDED""CONTRACT_PAUSED"
billingDatestring(date-time)
contractIdinteger(int64)
attemptCountinteger(int32)
attemptTimestring(date-time)
graphOrderIdstring
orderIdinteger(int64)
orderAmountnumber(double)
orderNamestring
retryingNeededbooleanrequired
transactionFailedEmailSentStatusstring
Enum"SENT""UNSENT""FAILED""EMAIL_SETTINGS_DISABLED""CUSTOMER_PAYMENT_EMPTY""CONTRACT_CANCELLED"
upcomingOrderEmailSentStatusstring
Enum"SENT""UNSENT""FAILED""EMAIL_SETTINGS_DISABLED""CUSTOMER_PAYMENT_EMPTY""CONTRACT_CANCELLED""STOP_FROM_CONTRACT""CONTRACT_PAUSED"
applyUsageChargeboolean
recurringChargeIdinteger(int64)
transactionRatenumber(double)
usageChargeStatusstring
Enum"SUCCESS""FAILED""TO_BE_TRIED"
transactionFailedSmsSentStatusstring
Enum"SENT""UNSENT""FAILED""SMS_SETTINGS_DISABLED""CUSTOMER_PAYMENT_EMPTY""CONTRACT_CANCELLED""PHONE_NUMBER_EMPTY"
upcomingOrderSmsSentStatusstring
Enum"SENT""UNSENT""FAILED""SMS_SETTINGS_DISABLED""CUSTOMER_PAYMENT_EMPTY""CONTRACT_CANCELLED""STOP_FROM_CONTRACT""CONTRACT_PAUSED""PHONE_NUMBER_EMPTY"
billingAttemptResponseMessagestring
progressAttemptCountinteger(int32)
orderNotestring
variantListArray of objects(VariantQuantity)
securityChallengeSentStatusstring
Enum"SENT""UNSENT""FAILED""EMAIL_SETTINGS_DISABLED""CONTRACT_CANCELLED"
orderAmountUSDnumber(double)
orderCancelReasonstring
Enum"CUSTOMER""DECLINED""FRAUD""INVENTORY""STAFF""OTHER""$UNKNOWN"
orderCancelledAtstring(date-time)
orderClosedboolean
orderClosedAtstring(date-time)
orderConfirmedboolean
orderDisplayFinancialStatusstring
Enum"PENDING""AUTHORIZED""PARTIALLY_PAID""PARTIALLY_REFUNDED""VOIDED""PAID""REFUNDED""EXPIRED""$UNKNOWN"
orderDisplayFulfillmentStatusstring
Enum"UNFULFILLED""PARTIALLY_FULFILLED""FULFILLED""RESTOCKED""PENDING_FULFILLMENT""OPEN""IN_PROGRESS""ON_HOLD""SCHEDULED""REQUEST_DECLINED"
orderProcessedAtstring(date-time)
lastShippingUpdatedAtstring(date-time)
inventorySkippedAttemptCountinteger(int32)
inventorySkippedRetryingNeededboolean
orderAttributesArray of objects(AttributeInfo)
partialLinesSkippedstring
Enum"INVENTORY_MANAGEMENT""MANUAL"
orderAmountContractCurrencynumber(double)
]
Response
application/json
[ { "id": 0, "shop": "string", "billingAttemptId": "string", "status": "SUCCESS", "billingDate": "2019-08-24T14:15:22Z", "contractId": 0, "attemptCount": 0, "attemptTime": "2019-08-24T14:15:22Z", "graphOrderId": "string", "orderId": 0, "orderAmount": 0.1, "orderName": "string", "retryingNeeded": true, "transactionFailedEmailSentStatus": "SENT", "upcomingOrderEmailSentStatus": "SENT", "applyUsageCharge": true, "recurringChargeId": 0, "transactionRate": 0.1, "usageChargeStatus": "SUCCESS", "transactionFailedSmsSentStatus": "SENT", "upcomingOrderSmsSentStatus": "SENT", "billingAttemptResponseMessage": "string", "progressAttemptCount": 0, "orderNote": "string", "variantList": [], "securityChallengeSentStatus": "SENT", "orderAmountUSD": 0.1, "orderCancelReason": "CUSTOMER", "orderCancelledAt": "2019-08-24T14:15:22Z", "orderClosed": true, "orderClosedAt": "2019-08-24T14:15:22Z", "orderConfirmed": true, "orderDisplayFinancialStatus": "PENDING", "orderDisplayFulfillmentStatus": "UNFULFILLED", "orderProcessedAt": "2019-08-24T14:15:22Z", "lastShippingUpdatedAt": "2019-08-24T14:15:22Z", "inventorySkippedAttemptCount": 0, "inventorySkippedRetryingNeeded": true, "orderAttributes": [], "partialLinesSkipped": "INVENTORY_MANAGEMENT", "orderAmountContractCurrency": 0.1 } ]

Get past orders report with detailed filtering

Request

Retrieves a detailed report of past billing attempts with advanced filtering options. This endpoint provides comprehensive data for analytics, troubleshooting, and reporting purposes.

Filter Options:

  • By status: SUCCESS, FAILED, SKIPPED
  • By date range: Filter by billing date range
  • By attempt count: Filter by number of retry attempts
  • By contract status: Filter by subscription contract status
  • By contract ID: Get report for specific subscription

Response Includes:

  • Detailed billing attempt information
  • Shopify exception details for failed attempts (optional)
  • Retry attempt count
  • Processing timestamps
  • Order totals and line items

Authentication: Requires valid X-API-Key header

Query
contractIdinteger(int64)
statusstringrequired
Enum"SUCCESS""FAILURE""REQUESTING""PROGRESS""QUEUED""SKIPPED""SOCIAL_CONNECTION_NULL""CONTRACT_CANCELLED""CONTRACT_ENDED""CONTRACT_PAUSED"
includeShopifyExceptionboolean
Default false
fromDaystring(date-time)
toDaystring(date-time)
attemptCountinteger(int32)
billingErrorsKeysstring
customerNamestring
errorMessagestring
contractStatusstring
pageableobject(Pageable)required
pageable.​pageinteger(int32)>= 0
pageable.​sizeinteger(int32)>= 1
pageable.​sortArray of strings
curl -i -X GET \
  'https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/past-orders/report?contractId=0&status=SUCCESS&includeShopifyException=false&fromDay=2019-08-24T14%3A15%3A22Z&toDay=2019-08-24T14%3A15%3A22Z&attemptCount=0&billingErrorsKeys=string&customerName=string&errorMessage=string&contractStatus=string&page=0&size=1&sort=string'

Responses

Successfully retrieved report

Body*/*Array [
subscriptionBillingAttemptobject(SubscriptionBillingAttempt)
subscriptionContractDetailsobject(SubscriptionContractDetails)
]

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.