> ## Documentation Index
> Fetch the complete documentation index at: https://developer.transactbridge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Credit adjustments

# Credit Adjustment on a Prorated Basis

Proration adjusts subscription charges when a plan or service state changes before the current billing cycle ends. Instead of
charging the full amount again, the system calculates the unused value of the current plan and the cost of the new plan or
service period for the remaining days.

* **Day-based calculation**: The `prorate` value on each subscription item enables TransactBridge to calculate the charge
  according to the number of days actually consumed.
* **Net payable**: The customer pays only the difference when the new cost is higher than the unused credit.
* **Credit balance**: When the unused value is higher, the balance can be added to the customer's credit(which can be made
  visible on merchant dashboard) and later applied to another invoice, or shown separately, based on the merchant's policy.
* **Billing anchor use case**: When invoices are always generated on a fixed date, proration ensures that the initial partial
  period is billed fairly.
* **Pause/resume use case**: The merchant may charge only for active days or create a prorated credit.
* **Upgrade/downgrade use case**: The merchant can grant immediate access to the new plan and calculate the charge or
  credit for the remaining period.

**For example**:
A monthly subscription is paused on the 15th and resumed on the 30th. Depending on the merchant's policy, the
customer may be charged only for the active days, or a credit may be created for the unused period.

```text theme={null}
Calculation
Prorate= 1.1 (Merchant shares it upfront in the prorate parameter,
 that means 10% extra cost as prorate is used.)
Basic plan= 500/month
Total no of days=30
No of days for which services were used= 15 days
Credit used is= (500/30)*1.1*15=275 Rs
500-275=225 will be credited.
```

**This is handled by Transact Bridge**

# Credit Adjustment for GST-Inclusive Plans

When a subscription plan is downgraded during an active billing cycle, the unused amount from the current plan can be adjusted against the cost of the downgraded plan for the remaining days of the billing cycle.

### Example

Assume the following:

* **GST:** 18%

* **Billing frequency:** Monthly

* **Original plan price:** ₹500 (GST-inclusive)

* **Subscription start date:** September 1

* **Plan downgrade date:** September 15

* **Days in billing cycle:** 30

* **STEP 1:** Calculate the base amount of the original plan

Since the plan price of ₹500 is GST-inclusive:

**Base Amount = ₹500 / 1.18 = ₹423.72**

* **STEP 2:** Calculate the consumed amount for the first 15 days

The daily base cost is:

**₹423.72 / 30 = ₹14.12 per day**

Assuming a **10% proration adjustment factor**, the prorated cost for 15 days is:

**₹14.12 × 15 × 1.10 = ₹233.05**

Therefore, **₹233.05** is considered the amount consumed during the first 15 days of the billing cycle.

* **STEP 3:** Calculate the unused balance from the original plan

The unused balance is calculated as:

**₹423.72 − ₹233.05 = ₹190.67**

Therefore, **₹190.67** is the remaining balance from the original plan.

* **STEP 4:** Calculate the cost of the downgraded plan

The downgraded plan costs **₹300 (GST-inclusive)**.

Its base amount is:

**₹300 / 1.18 = ₹254.24**

The daily base cost is:

**₹254.24 / 30 = ₹8.47 per day**

The prorated cost for the remaining 15 days is:

**₹8.47 × 15 × 1.10 = ₹139.75**

* **STEP 5:** Calculate the credit adjustment

The credit adjustment is the difference between the unused balance from the original plan and the prorated cost of the downgraded plan:

**₹190.67 − ₹139.75 = ₹50.92**

Therefore, a **credit adjustment of ₹50.92** is generated for the customer.

The credit can be applied to the customer's next billing cycle, according to the subscription's billing configuration.

## Credit Adjustment for GST-Exclusive Plans

When a subscription plan is downgraded during an active billing cycle, the unused amount from the current plan can be adjusted against the cost of the downgraded plan for the remaining days of the billing cycle.

In a **GST-exclusive** configuration, the plan price represents the taxable/base amount, and GST is calculated separately on the applicable amount.

### Example

Assume the following:

* **GST:** 18%

* **Billing frequency:** Monthly

* **Original plan price:** ₹500 (GST-exclusive)

* **Subscription start date:** September 1

* **Plan downgrade date:** September 15

* **Billing cycle:** 30 days

* **Proration factor:** 1.10 (10% additional proration adjustment)

* **STEP 1**: Calculate the total amount for the original plan

Since the original plan price of ₹500 is GST-exclusive:

**Base Amount = ₹500**

**GST = ₹500 × 18% = ₹90**

**Total Amount = ₹500 + ₹90 = ₹590**

* **STEP 2**: Calculate the consumed amount for the first 15 days

The daily base cost is:

**₹500 / 30 = ₹16.67 per day**

The prorated base cost for 15 days is:

**₹16.67 × 15 × 1.10 = ₹275.05**

Therefore, **₹275.05** of the base plan amount is considered consumed during the first 15 days.

* **STEP 3**: Calculate the unused balance from the original plan

The unused base amount is:

**₹500 − ₹275.05 = ₹224.95**

* **STEP 4**: Calculate the cost of the downgraded plan

The merchant downgrades the subscription to a plan priced at **₹300 (GST-exclusive)** on September 15.

**Base Amount = ₹300**

The daily base cost of the downgraded plan is:

**₹300 / 30 = ₹10.00 per day**

The prorated base cost for the remaining 15 days is:

**₹10.00 × 15 × 1.10 = ₹165.00**

* **STEP 5**: Calculate the credit adjustment

The credit adjustment is calculated by subtracting the prorated cost of the downgraded plan from the unused balance of the original plan:

**₹224.95 − ₹165.00 = ₹59.95**

Therefore, a **credit adjustment of ₹59.95** is generated for the customer.

The credit can be applied to the customer's next billing cycle, according to the subscription's billing configuration.

<Note>
  **The credit adjustment is made without GST** in both GST-inclusive and GST-exclusive configurations. The applicable GST is calculated separately based on the subscription's billing configuration.
</Note>

<Note>
  * **Credit Adjustment When a Subscription Is Canceled**

  If the subscription is canceled after the plan change, any applicable unused balance is calculated based on the consumed and remaining portion of the billing cycle.

  The resulting credit adjustment can be applied according to the merchant's configured cancellation and credit adjustment policy.
</Note>

<Note>
  * **Credit Adjustment When a Subscription Is Paused and Unpaused**

  If a subscription is paused during a billing cycle, the days for which the subscription remains paused are excluded from the applicable subscription usage calculation.

  For example:

  * **Subscription paused:** September 10
  * **Subscription resumed:** September 20
  * **Paused period:** 10 days

  The applicable credit adjustment for the **10 paused days** is calculated and applied based on the subscription's billing configuration.
</Note>

<Note>
  * **Credit Adjustment when a subscription remains paused until renewal**

  If a subscription is paused and remains paused when the next renewal date is reached, the credit adjustment for the applicable paused period is calculated as part of the billing cycle.

  The resulting credit can be carried forward and applied to a future billing cycle when the subscription resumes, based on the subscription's billing configuration.
</Note>
