---
schema_version: "1"
id: 963a62295e2373ab89af67af688dc868d4b94c4c393ace890eda12e835433aa0
title: Process First Payment Billing for Subscriptions
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_elements_comm_actions_process_first_billing.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_comm_actions_process_first_billing.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 52723ead463356288f50d5cbc006455d793d44b226dca4fbcdc54cd2c95f88ac
description: Generate and settle a subscription order’s first-term invoice and create a billing schedule for the subscription order.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Process First Payment Billing for Subscriptions

Generate and settle a subscription order’s first-term invoice and create a billing schedule for the subscription order.

### 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;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

In Flow Builder, add an Action element to your flow. Select the **Commerce** category, and search for **Process First Payment Billing**. To access this action from the API, use the name `processFirstPaymentBilling`.

## Set Input Values

Use values from earlier in the flow to set the inputs.

 
| Input Parameter | Description |
| --- | --- |
| correlationId | The request correlation ID used for tracking the request. |
| orderSummaryId | The ID of the order summary record. |

## Store Output Values

 
| Output Parameter | Description |
| --- | --- |
| correlatoinId | The request correlation ID used for tracking the request. |
| requestsId | The ID of the request. |

## Error Conditions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:17.513134851138354%">
          <col style="width:82.48686514886164%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d272555e184">Error Condition</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d272555e187">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Error Condition" class="slds-cell-wrap" style="vertical-align:top;" headers="d272555e184 ">User Can’t Invoke Action</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d272555e187 ">
              <p>The caller doesn’t have the appropriate permissions to call the action.</p>
              <p>Error Code: INSUFFICIENT_ACCESS</p>
              <p style="margin-bottom:0;">HTTP Status Code: 400</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Error Condition" class="slds-cell-wrap" style="vertical-align:top;" headers="d272555e184 ">Order Summary Isn’t Included</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d272555e187 ">
              <p>The action didn’t specify the the orderSummaryId as input.</p>
              <p>Error Code: REQUIRED_MISSING_FIELD</p>
              <p style="margin-bottom:0;">HTTP Status Code: 400</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Error Condition" class="slds-cell-wrap" style="vertical-align:top;" headers="d272555e184 ">Invalid Order Summary</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d272555e187 ">
              <p>The provided orderSummaryId is invalid.</p>
              <p>Error Code: INVALID_INPUT</p>
              <p style="margin-bottom:0;">HTTP Status Code: 400</p>
            </td>

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

## Usage

This action runs asynchronously with the Commerce First Billing Service. The service creates billing schedules from order items, creates a first invoice from the order, and associates a payment record with the invoice. Subscribe to [FirstBillPaymentSetupEvent](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/sforce_api_objects_firstbillpaymentsetupevent.htm) to be notified of both success and failures for this action.