Update subscription with the Recharge API

Changes an active subscription and returns it. Changing order_interval_unit, order_interval_frequency or charge_interval_frequency needs all three, recalculates the next charge date and removes skipped and manually changed charges. To move only the next charge, use Set subscription next charge date.

Identifier
recharge_update_subscription

The request

POST https://connect.reportei.com/api/tools/recharge_update_subscription/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json

{
  "customer_toolkit": "<connection UUID>",
  "arguments": {
    "id": 1
  }
}

Your system sends your customer's connection id and the tool arguments. The headers are the same as the rest of the Connect API: your product's token and your customer's token.

Parameters

ParameterTypeRequiredDescription
idintegerYesId of a subscription from List subscriptions.
quantityintegerNoNumber of units in each order.
pricestringNoPrice of one unit before discounts, taxes and shipping, such as 10.00.
external_variant_idobjectNoNew product variant in the store platform, to swap the product. The variant id comes from external_variant_id of a subscription in List subscriptions, or from the product page in the store admin.
use_external_variant_defaultsbooleanNoWith a new external_variant_id, takes the price from that variant.
product_titlestringNoName of the product.
variant_titlestringNoName of the product variant.
skustringNoSKU used for the charges and orders of this subscription in place of the SKU of the variant.
order_interval_unitstringNoUnit of the order and charge frequencies. Send it with order_interval_frequency and charge_interval_frequency.Values: day, week, month
order_interval_frequencyintegerNoNumber of order_interval_unit between orders.
charge_interval_frequencyintegerNoNumber of order_interval_unit between charges.
order_day_of_monthintegerNoDay of the month the orders are created on. Removes skipped and manually changed charges.
order_day_of_weekintegerNoDay of the week the orders are created on. Removes skipped and manually changed charges.
expire_after_specific_number_of_chargesintegerNoNumber of charges after which the subscription expires.
propertiesarrayNoLine item properties of the subscription, such as a color or an engraving text. The list replaces the current one.
commitbooleanNoTrue waits until the queued charges of the subscription are regenerated before answering. The default is false, which regenerates them a few seconds later.
force_updatebooleanNoTrue also applies the change to a cancelled subscription.

Supported connections

Your customer connects their Recharge account once, with one of the modes below. The same connection serves every tool of the toolkit.

API key

Your customer pastes the app's key on a Connect screen, or your system sends the key with POST /api/customer-toolkits, with no screen.

The response

On success, Connect preserves the app's response status and body. HTTP errors returned by the app use the {error, api_error} envelope; authentication or validation can fail before execution. The X-Toolkit-Execution-Id header identifies the recorded execution, available at GET /api/tools/executions/{uuid}.

Ready for AI agents

This tool's input is a JSON Schema, available at GET /api/tools/recharge_update_subscription. It becomes your agent's tool definition with no conversion.

Other Recharge tools

See all 12 tools

Toolkits in the same category

See all 100 toolkits

See Connect applied to your product.

Try it for 15 days with no card, or walk our team through your use case.