---
schema_version: "1"
id: 326e587a12b805aed6a507858dec427334a1a63ed8c63afa3ccd5f62d34ba1fb
title: Payment Batch Run Overview
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/billing_payment_batch_run_overview.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.billing_payment_batch_run_overview.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c02189fa7613567f2bd29bafc6e318719e2924944f135893546cc4c769eaf789
description: At the start time of the payment scheduler, payment batch runs start processing payment schedule items based on the defined criteria.
products:
  - Revenue Cloud
release: "264"
---
# Payment Batch Run Overview

At the start time of the payment scheduler, payment batch runs start processing payment schedule items based on the defined criteria.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions with Revenue Cloud</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">To integrate a native payment gateway, you have two options. Use Salesforce Payments, which runs on Stripe and is available with the <a href="https://help.salesforce.com/s/articleView?id=ind.revenue_licenses_areas_and_features.htm&amp;release=264.0.0&amp;type=5">the Revenue Cloud Billing license</a> on a cost-per-transaction basis. Or, connect your own Adyen account, contracted directly with Adyen.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">&nbsp;</td></tr></tbody></table>

## Process Overview

Understand the steps involved in processing payment schedule items and applying the corresponding payments.

- Payment batch runs process Payment Schedule Item records that are in the Ready for Processing status and are related to Payment Schedule records that are in the Open status.
- A Payment record is created for each payment schedule item that’s successfully processed.
- The payment batch run then applies the Payment record to the corresponding Invoice or Invoice Line record based on the [payment application level](https://help.salesforce.com/s/articleView?id=ind.billing_setup_salesforce_payments_features.htm&release=264.0.0&type=5 "Set up Payments to streamline the management of the entire payment lifecycle. By establishing a secure connection with native and third-party payment providers, you can directly process payments for customer transactions within your Salesforce environment.").

Billing applies payments based on the descending order of invoice line balances, that is, a payment is first applied to an invoice line with the highest balance.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-revenue-264-0-0-production-enus/91ca99c6-d5c8-4986-b961-c6b7801e0d0d/images/icon_note.png)

Note Payments can only be applied to invoices of the same currency.

## Payment Methods

For automatically created payment schedules and payment schedule items, the payment gateway collects payments by using the default saved payment method.

For manually created payment schedules and payment schedule items, the payment gateway collects payments by using the most recently created saved payment method for the account that’s related to the invoice.

## Statuses of Payment Schedules and Payment Schedule Items

The status of the payment schedule item is updated at various stages of the payment batch run.

 
| Payment Batch Run Stage | Payment Schedule Item Status |
| --- | --- |
| A payment batch run picks up the payment schedule item for processing. | Processing |
| A payment batch run completes collecting the amount of the payment schedule by using the merchant account. | Processed |
| A payment batch run applies the payment schedule item to an invoice or invoice line. | Applied |
| A payment batch run fails to process the payment schedule. | Failed |
| A payment batch run fails to apply the payment schedule item to an invoice or invoice line. | Apply Failed |
| A payment batch run successfully processes a payment schedule. | Completed |
| The balance of the corresponding invoice is less than that of the payment schedule line. | Canceled |

## Results of Payment Application

After payments are collected and applied, Billing automatically creates and updates these fields and records.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:25%">
          <col style="width:25%">
          <col style="width:25%">
          <col style="width:25%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d208280e229">Payment Application Level</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d208280e232">Updated Payment Schedule and Payment Schedule Item Fields</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d208280e235">Updated Invoice Fields</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d208280e238">New Records</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Payment Application Level" class="slds-cell-wrap" style="vertical-align:top;" headers="d208280e229 ">Invoice</td>

            <td data-label="Updated Payment Schedule and Payment Schedule Item Fields" class="slds-cell-wrap" style="vertical-align:top;" headers="d208280e232 ">
              <p>Payment Schedule fields:</p>
              <ul>
                <li>Status changes to Completed</li>

                <li>Total Processed Amount</li>

                <li>Remaining Amount To Be Processed </li>

                <li>Total Applied Amount</li>

              </ul>
              <p>Payment Schedule Item fields:</p>
              <ul>
                <li>Status changes to Applied</li>

                <li>Processed Amount</li>

                <li>Payment Source</li>

                <li>Last Payment Gateway Log</li>

                <li>Payment Gateway Log Number</li>

              </ul>
            </td>

            <td data-label="Updated Invoice Fields" class="slds-cell-wrap" style="vertical-align:top;" headers="d208280e235 ">
              <ul>
                <li>Balance</li>

                <li>Net Payments Applied if the Settlement Status is Settled</li>

                <li>Settlement Status changes to Partially Settled or Settled based on the applied
                  payment amount</li>

                <li>Full Settlement Date if the Settlement Status is Settled</li>

                <li>Settlement Level changes to Invoice</li>

                <li>Saved Payment Method</li>

              </ul>
            </td>

            <td data-label="New Records" class="slds-cell-wrap" style="vertical-align:top;" headers="d208280e238 ">
              <ul>
                <li>A Payment record is created after payment is collected using the merchant
                  account.</li>

                <li>A Payment Line Invoice record is created after the payment is applied to an
                  invoice.</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Payment Application Level" class="slds-cell-wrap" style="vertical-align:top;" headers="d208280e229 ">Invoice Line</td>

            <td data-label="Updated Payment Schedule and Payment Schedule Item Fields" class="slds-cell-wrap" style="vertical-align:top;" headers="d208280e232 ">
              <p>Payment Schedule fields:</p>
              <ul>
                <li>Status changes to Completed</li>

                <li>Total Processed Amount</li>

                <li>Remaining Amount To Be Processed </li>

                <li>Total Applied Amount</li>

              </ul>
              <p>Payment Schedule Item fields:</p>
              <ul>
                <li>Status changes to Applied</li>

                <li>Processed Amount</li>

                <li>Payment Source</li>

                <li>Last Payment Gateway Log</li>

                <li>Payment Gateway Log Number</li>

              </ul>
            </td>

            <td data-label="Updated Invoice Fields" class="slds-cell-wrap" style="vertical-align:top;" headers="d208280e235 ">
              <ul>
                <li>Balance</li>

                <li>Net Payments Applied if the Settlement Status is Settled</li>

                <li>Settlement Status changes to Partially Settled or Settled based on the applied
                  payment amount</li>

                <li>Full Settlement Date if the Settlement Status is Settled</li>

                <li>Settlement Level changes to Invoice Line</li>

                <li>Saved Payment Method</li>

              </ul>
            </td>

            <td data-label="New Records" class="slds-cell-wrap" style="vertical-align:top;" headers="d208280e238 ">
              <ul>
                <li>A Payment record is created after payment is collected using the merchant
                  account.</li>

                <li>A Payment Line Invoice Line record is created after the payment is applied to
                  an invoice line.</li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table>

## Payment Batch Run Failures

To troubleshoot failed payment schedule items, check the Revenue Transaction Error Logs related list on the Payment Batch Run and Payment Schedule records.

To automatically retry failed payments, [set up payment retry rules](https://help.salesforce.com/s/articleView?id=ind.billing_setup_payment_retry_rules.htm&release=264.0.0&type=5 "Define payment retry rule sets and payment retry rules and configure Billing to automatically retry failed payments for specific error categories at various time intervals."), define a default payment retry rule set, and then enable the retry failed payments feature on the Billing Settings page.

To manually retry processing of failed payments, change the status of the failed payment schedule items to Canceled. Then, create new payment schedule items with the same details and schedule a payment batch run.