Docschargebeedocs

HomeBillingPaymentsRevRecGrowthReveal
Support

Product Updates


  • Release Notes

Getting Started


  • Overview
  • Chargebee Billing Data Centers
  • Object Relationship Model
  • Understanding Sites
  • Chargebee Tech Glossary
  • Articles and FAQ

Implementing Chargebee


  • Implementation Guide
  • Go-live Checklist
  • Articles and FAQ

AI in Chargebee


  • Chargebee Agents
  • Chargebee Copilot
  • Chargebee MCP Server (Model Context Protocol)

Developer Resources


  • Developer Resources Overview
  • Articles and FAQ

Product Catalog


  • Product Catalog Overview
  • Coupons
  • Articles and FAQ

Subscriptions


  • Working with Subscriptions
  • Billing
  • Orders
  • Articles and FAQ

Customers


  • Managing Customers
  • Account Hierarchy
  • Email Notifications
  • Branding
  • Configure Multiple Languages
  • Articles and FAQ

Entitlements


  • Entitlements Overview
  • Features Overview
  • Feature Management
  • Managing Product Entitlements
  • Subscription Entitlements
  • Customer Entitlements
  • Grandfathering Entitlements
  • Articles and FAQ

Usage Based Billing


  • Understanding Usages
  • Setting up Usage Based Billing
  • Metered Billing
  • Articles and FAQ

Chargebee CPQ


  • Chargebee CPQ
  • Chargebee CPQ for Salesforce
  • Chargebee CPQ for HubSpot

Invoices, Credit Notes, and Quotes


  • Invoices
  • Credit Notes
  • Quotes [Legacy]
  • Transactions
  • Articles and FAQ

Taxes


  • Overview
  • Configuring Taxes
  • Country-specific Taxes
  • Articles and FAQ

Hosted Capabilities


  • Overview
  • Hosted Checkout
  • Hosted Self-Serve Portal
  • Hosted Pages Features
  • Additional Hosted Pages
  • Payment Components
  • Pricing Table
  • Managing Payments with Chargebee.js
  • Mobile-Optimized Hosted Pages
  • Articles and FAQ

Site Configuration


  • Users & Roles
  • Custom Fields & Metadata
  • Approvals
  • Mandatory Fields
  • File Attachments & Comments
  • Advanced Filter Options
  • Multicurrency Pricing
  • Multi-decimal Support
  • Configuring Reason Codes
  • Events and Webhooks
  • API Keys
  • Time Zone
  • Time Machine
  • Transfer Configurations
  • Articles and FAQ

Multi Business Entity


  • Multi Business Entity Overview
  • Customer Transfer Overview
  • Articles and FAQ

Mobile Subscriptions


  • Overview
  • Omnichannel Subscriptions
  • Omnichannel One-Time Orders
  • Mobile Subscriptions (Legacy)

Reports and Analytics


  • RevenueStory
  • Home Dashboard
  • Frequently Asked Questions
  • FAQs for Classic Reports Sunset
  • Articles and FAQ

Integrations


  • Sales
  • Customer Support and Success
  • Finance
  • Tax
  • Marketing
  • Stitch
  • Collaboration
  • Contract Management
  • Ecommerce Management
  • Articles and FAQ

Data Privacy & Security


  • Two Factor Authentication
  • SAML Single Sign-On
  • System for Cross-Domain Identity Management (SCIM)
  • EU-GDPR
  • Consent Management
  • Personal Data Management
  • Compliance Certificates
  • HIPAA Guidelines
  • PCI Recommendations and Integration Types
  • Articles and FAQ

Data Operations


  • Bulk Operations
  • Migration
  • Articles and FAQ
  1. Billing
  2. Getting Started
  3. Articles and FAQ
  4. Accessing Chargebee
  1. Billing
  2. Getting Started
  3. Articles and FAQ
  4. Accessing Chargebee

How to prorate credit when canceling contract terms via API?

Scope

How to provide prorate refund on immediate contract terms cancellation using API?

Why am I able to prorate refunds on cancelling contract terms via UI but not via API?

Summary

By default a subscription in contract term can be cancelled via UI, API and Portal; however, processing a prorate credits while cancelling immediately is available only via UI and API as it is restricted on the portal. If you would like to customize the front end on your site, you can use the below parameters to process prorated credit on immediate contract cancellation.

cancel_option= immediately credit_option_for_current_term_charges= prorate refundable_credits_handling= schedule_refund

Solution

Ideally, a subscription that is created on contract for a specific number of billing cycles should not be cancelled during the contract term. It kills the purpose of creating contract terms. However, a merchant can cancel their customer's subscription on contract via UI (screenshot for reference)

image

But if you allow the customer to cancel the subscription on contract via portal, they will be able to terminate only at the end of the contract term as per the configuration.

image

Contract cancellation via Portal

image

If you would like to customize it, you can use an API call and pass the below parameters, which allow the users to cancel the contract immediately and process prorated credits.

--data-urlencode 'cancel_option=immediately' \ --data-urlencode 'credit_option_for_current_term_charges=prorate' \ --data-urlencode 'refundable_credits_handling=schedule_refund' \

Please refer to this link for more details.

Related Articles

How to find updates in Chargebee?
How to contact Chargebee's support team
What is Chargebee?
What is Chargebee's pricing?
How do I cancel my Chargebee account?
Chargebee Signup, Email Verification & Account Claim Process.
How can I change my Chargebee account password?
Can we change the organization address?
Change existing domain name

Show more

Was this article helpful?