Core customer portal APIs for managing customer account settings, authentication, and portal configurations.
- Trigger immediate billing for an order
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.
Request
Changes the scheduled billing date for a billing attempt. This allows customers to adjust when their next order will be processed.
Rescheduling Options:
- Move to earlier date (if allowed by shop settings)
- Move to later date
- Optionally reschedule all future orders by the same offset
Important Behaviors:
- Only QUEUED billing attempts can be rescheduled
- New date must be in the future
- Can affect future billing schedule if rescheduleFutureOrder is true
- Activity logs are created for audit trail
Use Cases:
- Customer wants to delay next delivery
- Customer wants to receive order earlier
- Adjust delivery schedule to align with customer needs
- Coordinate deliveries with customer vacation/travel
Authentication: Requires valid X-API-Key header
- https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/reschedule-order/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/reschedule-order/{id}?rescheduleFutureOrder=true&billingDate=2019-08-24T14%3A15%3A22Z'Order successfully rescheduled
{ "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 }
Request
Immediately processes a billing attempt, creating an order in Shopify. This bypasses the scheduled billing date and processes the order right away.
Important Notes:
- Requires shop permission 'enableImmediatePlaceOrder'
- Only QUEUED billing attempts can be processed
- Creates an actual order in Shopify
- Charges the customer's payment method immediately
- Cannot be undone once processed
Use Cases:
- Customer requests early delivery
- Process order immediately after resolving payment issue
- Manual order processing for special cases
Authentication: Requires valid X-API-Key header and shop permission
- https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/attempt-billing/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts/attempt-billing/{id}'Request
Updates an existing subscription billing attempt. This endpoint allows modification of billing attempt details such as billing date, order note, and other attributes.
Important Notes:
- Only QUEUED billing attempts can be updated
- Cannot update attempts that are already processed or failed
- Billing attempt must belong to the authenticated shop
Authentication: Requires valid X-API-Key header
- https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://www.myshop.com/apps/subscriptions/cp/api/subscription-billing-attempts \
-H 'Content-Type: application/json' \
-d '{
"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": [
{
"variantId": 0,
"quantity": 0,
"title": "string",
"image": "string",
"productTitle": "string",
"productId": "string",
"variantTitle": "string",
"swapId": 0
}
],
"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": [
{
"key": "string",
"value": "string"
}
],
"partialLinesSkipped": "INVENTORY_MANAGEMENT",
"orderAmountContractCurrency": 0.1
}'Billing attempt successfully updated
{ "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 }