Hey! These docs are for version 1.0, which is no longer officially supported. Click here for the latest version, 2.0!

Signing up a customer

Step 1 - To create a new customer, use the API, posting to https://api.upodi.io/v2/customers

{
  "accountnumber" : "CU-000120",
  "currencycode" : "EUR",
  "autobill" : true,
  "fullname" : "Sample Customer"
}

Step 2 - Assign a subscription, 12 month terms - by posting to https://api.upodi.io/v2/subscriptions

{
  "subscriptionnumber" : "SUB-01000",
  "customerid" : "- customer id returned from above",
  "productplanid" : "- guid of plan -",
  "startdate" : "2016-01-01",
  "enddate" : "2017-01-01",
  "autorenew" : true,
  "initialterminterval" : 1, /* 1 year */
  "initialtermperiod" : 500, /* year(s) */
  "renewalterminterval" : 1, /* 1 year */
  "renewaltermperiod" : 500 /* year(s) */
}

Step 3 - Set the amount (20 in this example) of the subscription by PUT to https://api.upodi.io/v2/subscriptionCharges/{id}/setamount/.

The id is the newly created id of the subscription charge associated by the subscription issuance.

{
  "20"
}

Step 4 - Activate the subscription to immediately start chargining for the 20 users - PUT to https://api.upodi.io/v2/subscriptions/{id}/activate/ - id is the subscription id from step 2.