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

# Understand how PayPal bills customers

<div className="m-badge-page-wrapper">
  <Badge stroke color="orange" size="sm">Limited Release</Badge>
</div>

After you record events and meter usage, PayPal converts this metered data into charges, generates invoices, and bills your customer. PayPal follows a payment priority system that decides how to capture payments.

## Billing process

* **Usage recording**: You send usage events to PayPal as they happen or in batches.
* **Data aggregation**: PayPal stores and aggregates these events according to your metrics.
* **Charge calculation**: Based on the subscription's billing cycle, PayPal uses the aggregated usage data to calculate charges.
* **Payment capture**: PayPal follows a [payment priority system](#payment-priority-system) to capture payment.

## Payment priority system

PayPal follows a specific order when collecting payment from customers. This priority system ensures customers get the benefit of available credits before charging their payment methods.

**Payment processing order**

1. **Credit notes**: PayPal first applies any available credit notes with `AVAILABLE` status. These represent refunds or adjustments you've issued to customers for disputes or billing corrections.

2. **Billing credits**: PayPal then checks for billing credits in the customer's wallet. When charging from billing credits, if there are multiple invoices for a customer, PayPal applies the billing credits to the invoice whose status moves to `FINALIZED` first. If there are available credits, PayPal uses the billing credits to charge customers based on the wallet's applicability scope. For more information, see <a href="/limited-release/usage-based-billing/set-up-billing-process/offer-billing-credits" target="_blank" rel="noopener noreferrer">Offer billing credits</a>.
   * **Sufficient credits**: If the wallet has enough credits to cover the full invoice, PayPal deducts the entire amount from the billing credits.
   * **Partial credits**: If the wallet has insufficient credits, PayPal uses all available billing credits first, then charges the remaining amount to the payment method.
   * **No credits**: If the wallet is empty, PayPal skips billing credits and charges the full amount to the payment method.

3. **Payment method**: PayPal charges the customer's payment method for any remaining amount after applying credits, or for the full invoice amount if no credits are available.

### Billing calculation example

Consider a customer with a \$100 invoice who has both credit notes and billing credits available:

```
Invoice subtotal: $100
Credit notes applied: -$50 (from previous refunds)
Billing credits applied: -$25 (from customer's wallet)
Final amount due: $25 (charged to the customer's payment method)
```
