Set up the Payment Linker workflows
Learn how to configure the Payment Linker workflows in the Stripe Connector for NetSuite (SCN).
Warning
If you’re migrating from SuiteSync to the Stripe Connector for NetSuite, use the migration instructions.
The Payment Linker workflows most commonly support e-commerce and third-party billing use cases. A front-end webpage or third-party tool captures payment or authorization with a Stripe Element or plugin. Separately, the same system triggers the creation of a NetSuite invoice or sales order with the Stripe payment ID on it. When you use the Stripe Connector Add-ons bundle ID 502910, the bundle’s saved search template is configured to find NetSuite transactions with a Stripe payment ID on them. The bundle’s SuiteScript then calls the Stripe API and triggers the SCN App to create a NetSuite payment record applied to the appropriate transaction.
Payment Linker use cases
The following Payment Linker workflows are available. Review the descriptions and common use cases to determine which workflows apply to your implementation.
| Workflow | Common use cases | Description of a typical workflow |
|---|---|---|
| Up-front invoice capture | Self-serve e-commerce website Third-party billing where a third-party tool uses a Stripe plugin to capture the payment. | Your system captures the payment on a web page or third-party tool with a Stripe Element or plugin. The charge ID passes to the NetSuite invoice, which is created by another method. SCN creates and applies a customer payment to the invoice. |
| Up-front sales order capture | Self-serve e-commerce website | Your system captures the payment on a web page or third-party tool with a Stripe Element or plugin. The charge ID passes to the NetSuite sales order, which is created by another method. SCN creates a customer deposit related to the sales order. |
| Authorization capture | Self-serve e-commerce website | Your system creates an authorization on a webpage or third-party tool with a Stripe Element or plugin. The PaymentIntent ID passes to the NetSuite sales order, which is created by another method. The Payment Linker captures the funds automatically when the sales order or the resulting invoice match your saved search criteria. SCN creates a customer deposit related to the sales order or a customer payment applied to the invoice. |
| Sales order payment page - Authorization capture | Manual process for e-commerce or service businesses | Your customer creates an authorization using SCN’s Sales Order Payment Page. The PaymentIntent ID passes to the NetSuite sales order automatically. The Payment Linker captures the funds automatically when the sales order or the resulting invoice match your saved search criteria. Advanced capture options are available. SCN creates a customer deposit related to the sales order or a customer payment applied to the invoice. |
Configure the Payment Linker saved search and script deployment
To configure any Payment Linker workflow, follow the instructions below. You can use the same saved search and script deployment simultaneously for Up-front invoice capture and Up-front sales order capture. We recommend creating a dedicated script deployment page that controls the capture of funds later for any Authorization capture workflow.
If you simultaneously configure Authorization capture and another workflow, you can copy the script deployment record used in the following steps, and configure a distinct saved search, schedule, Stripe account, and other settings in each script deployment. Both script deployments use the same Payment Linker SuiteScript.
Note
The following instructions apply to all workflows, with the differences noted.
Installing the Add-ons bundle automatically creates a Stripe Custom Center tab in the colored bar on any NetSuite page. If you don’t see it, click the overflow menu (), which might also be hidden behind floating NetSuite elements.
- Hover over the Stripe tab in the colored bar on any NetSuite page.
- Go to Stripe > Add-ons > Manage Add-ons.
- On the subtabs bar, click Stripe Add-ons.
- On either the Inactive or Active subtab, locate Payment Linker.
- In the Payment Linker row, click Show More and read the technical feature description.
- Open the saved search template by clicking the Stripe Add-on Payment Linker Template link.
- Under Criteria, you’ll see the following defaults:
- Main Line: true
- Type: Invoice
- Status: Open
- Stripe Associated Charge ID (Custom Body): is not empty : It’s included in the Add-ons bundle 502910 and has a field ID of custbody _ suitesync _ authorization _ code .
- Stripe Last Modified (Custom Body): is empty
- Memo: does not contain Stripe Add-on Error
- Edit the
TypeandStatusvalues (if applicable) based on the record types you want the workflow to act on. To narrow down the search results, you can add additional criteria, for example: If you use the Authorization Capture flow, follow the saved search instructions in the next section.
- Configure the search to find invoices with the Stripe Associated Charge ID field populated with a captured charge ID. This results in creating and applying a customer payment to the invoice.
- Configure the search to find sales orders with the Stripe Associated Charge ID field populated with a captured charge ID. This results in a customer deposit related to the sales order.
- Don’t delete any of these criteria rows, which are required for the feature to function correctly:
- Main Line: true
- Stripe Associated Charge ID (Custom Body): isn't empty
- Stripe Last Modified (Custom Body): is empty
- Memo: doesn't contain Stripe Add-on Error
- Change the name of the saved search to remove
template, and optionally add another identifier. Then click Save As. Make note of the name so you can find it later. If you use a single Payment Linker script deployment page for more than one use case, you can add all criteria to the same saved search. The script runs on all records that match the search criteria, on the same schedule. - On the NetSuite page, go to Stripe > Add-ons > Manage Add-ons.
- In the Payment Linker row, click View.
- On the Script Deployment page, click Edit.
- Configure the Schedule subtab as needed. The script can run as frequently as every 15 minutes, daily. To use this option, you must also configure the
Start Timeto 12:00 AM (00:00). If you configure a different time, the script only runs every 15 minutes starting at that time, until the end of the specific day at 11:45 PM (23:45). You can also set the schedule toSingle Event, which you can use for testing or manually running one-time batches. - On the Parameters subtab, do the following:
- Set the
Records to Process Searchto the newly named saved search you created previously. - Set the
Stripe Accountfield, if you want to use one Stripe account by default when the script deployment runs. Otherwise, you can leave this blank. This dropdown appears on the following records: NetSuite account, Script Deployment page, subsidiary records, customer records, and transaction records. Select the record type in the hierarchy to associate with the Stripe account. If needed, you can edit the other record to configure the Stripe account. Note The dropdown lists all the available Stripe account custom records that you created during the [Stripe Connector Add-ons bundle installation](/the relevant part of the product). You can create additional Stripe account records in a separate browser tab.
- If you’re deploying to NetSuite production, clear the Test Mode checkbox. This sets the value to
false. - Click Save if you don’t want to deploy the script now. Otherwise, continue to the next step.
Modify fields for the Authorization Capture workflow
Before deploying the script deployment page, edit the additional fields as needed for your workflow.
- On the Script Deployment page, on the Parameters subtab, select Capture Funds. This sets the value to
trueand enables the creation of a charge against a PaymentIntent when the sales order or resulting invoice matches your saved search criteria. Caution If you use the Authorization Capture workflow and another Payment Linker workflow simultaneously, we recommend creating a separate script deployment page for the Authorization Capture workflow. Use the instructions below to create a saved search for your Authorization Capture script deployment to populate only sales orders or invoices that require the Payment Linker script to capture a PaymentIntent. - The Payment Linker provides options for capturing funds automatically when the sales order or invoice matches your saved search criteria. SCN creates a customer deposit that’s related to the sales order or a customer payment that’s applied to the invoice. For example, the saved search for an Authorization Capture workflow could search for invoices with the following criteria:
- Main Line: is true
- Type: is Invoice
- Status: is Open
- Stripe Associated Charge ID (Custom Body): is not empty
- Stripe Last Modified (Custom Body): is empty
- Memo: does not contain Stripe Add-on Error
- Any criteria you want to add to narrow down the search for certain transactions
- To capture during invoice creation, apply the
Stripe Associated Charge IDfield to the invoice form. This invoice is created from the original sales order where theStripe Associated Charge IDfield was populated. The invoice inherits the value for the PaymentIntent ID for that field. The script that captures the funds on the PaymentIntent triggers when the invoice matches the saved search criteria and you select Capture Funds. SCN creates the customer payment that’s applied to the invoice. To capture the funds when another event occurs to the sales order and before invoice creation, configure your saved search to match that criteria. - Optionally review the hidden field descriptions for each subfeature on the Parameters tab. Enable the charge capture functionality that you need.
Sales Order Payment Page: Authorization Capture use case
You must do the following for this workflow to function properly:
- Go to the SCN App > App Settings.
- On the Payments tab, under Payment Pages, enable the Sales Order Payment Page by following the guided setup.
- Follow the instructions above to enable the Payment Linker with the Authorization Capture workflow.
- The Add-ons bundle automatically adds a custom transaction body field called
Stripe Authorize Onlyto your NetSuite sales order records. Select Stripe Authorize Only on all sales orders that you want the Sales Order Payment Page to create an authorization for. If you don’t select Stripe Authorize Only, the payment page uses the default behavior of capturing funds up front and creating a customer deposit that’s related to the sales order. The Payment Linker isn’t required for the default behavior. - If the Authorization Capture saved search only searches for sales orders in this state, include the Stripe Authorize Only field in the criteria by adding:
- Stripe Authorize Only (Custom Body): true
- On the Parameters tab, select Capture Funds for the script deployment that this saved search is associated with.
Sales Order Payment Page - Authorization Capture process
Stripe Authorize Only set to true on the sales order
Manually or programmatically by your team
Sales Order Payment Page creates a PaymentIntent
Manually entered by the customer
PaymentIntent ID added to the Stripe Associated Charge ID field on sales order
A Map-Reduce script runs every 15 minutes, and a User Event script runs after the sales order record loads
Sales order or invoice is found by the saved search
Based on your record state criteria for when to capture funds
Payment Linker script captures funds in Stripe
Based on your script deployment parameters and schedule
Sales order option: customer deposit created and related to sales order
By the SCN App based on metadata added by the script
Invoice option: customer payment created and applied to sales order
By the SCN App based on metadata added by the script
Verify the Stripe Associated Charge ID field is populated
All Payment Linker workflows require you to maintain a script or process that adds a PaymentIntent or charge ID to the Stripe Associated Charge ID custom transaction body field on an invoice or sales order. The exception is the Sales Order Payment Page - Authorization Capture workflow, which does this automatically. The NetSuite field ID is custbody_suitesync_authorization_code.
During testing, verify that your integration is configured to add the PaymentIntent ID or charge ID to the Stripe Associated Charge ID field after it’s created by the Stripe Element or plugin. Pass this ID to NetSuite along with the data payload that inserts the new sales order or invoice record. Alternatively, you can perform an upsert later to add the ID to the field after the record is created.
If you create the order through an e-commerce website, this workflow requires a third-party or custom integration component to create the sales order or invoice in NetSuite.
Stripe object ID to use
The Up-front Invoice Capture and Up-front Sales Order Capture workflows support mapping either the PaymentIntent or charge ID to the Stripe Associated Charge ID field. The Payment Linker script finds the appropriate charge ID to sync the customer payment or deposit to NetSuite.
If you use the Authorization Capture workflow for e-commerce use cases, the authorization created by the Stripe Element or plugin only creates a PaymentIntent ID that you must pass to the Stripe Associated Charge ID field. The Payment Linker script later captures a charge against this PaymentIntent when the sales order or invoice matches your saved search criteria. SCN uses the resulting charge ID when it creates the customer deposit related to the sales order or the customer payment applied to the invoice.
Timing controls and available enhancements
These workflows commonly require a delay in payment sync timing to allow your script or other process to add the charge or PaymentIntent ID to the Stripe Associated Charge ID field. Alternatively, SCN initiates the record sync immediately by default, and treats the payment as an unapplied customer payment because it doesn’t know which invoice or sales order to apply or relate it to.
Go to App Settings > General to read the allowlisting or denylisting settings descriptions and configure the appropriate option for your use case.
Deploy the script
- Confirm your deployment timing:
- In a NetSuite sandbox, you can deploy the script on a schedule or as a single event.
- In a NetSuite production environment, you must carefully time the script deployment to prevent unintended behavior. This step in the process is the final trigger for the workflow to function.
- On the Script Deployment page, configure the following:
- Set the Status to Testing or Scheduled .
- Select the Deployed checkbox when you want the deployment to be live.
- Click Save.
Validate the script functionality
To test the up-front capture workflows:
- Confirm that at least one record meets the saved search criteria, as configured in the previous steps. If you’re in a test environment, you can create an automated test by creating a sales order or invoice in NetSuite for a test item with an amount. Click Save.
- In the Stripe Dashboard, while in test mode or a sandbox, click the plus symbol () > Payment.
- Create a payment for the same amount due on the sales order or invoice. To test successful payments, we suggest using the Available Balance card numbers because they enable the quickest testing of the Deposit Automation workflow downstream of your individual record test. Use any future expiration date, and any numbers for the CVV and zip code.
- For US test payments, use 4000000000000077 .
- For non-US test payments, use 4000003720000278 .
- Copy the charge ID and paste it in the
Stripe Associated Charge IDfield on the sales order or invoice. Click Save. - Confirm the script is running:
- If you configured a schedule and deployed the Script Deployment, the script now runs on that schedule.
- If you configured a single event, go to the Script Deployment page and click Edit . Select Save and Execute from the dropdown next to the Save button.
- After the script runs, go to the sales order or invoice in NetSuite and confirm that a payment record was created and applied within about 3 minutes.