Update a specific setting - Billing Rules
Learn how to update the values of the Billing Rules settings by the Settings API.
Use the List all settings operation to retrieve all the available settings and supported operations of them.
Search for “Billing Rules” and find the following information from the response body of the “List all settings” call.
{"settings": [...,{"key": "BillingRules","description": "Billing Rules settings","context": "Entity","pathPattern": "/billing-rules","httpOperations": [...,{"method": "PUT","url": "/settings/billing-rules","parameters": [],"requestType": {"$ref": "#/definitions/BillingRules","definitions": {"BillingRules": {"additionalProperties": false,"type": "object","properties": {"includeNegativeInvoice": {"type": "boolean"},"prorationUnit": {"type": "string","enum": ["ProrateByDay","ProrateByMonthFirst"]},"prorateUsageWeeklyCharges": {"type": "boolean"},"preGenerateInvoicePdf": {"type": "boolean"},"notSendZeroItemsForTax": {"type": "boolean"},"availableToCreditValidationLevel": {"type": "string"},"timeOfDailyInvoice": {"maximum": 23,"type": "integer","minimum": 0},"invoicePastEndOfTerm": {"description": "Invoice Past End-of-Term when Auto-Renew is OFF","type": "boolean"},"oneTimeCreditBack": {"type": "boolean"},"taxInclusiveRoundingRule": {"type": "string","enum": ["RoundingNetAmount","RoundingTaxAmount"]},"billToTermEndWhenAutoRenew": {"description": "Invoice Past End-of-Term when Auto-Renew is ON","type": "boolean"},"includeChildUsage": {"type": "boolean"},"allowAutoPostBillRun": {"type": "boolean"},"taxAddressOwner": {"type": "string","enum": ["SubscriptionOwner","InvoiceOwner"]},"recurringChargeStyle": {"type": "string","enum": ["Advanced","Arrears","DependsOnRatePlan"]},"prorateUsageMonthlyCharges": {"type": "boolean"},"takeContactSnapshot": {"type": "boolean"},"autoPostBillRunDefaultValue": {"type": "boolean"},"prorateRecurringMonthlyCharges": {"type": "boolean"},"proratePeriodOfRecurringCharge": {"description": "Prorate recurring charges for partial period","type": "boolean"},"daysInMonth": {"type": "string","enum": ["Assume30Days","UseActualDays"]},"legalDocumentGeneratingRule": {"type": "string","enum": ["GroupbyChargedAmountSign","GroupByOriginalSRPC","GroupByTotalAmountSign"]},"prorateRecurringWeeklyCharges": {"type": "boolean"},"transactionOnSubscription": {"type": "boolean"},"numberAssignmentTiming": {"type": "string"},"taxRateChangeOption": {"type": "string"},"rateUsageIndividually": {"type": "boolean"}}}}},"responseType": {"$ref": "#/definitions/BillingRules","definitions": {"BillingRules": {"additionalProperties": false,"type": "object","properties": {"includeNegativeInvoice": {"type": "boolean"},"prorationUnit": {"type": "string","enum": ["ProrateByDay","ProrateByMonthFirst"]},"prorateUsageWeeklyCharges": {"type": "boolean"},"preGenerateInvoicePdf": {"type": "boolean"},"notSendZeroItemsForTax": {"type": "boolean"},"availableToCreditValidationLevel": {"type": "string"},"timeOfDailyInvoice": {"maximum": 23,"type": "integer","minimum": 0},"invoicePastEndOfTerm": {"description": "Invoice Past End-of-Term when Auto-Renew is OFF","type": "boolean"},"oneTimeCreditBack": {"type": "boolean"},"taxInclusiveRoundingRule": {"type": "string","enum": ["RoundingNetAmount","RoundingTaxAmount"]},"billToTermEndWhenAutoRenew": {"description": "Invoice Past End-of-Term when Auto-Renew is ON","type": "boolean"},"includeChildUsage": {"type": "boolean"},"allowAutoPostBillRun": {"type": "boolean"},"taxAddressOwner": {"type": "string","enum": ["SubscriptionOwner","InvoiceOwner"]},"recurringChargeStyle": {"type": "string","enum": ["Advanced","Arrears","DependsOnRatePlan"]},"prorateUsageMonthlyCharges": {"type": "boolean"},"takeContactSnapshot": {"type": "boolean"},"autoPostBillRunDefaultValue": {"type": "boolean"},"prorateRecurringMonthlyCharges": {"type": "boolean"},"proratePeriodOfRecurringCharge": {"description": "Prorate recurring charges for partial period","type": "boolean"},"daysInMonth": {"type": "string","enum": ["Assume30Days","UseActualDays"]},"legalDocumentGeneratingRule": {"type": "string","enum": ["GroupbyChargedAmountSign","GroupByOriginalSRPC","GroupByTotalAmountSign"]},"prorateRecurringWeeklyCharges": {"type": "boolean"},"transactionOnSubscription": {"type": "boolean"},"numberAssignmentTiming": {"type": "string"},"taxRateChangeOption": {"type": "string"},"rateUsageIndividually": {"type": "boolean"}}}}}}]}]}
You can find the following information about the Billing Rules setting:
-
PUT operation endpoint of for the Billing Rules setting:
"url": "/settings/billing-rules" -
The request and response schema, which is the same in this case:
"BillingRules": {"additionalProperties": false,"type": "object","properties": {"includeNegativeInvoice": {"type": "boolean"},"prorationUnit": {"type": "string","enum": ["ProrateByDay","ProrateByMonthFirst"]},"prorateUsageWeeklyCharges": {"type": "boolean"},"preGenerateInvoicePdf": {"type": "boolean"},"notSendZeroItemsForTax": {"type": "boolean"},"availableToCreditValidationLevel": {"type": "string"},"timeOfDailyInvoice": {"maximum": 23,"type": "integer","minimum": 0},"invoicePastEndOfTerm": {"description": "Invoice Past End-of-Term when Auto-Renew is OFF","type": "boolean"},"oneTimeCreditBack": {"type": "boolean"},"taxInclusiveRoundingRule": {"type": "string","enum": ["RoundingNetAmount","RoundingTaxAmount"]},"billToTermEndWhenAutoRenew": {"description": "Invoice Past End-of-Term when Auto-Renew is ON","type": "boolean"},"includeChildUsage": {"type": "boolean"},"allowAutoPostBillRun": {"type": "boolean"},"taxAddressOwner": {"type": "string","enum": ["SubscriptionOwner","InvoiceOwner"]},"recurringChargeStyle": {"type": "string","enum": ["Advanced","Arrears","DependsOnRatePlan"]},"prorateUsageMonthlyCharges": {"type": "boolean"},"takeContactSnapshot": {"type": "boolean"},"autoPostBillRunDefaultValue": {"type": "boolean"},"prorateRecurringMonthlyCharges": {"type": "boolean"},"proratePeriodOfRecurringCharge": {"description": "Prorate recurring charges for partial period","type": "boolean"},"daysInMonth": {"type": "string","enum": ["Assume30Days","UseActualDays"]},"legalDocumentGeneratingRule": {"type": "string","enum": ["GroupbyChargedAmountSign","GroupByOriginalSRPC","GroupByTotalAmountSign"]},"prorateRecurringWeeklyCharges": {"type": "boolean"},"transactionOnSubscription": {"type": "boolean"},"numberAssignmentTiming": {"type": "string"},"taxRateChangeOption": {"type": "string"},"rateUsageIndividually": {"type": "boolean"}}}
Make PUT request at the endpoint /settings/billing-rules.
HTTP request:
PUT https://rest.zuora.com/settings/billing-rules
Request body:
See the following request body example:
{"oneTimeCreditBack": false,"prorateRecurringWeeklyCharges": false,"prorateUsageMonthlyCharges": false,"prorateUsageWeeklyCharges": true,"daysInMonth": "Assume30Days"}
Response body:
See the following example for the 200 response body.
{"oneTimeCreditBack": false,"prorateRecurringWeeklyCharges": false,"prorateRecurringMonthlyCharges": true,"prorateUsageMonthlyCharges": false,"prorateUsageWeeklyCharges": true,"daysInMonth": "Assume30Days","prorationUnit": "ProrateByDay","allowAutoPostBillRun": false,"autoPostBillRunDefaultValue": false,"includeNegativeInvoice": false,"transactionOnSubscription": false,"takeContactSnapshot": false,"recurringChargeStyle": "Advanced","preGenerateInvoicePdf": true,"timeOfDailyInvoice": 0,"invoicePastEndOfTerm": false,"billToTermEndWhenAutoRenew": false,"zuoraTaxRoundingDiffDispersion": false,"numberAssignmentTiming": "Generating","creditMemoMirroringInvoiceItemsRule": "YesExceptForZeroItems","debookRebookSupportable": false,"allowIndistinctMapping": false,"invoiceSplit": false,"sequentialInvoiceNumber": false,"consolidateInvoices": false,"discountCreditProration": false,"zuoraNumberFormatForMergeField": false}