Edit subscription products through the Shop API

Integrations on the Advanced plan can now change what a subscription bills for, with three new endpoints:

  • POST /shop-api/contracts/add-line-item adds a product to a subscription.
  • POST /shop-api/contracts/remove-line-item removes a product from a subscription.
  • POST /shop-api/contracts/update-line-item changes a product's variant, quantity or price.

If you don't send a price, it's taken from the subscription's own market and currency. If you set one, it stays fixed on later orders. Each change appears on the subscription's timeline.

We also improved GET /shop-api/contracts. When Shopify is busy, it now waits the right amount of time before retrying. If Shopify is still limiting requests after that, it returns a 429 you can retry, not a 500 error.