Create subscription-based commitment
1 min
POST
https://app.amberflo.io/payments/pricing/amberflo/customer-commitment/subscription_commitment
bodyobjectSubscription contract generator configuration for recurring billing commitments with subscription-based pricing and usage integration
200Subscription commitment successfully created
400Bad request - invalid subscription parameters or billing configuration
403Forbidden - customer not eligible for subscription commitment terms
409Conflict - subscription commitment conflicts with existing billing agreements
curl --request POST \
--url https://app.amberflo.io/payments/pricing/amberflo/customer-commitment/subscription_commitment \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"type": "subscription_commitment",
"customerId": "",
"planId": "",
"planOverrideGenerator": {
"type": "custom_pricing_plan",
"id": "",
"billingPeriod": {},
"planName": "",
"entitlements": [
{
"id": "",
"apiName": ""
}
],
"priceGenerators": {
"dimensionKeys": [],
"productItemId": "",
"priceTiers": [
{
"leafNodeType": ""
}
],
"type": "cost_plus_dimension"
},
"invoiceBasedFees": {
"type": "constant_invoice_ratio_fee"
}
},
"label": "",
"cycles": 0,
"exitClauses": {
"type": "termination_grace_period",
"gracePeriodInDays": 0
}
}'