---
schema_version: "1"
id: 2c9a483f94ca6a88d616f037c8aa8346080dbc1e54c010447cd1b67b35306002
title: Add a Payment Link to a Salesforce Record
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/pay_now_app_integration.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.pay_now_app_integration.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 0d7950c6c887ec900e91e90840fee34eb56fd5178c7bf68a1bb129c66606037b
description: To create a Pay Now payment link, use the Generate Payment Link flow. This flow guides you through the link creation process. How you incorporate a link into your business application and share it with your customer is specific to your work flow.
products:
  - Salesforce Payments
  - Commerce
release: "264"
---
# Add a Payment Link to a Salesforce Record

To create a Pay Now payment link, use the Generate Payment Link flow. This flow guides you through the link creation process. How you incorporate a link into your business application and share it with your customer is specific to your work flow.

### 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;"><a href="https://help.salesforce.com/s/articleView?id=commerce.payments_editions.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

This procedure assumes knowledge of Salesforce declarative tools and working with objects.

1. Establish a lookup relationship between the Payment Link object and the object that you want to accept payments for.
    
    The lookup relationship creates a record of what the payment link is for. For example, to collect payment for an invoice or work order, add a lookup field on the Invoice or Work Order object.
    
    1. From Setup, go to Object Manager and locate the Payment Link object.
    2. Select **Fields & Relationships**.
    3. Click **New**, and select **Lookup Relationship**.
    4. Follow the prompts, and select the object that you want the Payment Link to relate to.
2. In Flow Builder, the Generate Payment Link flow automates payment link generation. Use the flow as is or customize it. If you want to customize the flow, complete these tasks. Otherwise, go to the next step.
    
    1. In Setup, and in the Quick Find box, enter flows, and select **Flows**.
    2. Select the Generate Payment Link flow, save it under a new name, then modify it.
    
    You can also build your own application workflow using the Payment Link object and a Salesforce declarative tool, such as Flow or Quick Actions. You can also use a developer tool, like Apex invocable actions.
3. (Optional) Add the payment link flow as an action to an object’s page layout.
    
    You don't have to create an action, but it's an efficient way to generate a link.
    
    1. From Object Manager, choose the object that you want to create a payment link from.
    2. Select **Buttons, Links, and Actions**, and then click **New Action**.
    3. For Action Type, select **Flow** and select the payment link flow.
    4. Enter a label and name for the link, and save your changes.
    5. Select **Page Layouts**.
    6. From Mobile and Lightning Actions, drag the action that you created to the Salesforce Mobile and Lightning Experience Actions section of the page layout.
        
        A button to generate a payment link is added to all record pages for the object. You can generate as many payment links as you want for a single object.
    
    Pay Now doesn’t perform post-processing logic, so you must configure automation for post-payment processing. For example, when a payment is received, add a process to mark an invoice as paid with the amount sent.
4. Test your action button to ensure that it triggers the flow. When the flow starts, select which link you want to create.
    
    - Predefined Amount —sends the customer to a page that shows only an amount owed.
    - With Products —sends the customer to a payment page that shows a list of products, provides shipping options, and calculates the tax based on the shipping address and products purchases.
    
    If your payment link takes you to an error page, go to the Payments Link list view and verify that the link’s status is active. Next, open the link in your browser’s private or incognito browsing mode.
5. Test the generated payment link to make sure that it takes you to the correct Pay Now page. If you accept payments with Apple Pay, test the link by opening it in a Safari browser.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-payments-264-0-0-production-enus/c04ba30f-6dde-4ea7-949b-4f77b22b9fcb/images/icon_example.png)

Example In Object Manager, modify the Quote object. Add an action named Generate Payment Link to the Quote page layout. When you click the new Generate Payment Link button on the page, the flow starts and walks you through payment link creation. Copy the resulting link and share it with your customer.

![Payment link action button on the quote record page](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-payments-264-0-0-production-enus/c04ba30f-6dde-4ea7-949b-4f77b22b9fcb/payments/images/paynow_link_from_record.png)

#### See Also

- [Automate Your Business Processes](https://help.salesforce.com/s/articleView?id=platform.platform_automation.htm&language=en_US)
- [Flow Builder](https://help.salesforce.com/s/articleView?id=platform.flow.htm&language=en_US)
- [Quick Actions](https://help.salesforce.com/s/articleView?id=platform.actions_overview.htm&language=en_US)