APIs for managing Shopify delivery profiles, shipping rates, zones, and free shipping configuration for subscription memberships
- Cancel a membership contract
Customer Portal APIs (0.0.1)
Important Note:
The APIs in this document are for reference only and will not work directly in Swagger. To use these APIs, you need to call them from your shop.
The base URL for these APIs is your shop's domain. For example, if your shop domain is https://www.myshop.com/apps, then the full API endpoint will be based on this domain (e.g., https://www.myshop.com/apps/memberships/cp/api/**).
Please ensure the customer is logged in when calling the Customer Portal Proxy API. If the customer is not logged in, the API will return a 401 Unauthorized error.
- https://www.myshop.com/apps/memberships/cp/api/subscription-contract-details/current-cycle/{contractId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://www.myshop.com/apps/memberships/cp/api/subscription-contract-details/current-cycle/{contractId}'Request
Permanently cancels an active membership contract in Shopify. This operation stops all future billing and marks the membership as CANCELLED.
Important Notes:
- Permanent Action: Cancellation cannot be undone. A new membership must be created to re-subscribe.
- Email Notification: Cancellation email is automatically sent to the customer
- Activity Logging: Cancellation is logged with reason/feedback for analytics
- Immediate Effect: No future billing attempts will be made
Customer Portal Restrictions: When called from customer portal, additional validations apply:
- Minimum Cycles: Cannot cancel if membership hasn't completed minimum required billing cycles
- Frozen Memberships: Cannot cancel memberships that are frozen until min cycle completion
- Attribute-Based Limits: Respects any custom attribute-based cancellation restrictions
Cancellation Feedback:
- Optional
cancellationFeedbackparameter to capture why customer is cancelling - Common values: 'TOO_EXPENSIVE', 'NO_LONGER_NEEDED', 'SWITCHING_TO_COMPETITOR', 'OTHER'
- Helps merchants understand churn reasons
Use Cases:
- Customer requests to cancel their membership
- Merchant manually cancels membership (e.g., payment issues, customer request)
- Automated cancellation after max cycles reached
Authentication: Requires authenticated shop user or customer portal token
- https://www.myshop.com/apps/memberships/cp/api/subscription-contracts/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://www.myshop.com/apps/memberships/cp/api/subscription-contracts/123456789?cancellationFeedback=TOO_EXPENSIVE&cancellationNote=Customer+found+a+cheaper+alternative'Membership successfully cancelled (no content returned). Cancellation email sent to customer.
No content