New in Chargebee: Explore Reveal and understand your payment performance end-to-end.Try Now
Docschargebee docs
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
  • Usage Alerts
  • 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
  • eInvoicing
  • 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. Integrations
  3. Articles and FAQ
  4. Salesforce
  1. Billing
  2. Integrations
  3. Articles and FAQ
  4. Salesforce

Why aren't unpaid invoices written off for canceled subscriptions via API?

Scope

While using the Salesforce API to cancel subscriptions in Chargebee, you might encounter an issue where unpaid invoices are not automatically written off, even if you have enabled the site-wide setting for this purpose. This typically occurs when the API call does not include the necessary parameters to trigger the write-off process.

Solution

To ensure that unpaid invoices are automatically written off when a subscription is canceled via the Salesforce API, follow these steps:

  1. Verify Site-wide Settings: Ensure that the site-wide setting to automatically write off unpaid invoices for canceled subscriptions is enabled.
  • Navigate to Settings > Configure Chargebee > Billing Rules.
  • Check the option for "Automatically write off unpaid invoices for canceled subscriptions."
  1. Modify API Call: Include the account_receivables_handling parameter in your Salesforce API call when canceling a subscription.
  • This parameter is crucial for triggering the write-off process.
  • Example API call snippet:
    {
      "subscription_id": "sub_123456",
      "contract_term": {
        "action_at_term_end": "cancel",
        "account_receivables_handling": "write_off"
      }
    }
    
  1. Test the API Call: After modifying the API call, perform a test to ensure that the unpaid invoices are written off as expected.
  • Use a test subscription to verify the behavior.
  1. Review API Documentation: Familiarize yourself with the Chargebee API documentation to understand all available parameters and their effects.
  • Refer to the API documentation for detailed information.

Important Notes

  • Ensure that your API integration is updated to include the account_receivables_handling parameter for all relevant calls.
  • Regularly review your integration settings and API calls to prevent similar issues.
  • If the issue persists after following these steps, contact Chargebee support for further assistance.

Related Articles

Salesforce - Subscription ID not being passed to the opportunity page
Is it possible for Salesforce to use read-only API key for syncronization?
Contract terms are enabled in Chargebee but they are not visible on CB subscription - Salesforce
How to create/update subscription using Salesforce Flow Builder?
How can I add CB quotes as a tab in Salesforce?
Subscription creation on renewal opportunity
'Sync Rule for Opportunities in Salesforce: Allow Chargebee to update the opportunity products in Salesforce with subscription''s products in Chargebee setting'
Salesforce- populate Customer.Billing_Address.Company
Business Entity is not showing up for selection in Chargebee Settings of Salesforce

Show more

Was this article helpful?