Upgrade Subscription To Prepaid
Upgrades a pay-as-you-go subscription to a prepaid subscription.
Returns 400, with the reason in detail, when the merchant doesn’t have prepaid subscriptions enabled, the subscription is already prepaid or isn’t live, orders_per_billing is missing or less than 2, or the subscription’s product isn’t prepaid-eligible (in the prepaid eligibility product group).
The upgraded subscription starts with prepaid_orders_remaining at 0, so its next order is a renewal. That order is repriced right away to orders_per_billing times the unit price, and the customer pays for the full prepaid cycle when it’s placed. Because the customer never receives an order they haven’t paid for, the upgrade can be offered directly in the Subscription Manager. If renewal_behavior is omitted, the merchant’s default renewal behavior applies, or autorenew if none is set.
Authentication
Application API Scope — server-to-server, sent in the x-api-key header. See Authentication.
Path parameters
Request
Number of orders per prepaid billing cycle. Must be at least 2.
Public ID of the offer to associate the subscription with after the upgrade, or live for the merchant’s currently live offer. When omitted, the subscription keeps its current offer.
Response
The subscription type as stored. subscription_type reports IU replenishment and CSA replenishment as replenishment; this field keeps the original value.
Bundle components. Each has product; public_id and quantity are returned only when the merchant has multi-item bundles enabled.
Custom data stored on the subscription, as a JSON object. {} when the subscription has none. Ordergroove and your integrations can store their own keys here.
Three-letter ISO currency code.
Pending queued actions, in order. Returned only when the merchant has queued actions enabled; empty when the subscription isn’t live or has none.
Prepaid details. Returned only when the merchant has prepaid subscriptions enabled; null when this subscription isn’t prepaid.
Present only if the subscription has a free trial context (i.e. it was created for a product with a free trial configured); omitted otherwise.