# Configure the Payment and Billing Address subflow

You need to configure the payment subflow to add My Wall and Digital River payment support. To configure the Payment and Billing Address subflow:

1. Click **Setup** ![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2F4ZLFovJZkyfVMWtaaYha%2FSetup.png?alt=media).
2. Type `Flows` in the **Quick Find** field and click **Flows**.\
   ![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2FJOfrXz6Q84oi9ak5Ptk4%2FQuick%20Find%20-%20Flows.png?alt=media)
3. Scroll down and click **Subflow - Payment and Billing Address**. The Flow Builder opens in a separate tab.\
   ![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2F5nShIJLqxb33JcXHC10O%2FFlows%20-%20Subflow%20-%20Checkout%20Summary.png?alt=media)
4. Drag the **Screen** element from the left pane and drop it in the right pane.
5. Type `placeOrderConfirmation` in the **Label** field on the **Edit Screen** dialog.![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2FXRF4nbFpu5PhQz1ebd11%2FEdit-screen%20-%20placeOrderConfirmation.png?alt=media)
   1. Type `drb2b_paymentDetails` in the **Search Components** field and click **drb2b\_paymentDetails**.\
      ![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2FvLdv04wLkFPb2iSTgZpw%2FSearch%20components%20-%20drb2b_paymentDetails.png?alt=media)
6. Drag **drb2b\_paymentDetails** to where you want it to appear on the Edit Screen.\
   ![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2Fpatm3Y30lHnP6DALHNXA%2FEdit%20Screen%20-%20drb2b_paymentDetails.png?alt=media)
7. Enter the following values in the fields:\
   ![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2FkYdgyGqGeAtDEzT5hrb5%2Fdrb2b_payment_details.png?alt=media\&token=534eaeb9-ec92-440c-8046-f0df108a3aa6)
   * **API Name**: Type `paymentDetails` or any other name with no restrictions.
   * **Auto Initialize:** `{!$GlobalConstant.True}`
   * **Cart Id**: Type `{!cartId}`.<br>
8. Type `drb2b_orderSummary` in the **Search components** field and click **drb2b\_orderSummary**.\
   ![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2F2yYq8eeeqgCluGYoq9Yz%2FSearch%20components%20drb2b_OrderSummary.png?alt=media)
9. Drag **drb2b\_orderSummary** to where you want it to appear on the Edit Screen.![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2FPkcozJpcAX6MCqlZ2nL2%2FEdit%20Screen%20-%20drb2b_orderSummary.png?alt=media)
10. Enter the following values in the fields. Be sure to click through all designer attributes to ensure that the default values are registered by Salesforce.
    * **API Name**: Type `orderSummary` or any other name with no restrictions.
    * **Auto Initialize:** Type `{!$GlobalConstant.False}` or `{!$GlobalConstant.True}` (default value).
    * **ByPass Validation**: Type `{!$GlobalConstant.False}` or `{!$GlobalConstant.True}` (default value).\
      **Note**: Set the value to `{!$GlobalConstant.False}` whenever you want to use the `drb2b_drTermComponent` on the Place Order page. See [DR terms component](https://docs.digitalriver.com/salesforce-lightning/salesforce-lightning-b2b-commerce-app-1.3/extend-the-salesforce-lightning-app/customizing-the-lightning-web-components/components/dr-terms-component) for more information.
    * **Place Order:** Type `{!$GlobalConstant.False}` or `{!$GlobalConstant.True}` Use this to control the executing order placement logic of mutiple components.

      If there is more than one drb2b\_orderSummary component on the page, set the Place Order attribute to True for one component and set the rest of the order summary components to False. If there is only one drb2b\_orderSummary component on the page, make sure to keep the Place Order attribute set to True (the default value).
    * **Record Id**: Type `{!cartId}`.
    * **Show All**: Type `{!$GlobalConstant.True}`.
    * **Show Duty**: Type `{!$GlobalConstant.True}`.
    * **Show Grand Total**: Type `{!$GlobalConstant.True}`.
    * **Show IOR Tax**: Type `{!$GlobalConstant.True}`.
    * **Show Place Order**: Type `{!$GlobalConstant.True}`.
    * **Show Promotion:** `{!$GlobalConstant.True}`
    * **Show Regulatory Fee**: Type `{!$GlobalConstant.True}`.
    * **Show Shipping**: Type `{!$GlobalConstant.True}`.
    * **Show Subtotal**: Type `{!$GlobalConstant.True}`.
    * **Show Tax**: Type `{!$GlobalConstant.True}`.

      <div align="left"><figure><img src="https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2FwXYJp5RiGP57tAhpfvlG%2Fdrb2b_payment_lists.png?alt=media&#x26;token=71c11973-160d-4381-b807-f8e24ff239a3" alt=""><figcaption></figcaption></figure></div>
11. Type `drb2b_drTermsElement` in the **Search components** field and click **drb2b\_drTermsElement**.\
    ![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2FAodDCeWHy4dKrt4lNo3p%2FSearch-drb2b_drTermsElement.png?alt=media)
12. Enter the following details. Be sure to click through all designer attributes to ensure that the default values are registered by Salesforce.
    * **API Name**: Type `DR_Terms` (or any other name with no restrictions).
    * **Auto Initialize**: `{!$GlobalConstant.True}`
    * **Cart Id**: Type `{!cartId}`.
    * **Bypass Validation**: Type `{!$GlobalConstant.True}` or`{!$GlobalConstant.False}`. By default, this value should be `False`. See [DR terms component](https://docs.digitalriver.com/salesforce-lightning/salesforce-lightning-b2b-commerce-app-1.3/extend-the-salesforce-lightning-app/customizing-the-lightning-web-components/components/dr-terms-component) for more information.
    * **Hide Terms UI:** `{!$GlobalConstant.False}`\
      \
      ![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2FLV0zy2QaWuWWZWYv8E1Z%2Fdrb2b_dbTermsElemts_attributes.png?alt=media\&token=5fec8252-f02b-4db1-a37a-28ccaa4d300e)
13. Type `drb2b_drUtil` in the **Search components** field and click **drb2b\_drUtil** . ![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2FjDrjlTwPRQzweg79rfIy%2FSearch%20components%20drb2b_drUtil.png?alt=media)
14. Drag **drb2b\_drUtil** to where you want it to appear on the Edit Screen.![](https://2681600133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFDmrn2Xgg8KN7ITpu9Nw%2Fuploads%2Fo3tOwrosb4bpPO1Kxqb8%2FEdit%20Screen%20-%20drb2b_drUtil.png?alt=media)
15. Type `drb2b_Util` or any other name with no restrictions in the **API Name** field.
16. Click **Done**.

{% hint style="info" %}
To continue editing the Payment and Billing Address subflow, see:

* [Edit the Payment Method screen](https://docs.digitalriver.com/salesforce-lightning/salesforce-lightning-b2b-commerce-app-1.3/integrate-the-salesforce-lightning-app/step-17-integrate-the-digital-river-components-into-the-checkout-flow/subflow-configuration/configure-the-payment-and-billing-address-subflow/edit-the-payment-method-screen)
* [Edit the decision elements](https://docs.digitalriver.com/salesforce-lightning/salesforce-lightning-b2b-commerce-app-1.3/integrate-the-salesforce-lightning-app/step-17-integrate-the-digital-river-components-into-the-checkout-flow/subflow-configuration/configure-the-payment-and-billing-address-subflow/edit-the-decision-elements)
* [Link the screen components](https://docs.digitalriver.com/salesforce-lightning/salesforce-lightning-b2b-commerce-app-1.3/integrate-the-salesforce-lightning-app/step-17-integrate-the-digital-river-components-into-the-checkout-flow/subflow-configuration/configure-the-payment-and-billing-address-subflow/link-screen-components)
  {% endhint %}
