Create Price Override

This action creates a price override on a Subscription Product. The override modifies the price which will be charge from that point forward when the product charges or quantity increases and is purchased.

Request Parameters

PropertyTypeDescriptionRequired
chargeAmountDecimalThe amount of the topmost price range.Optional
priceRangesList of objects. Defined belowA list of quantity ranges to determine pricing.Optional
pricingModelTypeEnum: {Standard, Stairstep, Volume, or Tiered}Dictates how the price is calculated using the quantity.Optional
idIntegerThe Fusebill generated ID that uniquely identifies the subscription product the override applies toYes

Price Ranges Fields

PropertyTypeDescription
minDecimalThe lower bound of the range
maxDecimalThe upper bound of the range. Null is interpreted as infinity
priceDecimalThe price for this range
Examples
curl -X POST "https://secure.fusebill.com/v1/SubscriptionProductPriceOverrides" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{id:{subscriptionProductId},chargeAmount:15.99,priceRanges:[{min:1.0,max:3.0,price:17.99},{min:3.0,max:null,price:15.99}],pricingModelType:'Volume'}"
//Json Payload
string jsonData = "{id:{subscriptionProductId},chargeAmount:15.99,priceRanges:[{min:1.0,max:3.0,price:17.99},{min:3.0,max:null,price:15.99}],pricingModelType:'Volume'}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/SubscriptionProductPriceOverrides/");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "POST";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
payload = {'id':{subscriptionProductId},'chargeAmount':15.99,'priceRanges':[{'min':1.0,'max':3.0,'price':17.99},{'min':3.0,'max':None,'price':15.99}],'pricingModelType':'Volume'}
#Pass in your URI, Payload and Headers
r = requests.post('https://secure.fusebill.com/v1/subscriptionProductPriceOverrides', data=json.dumps(payload), headers=headers)
print(r.content)
{
  "Id": 123456789,
  "chargeAmount": 10,
  "priceRanges": [
    {
      "min": 0,
      "max": null,
      "amount": 10
    }
  ],
  "pricingModelType": "Standard"
}
Response
This call returns 204 No Content upon success
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Unable to determine stair step"
        }
    ]
}
Language
Authorization