Comprehensive API documentation for managing subscriptions, payments, and related operations. These APIs allow you to programmatically manage subscription lifecycles, handle payments, configure products, and integrate subscription functionality into your applications.
- Get one-time products for next upcoming order
External APIs (0.0.1)
Request
Removes a previously added one-time product from a specific subscription order. This permanently deletes the one-time product from the specified billing attempt. The operation is idempotent - attempting to delete a non-existent product will succeed without error.
Important Notes:
- Only removes the product from the specified billing attempt
- Cannot remove products from billing attempts that are already processed
- Activity logs are created for audit trails
- Returns the updated list of all one-time products for the contract
Use Cases:
- Allow customers to remove unwanted add-ons before order processing
- Clean up cart-like functionality in customer portals
- Programmatically manage one-time product selections
- Implement "undo" functionality for product additions
Business Rules:
- Contract must belong to the authenticated shop
- The specific combination of contractId + billingAttemptId + variantId identifies the product to remove
- No error is thrown if the product doesn't exist (idempotent operation)
Authentication: Requires valid X-API-Key header that identifies the shop
- https://subscription-admin.appstle.com/api/external/v2/subscription-contract-one-offs-by-contractId-and-billing-attempt-id
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://subscription-admin.appstle.com/api/external/v2/subscription-contract-one-offs-by-contractId-and-billing-attempt-id?contractId=98765&billingAttemptId=54321&variantId=42549172011164&api_key=sk_live_1234567890abcdef' \
-H 'X-API-Key: sk_live_1234567890abcdef'Successfully removed the one-time product or product didn't exist. Returns all remaining one-time products for the contract.
The Shopify store domain that owns this subscription
The billing attempt ID this one-time product is associated with. This determines which upcoming order will include this product.
The subscription contract ID this one-time product belongs to
The Shopify product variant ID for this one-time product
The handle/slug of the product variant for URL-friendly identification
The price per unit of this product in the shop's base currency. This may include any applicable discounts.
[ { "id": 12345, "shop": "example-store.myshopify.com", "subscriptionContractId": 98765, "billingAttemptId": 54321, "variantId": 42549172011164, "variantHandle": "premium-coffee-blend-500g", "quantity": 2, "price": 19.99 } ]
Request
Retrieves one-time products that will be included in the next scheduled order for a subscription contract. This endpoint specifically returns products associated with the earliest queued billing attempt, making it ideal for showing customers what additional items will be in their next delivery.
Key Differences from /subscription-contract-one-offs-by-contractId:
- Returns ONLY products for the next upcoming order (not all future orders)
- Finds the earliest QUEUED billing attempt by date
- Returns empty array if no queued billing attempts exist
- Useful for "Your Next Order" previews in customer portals
Use Cases:
- Display a preview of the next order including one-time add-ons
- Calculate the total cost of the upcoming delivery
- Show customers their next delivery date with associated one-time items
- Allow last-minute modifications before order processing
Business Logic:
- Searches for billing attempts with status = QUEUED
- Selects the one with the earliest billing date
- Returns all one-time products for that specific billing attempt
- Returns empty array if no queued orders exist (e.g., subscription paused/cancelled)
Authentication: Requires valid X-API-Key header that identifies the shop
- https://subscription-admin.appstle.com/api/external/v2/upcoming-subscription-contract-one-offs-by-contractId
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://subscription-admin.appstle.com/api/external/v2/upcoming-subscription-contract-one-offs-by-contractId?contractId=98765&api_key=sk_live_1234567890abcdef' \
-H 'X-API-Key: sk_live_1234567890abcdef'Successfully retrieved next order one-time products
The Shopify store domain that owns this subscription
The billing attempt ID this one-time product is associated with. This determines which upcoming order will include this product.
The subscription contract ID this one-time product belongs to
The Shopify product variant ID for this one-time product
The handle/slug of the product variant for URL-friendly identification
The price per unit of this product in the shop's base currency. This may include any applicable discounts.
[ { "id": 12345, "shop": "example-shop.myshopify.com", "contractId": 67890, "billingAttemptId": 11111, "variantId": 22222, "quantity": 2, "productTitle": "Coffee Filters - Pack of 100", "variantTitle": "Standard Size", "image": "https://cdn.shopify.com/s/files/1/0000/0000/products/filter.jpg", "price": "9.99", "currencyCode": "USD" } ]