Updating a Subscription

Access Endpoint URL: https://rest.everyware.com/api/subscriptions/UpdateSubscription [PUT]

Send a request to the UpdateSubscription endpoint to update a customer's subscription details. Various aspects of the subscription can be modified, including the payment method, plan, recurring charges, and other parameters.

Inbound Parameters

Parameters should be passed in a single JSON-body object.

Parameter Name

Data type

Description

Optional/Required

SubscriptionID

long

Unique identifier for a particular subscription.

Required

CardToken

string

Card token to be used with the subscription.

Required

RecurringCharge

decimal

Amount charged each interval.

Optional

DiscountPercent

double

Discount amount applied to subscription (i.e. 10% would meant that a recurring amount of $100 would now become 90$ per iteration)

Optional

TaxAmount

decimal

% Tax levied on top of recurring amount (i.e. 8.25 on a recurring amount of $100 would be $108.25)

Optional

Prorate

boolean

If true, the next recurring charge will reflect changes THE DAY the changes were made. If false, the changes are applied on the next recurring charge.

Proration will be done on a time-based subscription schedule with the following methodology:
Prorated cost = (Days Used / Total Days in Billing Cycle) / Subscription Price

Optional


Code Sample

{
  "SubscriptionID": 123434373727,
  "CardToken": "1234abcd",
  "RecurringCharge": 10.00,
  "DiscountPercent": 5.00 ,
  "TaxAmount": 2.50,
  "Prorate": false
}
curl --location 'https://rest.everyware.com/api/Default/createsubscription' \
--header 'Authorization: Basic [xxx]' \
--header 'Content-Type: application/json' \
--data-raw ' {
  "SubscriptionID": 123434373727,
  "CardToken": "1234abcd",
  "RecurringCharge": 10.00,
  "DiscountPercent": 5.00 ,
  "TaxAmount": 2.50,
  "Prorate": false
}
{
    "IsSuccess": true,
    "Message": "The subscription was successfully created.",
    "Data": "2364",
    "OrderNumber": null
}