Process renewals
defrr_process_renewalUse when customers renew and you need the renewal worked out: send each contract's terms as they stand, and the renewal's end date and the price for the renewal term. Returns the renewal term and how its price compares with the term before it (in total and per month, since a renewal can be a different length), the billing entry to post, the revised month-by-month schedule, and the total to post by month. With the latest closed month, a renewal processed after it started has its billing and catch-up revenue posted in the first open month instead. The renewal is recognised on the contract's own basis: a different basis is a new contract (defrr_create_contract). Up to 50 renewals per call, each with your own id. Costs 1 credit per renewal (refunded if the call fails). Nothing you send is stored.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| renewals | Yes | The renewals to process, up to 50. Each is charged 1 credit. | |
| lockedThrough | No | The latest month already closed for changes, as YYYY-MM. Revenue in that month and earlier cannot be changed, so the correction is posted in the next month. Leave out or null if no month is closed. |