Creating a Subscription
Access URL: https://rest.everyware.com/api/Default/CreateSubscription [POST]
Use the CreateSubscription mehod to create new subscription against an existing customer card token.
Plan Codes
If PlanCode is provided it must already be setup in Everyware for your business/sales site.
Number of Intervals
If NumberOfIntervals is not provided then it defaults to 999
Intervals
Interval can be: weekly, bi-weekly, monthly, bi-monthly, quarterly, annual
Inbound Parameters
Parameter Name | Description | Required/Not |
---|---|---|
CardToken | Specific token that references the credit card to be charged. | REQUIRED |
PlanCode | A code that refers to a subscription plan that was previously set up in Everyware. | Optional (See Below) |
StartDate | The date the subscription will begin. Should follow format MM-DD-YYYY | Optional (defaults to today if not given) |
RecurringCharge | The amount to be rebilled at each billing interval. Format should be 1.00 = $1.00 | REQUIRED |
DiscountAmount | Optional discount percentage amount. Format is 5 = 5% | Optional |
TaxAmount | Optional tax amount. Format should be 1.00 = $1.00 | Optional |
Interval | The length of the interval between subscription billing: weekly, bi-weekly, monthly, bi-monthly, quarterly, annual | REQUIRED |
NumberOfIntervals | How many intervals the subscription will loop for before it expires. | Optional (see below) |
ServiceDescription | A brief description of the service being billed in the subscription. | Optional |
To send a message to subscribers at any point during their subscription plan process, use the CreateSMSMessage Call.
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
Updated about 1 month ago