Membership Contracts
Get detailed customer membership information
Retrieves comprehensive details for all membership contracts associated with a specific customer. This endpoint returns complete membership contract data including products, pricing, billing schedule, and status.
Key Information Returned:
- Contract Details: Contract ID, status (active, paused, cancelled), creation date
- Products: Line items with product names, variants, quantities, and prices
- Billing Information: Next billing date, billing frequency, payment method
- Delivery Details: Shipping address, delivery method, delivery frequency
- Pricing: Subtotal, discounts applied, total amount per cycle
- Membership Plan: Associated membership plan name and details
- Order History: Past billing attempts and fulfillment records
Membership Contract Details Include:
- Contract ID: Unique identifier for the membership
- Customer ID: Shopify customer ID associated with the contract
- Status: ACTIVE, PAUSED, CANCELLED, EXPIRED
- Billing Cycle: Number of completed billing cycles
- Next Billing Date: When the next payment will be charged
- Delivery Date: When the next order will be shipped
- Products: All line items in the membership with pricing
- Discount Codes: Applied discount codes and their values
- Custom Attributes: Any custom metadata or tags
Common Use Cases:
- Display full membership list in customer account dashboard
- Retrieve all contract details for customer support inquiries
- Build custom customer portal with membership management
- Sync membership data to external CRM or analytics systems
- Generate customer membership reports and analytics
- Validate customer’s active memberships before offering upgrades
- Show membership history and upcoming deliveries
Response Format: Returns a List of SubscriptionContractDetailsDTO objects, one per active/paused contract. If customer has no memberships, returns an empty list.
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
GET
/
api
/
external
/
v2
/
subscription-customers-detail
/
valid
/
{customerId}
Get detailed customer membership information
curl --request GET \
--url https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}import requests
url = "https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}';
const options = {method: 'GET'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"shop": "<string>",
"activatedOn": "2023-11-07T05:31:56Z",
"allowDeliveryPriceOverride": true,
"autoCharge": true,
"billingDateAfterTrial": "2023-11-07T05:31:56Z",
"billingPolicyInterval": "<string>",
"billingPolicyIntervalCount": 123,
"cancellationFeedback": "<string>",
"cancelledOn": "2023-11-07T05:31:56Z",
"contractAmount": 123,
"contractAmountUSD": 123,
"contractDetailsJSON": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerId": 123,
"customerLastName": "<string>",
"customerName": "<string>",
"deliveryPolicyInterval": "<string>",
"deliveryPolicyIntervalCount": 123,
"dunning": true,
"emailBouncedOrFailed": true,
"endsAt": "2023-11-07T05:31:56Z",
"graphCustomerId": "<string>",
"graphOrderId": "<string>",
"graphSubscriptionContractId": "<string>",
"id": 123,
"importedId": "<string>",
"maxCycles": 123,
"minCycles": 123,
"nextActivationDate": "2023-11-07T05:31:56Z",
"nextBillingDate": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"orderNoteAttributes": "<string>",
"pauseDurationCycle": 123,
"pausedBySecurityChallenge": true,
"pausedFromActive": true,
"pausedOn": "2023-11-07T05:31:56Z",
"phone": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"stopUpComingOrderEmail": true,
"subscriptionContractId": 123,
"subscriptionCreatedEmailSent": true,
"subscriptionCreatedEmailSentStatus": "SENT",
"subscriptionCreatedSmsSentStatus": "SENT",
"trialEndDate": "2023-11-07T05:31:56Z",
"upcomingSwapRule": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}[
{
"shop": "<string>",
"activatedOn": "2023-11-07T05:31:56Z",
"allowDeliveryPriceOverride": true,
"autoCharge": true,
"billingDateAfterTrial": "2023-11-07T05:31:56Z",
"billingPolicyInterval": "<string>",
"billingPolicyIntervalCount": 123,
"cancellationFeedback": "<string>",
"cancelledOn": "2023-11-07T05:31:56Z",
"contractAmount": 123,
"contractAmountUSD": 123,
"contractDetailsJSON": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerId": 123,
"customerLastName": "<string>",
"customerName": "<string>",
"deliveryPolicyInterval": "<string>",
"deliveryPolicyIntervalCount": 123,
"dunning": true,
"emailBouncedOrFailed": true,
"endsAt": "2023-11-07T05:31:56Z",
"graphCustomerId": "<string>",
"graphOrderId": "<string>",
"graphSubscriptionContractId": "<string>",
"id": 123,
"importedId": "<string>",
"maxCycles": 123,
"minCycles": 123,
"nextActivationDate": "2023-11-07T05:31:56Z",
"nextBillingDate": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"orderNoteAttributes": "<string>",
"pauseDurationCycle": 123,
"pausedBySecurityChallenge": true,
"pausedFromActive": true,
"pausedOn": "2023-11-07T05:31:56Z",
"phone": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"stopUpComingOrderEmail": true,
"subscriptionContractId": 123,
"subscriptionCreatedEmailSent": true,
"subscriptionCreatedEmailSentStatus": "SENT",
"subscriptionCreatedSmsSentStatus": "SENT",
"trialEndDate": "2023-11-07T05:31:56Z",
"upcomingSwapRule": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
][
{
"shop": "<string>",
"activatedOn": "2023-11-07T05:31:56Z",
"allowDeliveryPriceOverride": true,
"autoCharge": true,
"billingDateAfterTrial": "2023-11-07T05:31:56Z",
"billingPolicyInterval": "<string>",
"billingPolicyIntervalCount": 123,
"cancellationFeedback": "<string>",
"cancelledOn": "2023-11-07T05:31:56Z",
"contractAmount": 123,
"contractAmountUSD": 123,
"contractDetailsJSON": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerId": 123,
"customerLastName": "<string>",
"customerName": "<string>",
"deliveryPolicyInterval": "<string>",
"deliveryPolicyIntervalCount": 123,
"dunning": true,
"emailBouncedOrFailed": true,
"endsAt": "2023-11-07T05:31:56Z",
"graphCustomerId": "<string>",
"graphOrderId": "<string>",
"graphSubscriptionContractId": "<string>",
"id": 123,
"importedId": "<string>",
"maxCycles": 123,
"minCycles": 123,
"nextActivationDate": "2023-11-07T05:31:56Z",
"nextBillingDate": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"orderNoteAttributes": "<string>",
"pauseDurationCycle": 123,
"pausedBySecurityChallenge": true,
"pausedFromActive": true,
"pausedOn": "2023-11-07T05:31:56Z",
"phone": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"stopUpComingOrderEmail": true,
"subscriptionContractId": 123,
"subscriptionCreatedEmailSent": true,
"subscriptionCreatedEmailSentStatus": "SENT",
"subscriptionCreatedSmsSentStatus": "SENT",
"trialEndDate": "2023-11-07T05:31:56Z",
"upcomingSwapRule": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
][
{
"shop": "<string>",
"activatedOn": "2023-11-07T05:31:56Z",
"allowDeliveryPriceOverride": true,
"autoCharge": true,
"billingDateAfterTrial": "2023-11-07T05:31:56Z",
"billingPolicyInterval": "<string>",
"billingPolicyIntervalCount": 123,
"cancellationFeedback": "<string>",
"cancelledOn": "2023-11-07T05:31:56Z",
"contractAmount": 123,
"contractAmountUSD": 123,
"contractDetailsJSON": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerId": 123,
"customerLastName": "<string>",
"customerName": "<string>",
"deliveryPolicyInterval": "<string>",
"deliveryPolicyIntervalCount": 123,
"dunning": true,
"emailBouncedOrFailed": true,
"endsAt": "2023-11-07T05:31:56Z",
"graphCustomerId": "<string>",
"graphOrderId": "<string>",
"graphSubscriptionContractId": "<string>",
"id": 123,
"importedId": "<string>",
"maxCycles": 123,
"minCycles": 123,
"nextActivationDate": "2023-11-07T05:31:56Z",
"nextBillingDate": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"orderNoteAttributes": "<string>",
"pauseDurationCycle": 123,
"pausedBySecurityChallenge": true,
"pausedFromActive": true,
"pausedOn": "2023-11-07T05:31:56Z",
"phone": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"stopUpComingOrderEmail": true,
"subscriptionContractId": 123,
"subscriptionCreatedEmailSent": true,
"subscriptionCreatedEmailSentStatus": "SENT",
"subscriptionCreatedSmsSentStatus": "SENT",
"trialEndDate": "2023-11-07T05:31:56Z",
"upcomingSwapRule": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
]Headers
Path Parameters
Shopify customer ID
Query Parameters
API Key (Deprecated - Use Header X-API-Key instead)
Response
Customer membership details successfully retrieved (may be empty list if no memberships)
Available options:
SENT, UNSENT, FAILED, EMAIL_SETTINGS_DISABLED, CUSTOMER_PAYMENT_EMPTY, CONTRACT_PAUSED_STATUS Available options:
SENT, UNSENT, FAILED, SMS_SETTINGS_DISABLED, CUSTOMER_PAYMENT_EMPTY, CONTRACT_PAUSED_STATUS, PHONE_NUMBER_EMPTY ⌘I
Get detailed customer membership information
curl --request GET \
--url https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}import requests
url = "https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}';
const options = {method: 'GET'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://membership-admin.appstle.com/api/external/v2/subscription-customers-detail/valid/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"shop": "<string>",
"activatedOn": "2023-11-07T05:31:56Z",
"allowDeliveryPriceOverride": true,
"autoCharge": true,
"billingDateAfterTrial": "2023-11-07T05:31:56Z",
"billingPolicyInterval": "<string>",
"billingPolicyIntervalCount": 123,
"cancellationFeedback": "<string>",
"cancelledOn": "2023-11-07T05:31:56Z",
"contractAmount": 123,
"contractAmountUSD": 123,
"contractDetailsJSON": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerId": 123,
"customerLastName": "<string>",
"customerName": "<string>",
"deliveryPolicyInterval": "<string>",
"deliveryPolicyIntervalCount": 123,
"dunning": true,
"emailBouncedOrFailed": true,
"endsAt": "2023-11-07T05:31:56Z",
"graphCustomerId": "<string>",
"graphOrderId": "<string>",
"graphSubscriptionContractId": "<string>",
"id": 123,
"importedId": "<string>",
"maxCycles": 123,
"minCycles": 123,
"nextActivationDate": "2023-11-07T05:31:56Z",
"nextBillingDate": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"orderNoteAttributes": "<string>",
"pauseDurationCycle": 123,
"pausedBySecurityChallenge": true,
"pausedFromActive": true,
"pausedOn": "2023-11-07T05:31:56Z",
"phone": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"stopUpComingOrderEmail": true,
"subscriptionContractId": 123,
"subscriptionCreatedEmailSent": true,
"subscriptionCreatedEmailSentStatus": "SENT",
"subscriptionCreatedSmsSentStatus": "SENT",
"trialEndDate": "2023-11-07T05:31:56Z",
"upcomingSwapRule": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}[
{
"shop": "<string>",
"activatedOn": "2023-11-07T05:31:56Z",
"allowDeliveryPriceOverride": true,
"autoCharge": true,
"billingDateAfterTrial": "2023-11-07T05:31:56Z",
"billingPolicyInterval": "<string>",
"billingPolicyIntervalCount": 123,
"cancellationFeedback": "<string>",
"cancelledOn": "2023-11-07T05:31:56Z",
"contractAmount": 123,
"contractAmountUSD": 123,
"contractDetailsJSON": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerId": 123,
"customerLastName": "<string>",
"customerName": "<string>",
"deliveryPolicyInterval": "<string>",
"deliveryPolicyIntervalCount": 123,
"dunning": true,
"emailBouncedOrFailed": true,
"endsAt": "2023-11-07T05:31:56Z",
"graphCustomerId": "<string>",
"graphOrderId": "<string>",
"graphSubscriptionContractId": "<string>",
"id": 123,
"importedId": "<string>",
"maxCycles": 123,
"minCycles": 123,
"nextActivationDate": "2023-11-07T05:31:56Z",
"nextBillingDate": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"orderNoteAttributes": "<string>",
"pauseDurationCycle": 123,
"pausedBySecurityChallenge": true,
"pausedFromActive": true,
"pausedOn": "2023-11-07T05:31:56Z",
"phone": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"stopUpComingOrderEmail": true,
"subscriptionContractId": 123,
"subscriptionCreatedEmailSent": true,
"subscriptionCreatedEmailSentStatus": "SENT",
"subscriptionCreatedSmsSentStatus": "SENT",
"trialEndDate": "2023-11-07T05:31:56Z",
"upcomingSwapRule": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
][
{
"shop": "<string>",
"activatedOn": "2023-11-07T05:31:56Z",
"allowDeliveryPriceOverride": true,
"autoCharge": true,
"billingDateAfterTrial": "2023-11-07T05:31:56Z",
"billingPolicyInterval": "<string>",
"billingPolicyIntervalCount": 123,
"cancellationFeedback": "<string>",
"cancelledOn": "2023-11-07T05:31:56Z",
"contractAmount": 123,
"contractAmountUSD": 123,
"contractDetailsJSON": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerId": 123,
"customerLastName": "<string>",
"customerName": "<string>",
"deliveryPolicyInterval": "<string>",
"deliveryPolicyIntervalCount": 123,
"dunning": true,
"emailBouncedOrFailed": true,
"endsAt": "2023-11-07T05:31:56Z",
"graphCustomerId": "<string>",
"graphOrderId": "<string>",
"graphSubscriptionContractId": "<string>",
"id": 123,
"importedId": "<string>",
"maxCycles": 123,
"minCycles": 123,
"nextActivationDate": "2023-11-07T05:31:56Z",
"nextBillingDate": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"orderNoteAttributes": "<string>",
"pauseDurationCycle": 123,
"pausedBySecurityChallenge": true,
"pausedFromActive": true,
"pausedOn": "2023-11-07T05:31:56Z",
"phone": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"stopUpComingOrderEmail": true,
"subscriptionContractId": 123,
"subscriptionCreatedEmailSent": true,
"subscriptionCreatedEmailSentStatus": "SENT",
"subscriptionCreatedSmsSentStatus": "SENT",
"trialEndDate": "2023-11-07T05:31:56Z",
"upcomingSwapRule": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
][
{
"shop": "<string>",
"activatedOn": "2023-11-07T05:31:56Z",
"allowDeliveryPriceOverride": true,
"autoCharge": true,
"billingDateAfterTrial": "2023-11-07T05:31:56Z",
"billingPolicyInterval": "<string>",
"billingPolicyIntervalCount": 123,
"cancellationFeedback": "<string>",
"cancelledOn": "2023-11-07T05:31:56Z",
"contractAmount": 123,
"contractAmountUSD": 123,
"contractDetailsJSON": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"customerEmail": "<string>",
"customerFirstName": "<string>",
"customerId": 123,
"customerLastName": "<string>",
"customerName": "<string>",
"deliveryPolicyInterval": "<string>",
"deliveryPolicyIntervalCount": 123,
"dunning": true,
"emailBouncedOrFailed": true,
"endsAt": "2023-11-07T05:31:56Z",
"graphCustomerId": "<string>",
"graphOrderId": "<string>",
"graphSubscriptionContractId": "<string>",
"id": 123,
"importedId": "<string>",
"maxCycles": 123,
"minCycles": 123,
"nextActivationDate": "2023-11-07T05:31:56Z",
"nextBillingDate": "2023-11-07T05:31:56Z",
"orderAmount": 123,
"orderAmountUSD": 123,
"orderId": 123,
"orderName": "<string>",
"orderNote": "<string>",
"orderNoteAttributes": "<string>",
"pauseDurationCycle": 123,
"pausedBySecurityChallenge": true,
"pausedFromActive": true,
"pausedOn": "2023-11-07T05:31:56Z",
"phone": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"stopUpComingOrderEmail": true,
"subscriptionContractId": 123,
"subscriptionCreatedEmailSent": true,
"subscriptionCreatedEmailSentStatus": "SENT",
"subscriptionCreatedSmsSentStatus": "SENT",
"trialEndDate": "2023-11-07T05:31:56Z",
"upcomingSwapRule": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
]