|
CardToken
|
string
|
The specific token that references the credit card to be charged.
|
* Required
Either CardToken or ACHToken must be provided
</td></tr><tr><td>
ACHToken
</td><td>
string
</td><td>
The specific token for the banking information used for the charge.
</td><td>
* Required
Either CardToken or ACHToken must be provided
</td></tr><tr><td>
PlanCode
</td><td>
string
</td><td>
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.**
</td><td>
Optional (See Below)
</td></tr><tr><td>
StartDate
</td><td>
datetime
</td><td>
The date that the subscription will begin. If left blank, this field will default to today.
Format: MM-DD-YYYY
</td><td>
Optional (defaults to today if not given)
</td></tr><tr><td>
RecurringCharge
</td><td>
decimal
</td><td>
The amount to be rebilled at each billing interval.
Format: 1.00 = $1.00
</td><td>
Required
</td></tr><tr><td>
DiscountAmount
</td><td>
double
</td><td>
An optional discount percentage amount.
Format: 5 = 5%
</td><td>
Optional
</td></tr><tr><td>
TaxAmount
</td><td>
decimal
</td><td>
An optional dollar amount for the tax.
Format: 1.00 = $1.00
</td><td>
Optional
</td></tr><tr><td>
Interval
</td><td>
string
</td><td>
The amount of time that passes between subscription billing:
* weekly
* bi-weekly (every two weeks)
* monthly
* bi-monthly (every two months)
* quarterly
* annual
</td><td>
Required
</td></tr><tr><td>
NumberOfIntervals
</td><td>
int
</td><td>
The number of intervals the subscription will loop for before expiration.
* If this is not provided, it will default to 999.
</td><td>
* Optional
</td></tr><tr><td>
ServiceDescription
</td><td>
string
</td><td>
A brief description of the service being billed in the subscription. Will default to "Subscription Service".
</td><td>
Optional
</td></tr></tbody></table>
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

|