Cancel a subscription order
1 min
DELETE
https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/subscription-orders/cancel
Responses
200
- payment.pricing.customer.CustomerSubscriptionOrder.out
- customerIdstringrequiredDescription
- idstringrequiredDescription
- orderItemspayment.pricing.customer.SubscriptionOrderItem.out[]requiredDescription
- idstringDescription
- quantitynumberrequiredDescription
- resourceIdstringDescription
- dimensionsmap<string, string>Description
- totalPricenumberDescription
- productItemIdstringrequiredDescription
- productPlanIdstringrequiredDescription
- appliedTimeRangepayment.common.TimeRange.outDescription
- startTimeInSecondsinteger<int64>
- endTimeInSecondsinteger<int64>
- billingPeriodsinteger<int32>Description
- labelstringDescription
- subscriptionSettingspayment.pricing.subscription_orders.SubscriptionPriceSettings.outDescription
- cancellationRulepayment.pricing.subscription_orders.CancellationRule.outrequiredDescription
- chargeExecutionpayment.pricing.subscription_orders.ChargeExecution.outrequiredDescription
- purchaseRulepayment.pricing.subscription_orders.PurchaseRule.outrequiredDescription
- subscriptionRatepayment.pricing.price.UsageGranularity.outrequiredDescription
- isPricedPerRatebooleanDescription
- isCancellablebooleanDescription
- addedTimeInSecondsinteger<int64>Description
- commitmentIdstringDescription
- prepaidUrisstring[]Description
- removedTimeInSecondsinteger<int64>Description
- removalContextmap<string, string>Description
curl
curl --request DELETE \
--url https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/subscription-orders/cancel \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/subscription-orders/cancel", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/subscription-orders/cancel")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/subscription-orders/cancel"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
200
// Successful request
{
"customerId": "",
"id": "",
"orderItems": [
{
"id": "",
"quantity": 0,
"resourceId": "",
"dimensions": "",
"totalPrice": 0
}
],
"productItemId": "",
"productPlanId": "",
"appliedTimeRange": {
"startTimeInSeconds": "",
"endTimeInSeconds": ""
},
"billingPeriods": "",
"label": "",
"subscriptionSettings": {
"cancellationRule": "",
"chargeExecution": "",
"purchaseRule": "",
"subscriptionRate": "",
"isPricedPerRate": false,
"isCancellable": false
},
"addedTimeInSeconds": "",
"commitmentId": "",
"prepaidUris": [
""
],
"removedTimeInSeconds": "",
"removalContext": ""
}