Billing Type
A product's billing type will give you important information about when it needs to be shipped. v1.1 of the shipment endpoint lets you filter on billing_type
, where each shipment will be one of standard
, adhoc
, or ecom
.
-
standard
refers to most subscription products on Cratejoy, where all subscribers renew on the same day each month. E.g., if all subscribers renew on the 15th of every month. -
adhoc
refers to subscription products that renew on the anniversary of its purchase date. E.g. Subscriber A buys a subscription on the 5th, so she renews every month on the 5th but Subscriber B buys a subscription on the 10th, so he renews on the 10th of each month. -
ecom
refers to non-subscription ecommerce products that do not renew.
Standard Subscriptions
For shipments with standard billing , use batch.end_date
to determine a shipment's target ship date.
Subscriptions that have a billing_type=standard
will have a shipping batch: a group of shipments for a given subscription product that all need to ship at the same time. For these shipments, the target ship date should be sometime after the end of the batch date range.
For example, if your product has a renewal date of the 15th, your batches might be:
A. January 1 - January 31
B. February 1 - February 28 (or 29)
C. March 1 - March 31
D. Etc.
Any shipment with an adjusted_ordered_at
anywhere from January 1 to January 31 will be in the "A" batch and should be shipped in early February. Thus, moving such a shipment's adjusted_ordered_at
from 2017-01-01 to 2017-01-20 wouldn't change when it ships. It's still shipped early February. Its batch will stay the same, and you'll want to know to ship it out based on that batch end date.
Ad hoc Subscriptions
For subscriptions with adhoc billing, use adjusted_ordered_at
to determine a shipment's target ship date.
Filter to find ad hoc subscriptions by filtering on billing_type=adhoc
. These subscriptions do not have batches, because ad hoc subscriptions are shipped out soon after they're purchased.
Ecom Shipments
For ecom purchases, use adjusted_ordered_at
to determine a shipment's target ship date.
Filter to find ecommerce shipments by filtering on billing_type=ecom
. Ecommerce purchases have no batches, because ecom shipments should be shipped out soon after they're purchased.