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 plan payment 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 Name | Description | Optional/Required |
---|---|---|
cardToken | The 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. This must have already been configured in Everyware for your sales site before it is provided here. | Optional (See Below) |
startDate | 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) |
reccurringcharge | The amount to be rebilled at each billing interval. Format: 1.00 = $1.00 | Required |
discountAmount | An optional discount percentage amount. Format: 5 = 5% | Optional |
taxAmount | An optional dollar amount for the tax. Format: 1.00 = $1.00 | Optional |
interval | The amount of time that passes between subscription billing: - Weekly - Bi-Weekly (every two weeks) - Monthly - Bi-Monthly (every two months) - Quarterly - Annually | Required |
numberOfIntervals | The number of intervals the subscription will loop for before expiration. *If this is not provided, it will default to 999. | *Optional |
serviceDescription | A 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
Updated 6 months ago