Update recurring subscription

PUT https://app.ecwid.com/api/v3/{storeId}/subscriptions/{subscriptionId}

Request and response example

Request:

PUT /api/v3/1003/subscriptions/66839 HTTP/1.1
Authorization: Bearer secret_token
Host: app.ecwid.com
Content-Type: application/json
Cache-Control: no-cache

{
  "nextCharge": "2021-08-16 12:53:40 +0000"
}

Response:

{
  "updateCount": 1
}

Required access scopes

Your app must have the following access scopes to make this request: update_subscriptions

Path params

All path params are required.

Param
Type
Description

storeId

number

Ecwid store ID.

subscriptionId

number

Internal subscription ID.

Headers

The Authorization header is required.

Header
Format
Description

Authorization

Bearer secret_ab***cd

Access token of the application.

Request JSON

A JSON object with the following fields:

Field
Type
Description

chargeSettings

Details about recurring charges set up for the subscription.

nextCharge

string

Datetime of the next recurring charge for the subscription.

For example, 2024-05-26 13:37:46 +0000

status

string

One of: ACTIVE CANCELLED LAST_CHARGE_FAILED

REQUIRES_PAYMENT_CONFIRMATION

chargeSettings

Field
Type
Description

recurringInterval

string

Search term for the time scale of subscription's recurring interval.

One of: DAY WEEK MONTH YEAR

recurringIntervalCount

number

Search term for the frequency of subscription's recurring charges. One of: for DAY - 1 (daily) for WEEK - 1 (weekly) or 2 (biweekly) for MONTH - 1 (monthly) or 3 (quarterly) for YEAR - 1 (annually)

Response JSON

A JSON object with the following fields:

Field
Type
Description

updateCount

number

The number of updated items that defines if the request was successful. One of:

1 if the item was updated,

0 if the item was not updated.

Last updated

Was this helpful?