Creating a Subscription

Access Endpoint URL: https://rest.everyware.com/api/subscriptions/CreateSubscription [POST]

Send a request to the CreateSubscription endpoint to create a new subscription plan that charges an existing customer card or ACH token.

Inbound Parameters

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

Parameter Name

Data Type

Description

Optional/Required

CardToken

string

The specific token that references the credit card to be charged.

  • Required

Either CardToken or ACHToken must be provided

ACHToken

string

The specific token for the banking information used for the charge.

  • Required

Either CardToken or ACHToken must be provided

PlanCode

string

A code that refers to a subscription plan that was previously set up in Everyware.

This must have already been configured in Everyware for your sales site before it is provided here.**

Optional (See Below)

StartDate

datetime

The date that the subscription will begin. If left blank, this field will default to today.

Format: MM-DD-YYYY

Optional (defaults to today if not given)

RecurringCharge

decimal

The amount to be rebilled at each billing interval.

Format: 1.00 = $1.00

Required

DiscountAmount

double

An optional discount percentage amount.

Format: 5 = 5%

Optional

TaxAmount

decimal

An optional dollar amount for the tax.

Format: 1.00 = $1.00

Optional

Interval

string

The amount of time that passes between subscription billing:

  • weekly
  • bi-weekly (every two weeks)
  • monthly
  • bi-monthly (every two months)
  • quarterly
  • annual

Required

NumberOfIntervals

int

The number of intervals the subscription will loop for before expiration.

  • If this is not provided, it will default to 999.
  • Optional

ServiceDescription

string

A brief description of the service being billed in the subscription. Will default to "Subscription Service".

Optional

Code Sample

{
  "CardToken": "1234abcd",
  "PlanCode": "SAMPLE1",
  "StartDate": "1-1-2021",
  "Recurringcharge": "10.00",
  "DiscountAmount": "1.00",
  "TaxAmount": "2.50",
  "Interval": "monthly",
  "NumberOfIntervals": "5",
  "ServiceDescription": "Sample Service",
}
curl --location 'https://rest.everyware.com/api/Default/createsubscription' \
--header 'Authorization: Basic [xxx]' \
--header 'Content-Type: application/json' \
--data-raw ' {
  "cardToken": "1234abcd",
  "planCode": "SAMPLE1",
  "startDate": "1-1-2021",
  "reccurringcharge": "10.00",
  "discountAmount": "1.00",
  "taxAmount": "2.50",
  "interval": "monthly",
  "numberOfIntervals": "5",
  "serviceDescription": "Sample Service",
}
{
    "IsSuccess": true,
    "Message": "The subscription was successfully created.",
    "Data": "2364",
    "OrderNumber": null
}

Example Subscription Plans Portal View