Get Current Subscription
curl --request GET \
--url https://api.your-domain.com/example/zaymo/customer-portal/subscription \
--header 'X-Zaymo-API-Key: <api-key>'import requests
url = "https://api.your-domain.com/example/zaymo/customer-portal/subscription"
headers = {"X-Zaymo-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Zaymo-API-Key': '<api-key>'}};
fetch('https://api.your-domain.com/example/zaymo/customer-portal/subscription', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"data": {
"next_billing_date": "2024-02-15",
"items": [
{
"id": "<string>",
"title": "<string>",
"price": 29.99,
"images": [
"<string>"
],
"quantity": 2,
"description": "<string>"
}
],
"shipping_total_cost": 5.99,
"order_discount_total": 5,
"customer_tax_rate": 0.08
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Customer Portal
Get Current Subscription
Retrieve the customer’s current active subscription details including billing information and items. If the customer has multiple subscriptions, we recommend returning the next upcoming subscription.
GET
/
zaymo
/
customer-portal
/
subscription
Get Current Subscription
curl --request GET \
--url https://api.your-domain.com/example/zaymo/customer-portal/subscription \
--header 'X-Zaymo-API-Key: <api-key>'import requests
url = "https://api.your-domain.com/example/zaymo/customer-portal/subscription"
headers = {"X-Zaymo-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Zaymo-API-Key': '<api-key>'}};
fetch('https://api.your-domain.com/example/zaymo/customer-portal/subscription', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"data": {
"next_billing_date": "2024-02-15",
"items": [
{
"id": "<string>",
"title": "<string>",
"price": 29.99,
"images": [
"<string>"
],
"quantity": 2,
"description": "<string>"
}
],
"shipping_total_cost": 5.99,
"order_discount_total": 5,
"customer_tax_rate": 0.08
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Zaymo will authenticate requests using the API key you provide
Query Parameters
The email address of the customer
Was this page helpful?