Creating a Subscription

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

You can use the CreateSubscription method to create a new subscription against an existing customer card token.

To send a message to subscribers at any point during their plan, use the CreateSMSMessage call.

Inbound Parameters

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

Parameter NameDescriptionOptional/Required
cardTokenThe specific token that references the credit card to be charged.Required
planCodeA 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)
startDateThe 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)
reccurringchargeThe amount to be rebilled at each billing interval.

Format: 1.00 = $1.00
Required
discountAmountAn optional discount percentage amount.

Format: 5 = 5%
Optional
taxAmountAn optional dollar amount for the tax.

Format: 1.00 = $1.00
Optional
intervalThe amount of time that passes between subscription billing:
- Weekly
- Bi-Weekly (every two weeks)
- Monthly
- Bi-Monthly (every two months)
- Quarterly
- Annually
Required
numberOfIntervalsThe number of intervals the subscription will loop for before expiration.

*If this is not provided, it will default to 999.
*Optional
serviceDescriptionA brief description of the service being billed in the subscription.Optional

Code Sample

{
  "cardToken": "1234abcd",
  "planCode": "SAMPLE1",
  "startDate": "1-1-2021",
  "reccurringcharge": "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