# Set up Stripe-initiated payments workflows

Learn how to set up Stripe-initiated payments workflows in Stripe Connector for NetSuite.

> If you are migrating from SuiteSync to Stripe Connector for NetSuite, use the [migration instructions](https://docs.stripe.com/use-stripe-apps/netsuite/migration/configure-app.md).

## Before you begin

1. [Install](https://docs.stripe.com/use-stripe-apps/netsuite/get-started.md) the SCN Stripe App and connect it to NetSuite.
2. [Configure](https://docs.stripe.com/use-stripe-apps/netsuite/configure-app.md) the general settings and workflows in the SCN Stripe App.

## How to use this guide

1. Learn more about each workflow below and select which workflows fit your use case.
2. Set up and test with the instructions for each workflow you select.

### Stripe-initiated payments overview

Stripe Connector for NetSuite (SCN) lets you synchronize [Charges](https://docs.stripe.com/api/charges.md) from any native Stripe account to NetSuite with a variety of workflows. The synchronization of charges is the minimum required functionality to use [Deposit automation](https://docs.stripe.com/use-stripe-apps/netsuite/deposit-automation.md), the connector’s fully automated bank reconciliation workflow. [Learn more](https://docs.stripe.com/use-stripe-apps/netsuite/stripe-charges-netsuite.md) about how charges are reconciled.

Go to **Stripe App** > **App Settings** > **General** to learn about (Always On) settings that apply to these workflows.

Configurable **General** tab settings supported for all workflows on this page:

| General setting | Supported configurable options | Integration design notes | **Description** |
| --- | --- | --- | --- |
| General | NetSuite subsidiary ID | Control which subsidiaries use these workflows |
| Refunds | NetSuite-initiated refunds | Commonly used with Payment Linker and Custom Payment Application workflows |
| Bank deposits | All options | Downstream of these workflows |
| Customers | All Stripe to NetSuite customer sync options | Required configuration for these workflows |
| Currency | All options | Required if NetSuite has Multiple currencies enabled |

## Workflows that sync stand-alone payments to NetSuite

Use one of these workflows if you’re creating charges and their related [Customers](https://docs.stripe.com/api/customers.md) that you want to sync to NetSuite. You can create the charges in the Dashboard, with the Stripe API, or with any Stripe integration.

Configurable **General** tab settings supported for stand-alone payments workflows:

| General setting | Supported configurable options | Integration design notes | **Description** |
| --- | --- | --- | --- |
| Record sync timing | Webook events, Allowlist, Denylist | Using default webhook events is most common for this workflow |

| Workflow  (Default) | Description | Functionality | Complexity |
| --- | --- | --- | --- |
| **Create unapplied customer payments** | Create an unapplied customer payment in NetSuite for each standalone Stripe payment created in the Stripe Dashboard, through the Stripe API, or through a third party integration with Stripe. | Basic | No-code |

### Set up the Create unapplied customer payments workflow

This workflow is on by default.

1. Go to **Stripe App** > **App Settings** > **Payments** to confirm that the **Create unapplied customer payments** radio button is turned on. Click **Save**.
2. Confirm that you’ve set up all applicable configurable fields in the **General** tab, especially those under the section titled **Customer Synchronization Controls: Stripe to NetSuite Workflows**.
3. Confirm that you’ve set up the **Required account mapping** section in the **Account Mapping** tab.
4. Confirm that you’ve set up the minimum required fields on the **Field Mapping** tab.

**Test the workflow:** 

1. In the Stripe Dashboard for your test environment, click the plus symbol (+) > **Payment**.
2. Fill out the information needed and click **Submit payment**.
3. Verify that the NetSuite customer payment was created with the correct data.
4. Verify that your customer matching or creation controls were successful.

| Workflow | Description | Functionality | Complexity |
| --- | --- | --- | --- |
| **Create invoices for payments** | Create a one-line “inferred” invoice that summarizes the total amount of the payment. A customer payment is created and applied to the NetSuite invoice, which closes it. Use this configuration when you need to post each payment to a NetSuite income account. By default, a single global item is created and reused for all invoices created from this configuration. You can customize this functionality by configuring the dynamic standalone payment item linking fields. [Learn more](https://docs.stripe.com/use-stripe-apps/netsuite/custom-payment-application.md#invoices-payments) | Standard | Configure field ids |

### Set up the Create invoices for payments workflow

This workflow is the alternative option to the **Create unapplied customer payments** default.

1. Go to **Stripe App** > **App Settings** > **Payments** to confirm that the **Create invoices for payments** radio button is turned on. Click **Save**.

2. The `Dynamic stand-alone payment item linking` fields become available to configure, but are optional. By default, if you leave the fields blank a single global item is created and reused for all invoices created by this workflow. If you want to dynamically map to pre-created NetSuite items instead, map two fields that match on the exact same value.

   - Under **NetSuite field**, type the field id of the field you want to match with on the existing NetSuite item record. Custom fields are supported.
   - Under **Stripe field**, type the field id of the field you want to match with on the Stripe charge. This is commonly a custom metadata field or `Description`.

3. Confirm that you’ve set up all applicable configurable fields in the **General** tab, especially those under the section titled **Customer Synchronization Controls: Stripe to NetSuite Workflows**.

4. Confirm that you’ve set up the **Required account mapping** section in the **Account Mapping** tab.

5. Confirm that you’ve set up the minimum required fields on the **Field Mapping** tab. 

   > This workflow allows you to create dynamic mappings of fields from the `Charge` object to fields on both the customer payment and the invoice.

**Test the workflow**: 

1. In the Stripe Dashboard for your test environment, click the plus symbol (+) > **Payment**.
2. Fill out the information needed. If you’re using the `Dynamic stand-alone payment item linking` fields, make sure you entered the appropriate value in the corresponding Stripe field on the payment. Click **Submit payment**.
3. Verify that the NetSuite invoice was created with a customer payment created and applied to it.
4. Verify that the correct NetSuite item was used on the invoice.
5. Verify that your customer matching or creation controls were successful.

## Workflows that apply payments to transactions in NetSuite

You can use all of the workflows in this section simultaneously, if applicable to different processes in your integration.

Configurable **General** tab settings supported for workflows in this section:

| General setting | Supported configurable options | Integration design notes | **Description** |
| --- | --- | --- | --- |
| Record sync timing | Allowlist, Denylist | Allowlist is most common. Denylist is required if also using a Stripe invoice workflow simultaneously in the same Stripe account. |

| Workflow | Description | Functionality | Complexity |
| --- | --- | --- | --- |
| **Payment Linker - upfront invoice capture** | Common with third-party billing or ecommerce use cases. A Stripe charge is created by a separate system that captures payment upfront, typically during an order or billing process. The connector creates a customer payment applied to a separately created invoice in NetSuite. It requires installation and configuration of the “Stripe Connector Add-ons” `SuiteBundle ID 502910`. | Intermediate | Integrate systems (no-code) |

| Workflow | Description | Functionality | Complexity |
| --- | --- | --- | --- |
| **Payment Linker - upfront sales order capture** | Common with ecommerce use cases. A Stripe charge is created by a separate system that captures payment upfront, typically during an order process. The connector creates a customer deposit related to a separately created sales order in NetSuite. Requires installation and configuration of the “Stripe Connector Add-ons” `SuiteBundle ID 502910`. | Intermediate | Integrate systems (no-code) |

| Workflow | Description | Functionality | Complexity |
| --- | --- | --- | --- |
| **Payment Linker - authorization capture** | Common with ecommerce use cases. A Stripe payment intent is created by a separate system that creates a payment authorization, typically during an order process. After the related sales order is billed, the connector creates a customer payment and applies it to the resulting NetSuite invoice. Advanced configurations are available in the bundle. It requires installation and configuration of the “Stripe Connector Add-ons” `SuiteBundle ID 502910`. | Advanced | Integrate systems (no-code) |

### Set up any of the Payment Linker workflows

1. Follow the [installation and configuration guide](https://docs.stripe.com/use-stripe-apps/netsuite/stripe-connector-add-ons.md) to install the Stripe Connector Add-ons bundle `ID 502910`.
2. Follow the [set up guide](https://docs.stripe.com/use-stripe-apps/netsuite/payment-linker-setup.md) to configure the Payment Linker workflows according to your needs.
3. Confirm that you’ve set up all applicable configurable fields in the **General** tab, especially those under the section titled **Customer Synchronization Controls: Stripe to NetSuite Workflows**.
4. Confirm that you’ve set up the **Required account mapping** section in the **Account Mapping** tab.
5. Confirm that you’ve set up the minimum required fields on the **Field Mapping** tab.

**Test the Payment Linker workflows**:

If your environment is fully automated:

1. Follow the steps on the Payment Linker instructions page and deploy the script deployment in NetSuite.
2. Initiate a new order from the website where both NetSuite transaction record and Stripe payment object creation starts.
3. Use either the single event deployment or wait for the scheduled deployment.
4. Verify that the records were created correctly in Stripe and NetSuite.

If you must manually test:

1. In the Stripe Dashboard for your test environment, click the plus symbol (+) > **Payment**.
2. Fill out the information needed and click **Submit payment**.
3. Copy the `Payment ID` value from the **Details** section of the payment page in the Dashboard.
4. Create a NetSuite transaction that meets the criteria of your saved search. Paste the Payment ID in the `Stripe Associated Charge ID` field. Click **Save**.
5. Use either the single event deployment or wait for the scheduled deployment.
6. Verify that the records were created correctly in Stripe and NetSuite.

| Workflow | Description | Functionality | Complexity |
| --- | --- | --- | --- |
| **Create NetSuite records by metadata mapping**: | Custom payment application. It allows for custom integrations if your external systems are incompatible with the payment linker. Create NetSuite payment records and apply them to an invoice or sales order by manually or programmatically adding metadata to the Stripe charge. [Learn more](https://docs.stripe.com/use-stripe-apps/netsuite/custom-payment-application.md) | Custom | Most coding |

| Workflow | Description | Functionality | Complexity |
| --- | --- | --- | --- |
| **Link NetSuite records by metadata mapping**: | Custom payment application. Existing NetSuite payment records can be linked to a Stripe payment through metadata on the Stripe record. Allows for custom integrations if your external systems are incompatible with the payment linker. [Learn more](https://docs.stripe.com/use-stripe-apps/netsuite/custom-payment-application.md) | Custom | Most coding |

### Set up any of the Metadata Mapping workflows

1. Learn about [Custom payment application](https://docs.stripe.com/use-stripe-apps/netsuite/custom-payment-application.md). Select the metadata keys and process flows that apply to your use case.
2. Create a script or use a third party plugin’s field mapping settings to set metadata on the Stripe objects you select, at the appropriate time.
   > The `Link NetSuite records by metadata mapping` workflow enables you to create your own unapplied customer deposits or cash sales in NetSuite and link them to the appropriate Stripe charge to reconcile Stripe and NetSuite with the `Deposit automation` workflow. The `NetSuite-initiated refunds` workflow also supports cash refunds.
3. Enable the appropriate **Allowlisting** or **Denylisting** setting on the **General** tab.
4. Confirm that you’ve set up all applicable configurable fields in the **General** tab, especially those under the section titled **Customer Synchronization Controls: Stripe to NetSuite Workflows**.
5. Confirm that you’ve set up the **Required account mapping** section in the **Account Mapping** tab.
6. Confirm that you’ve set up the minimum required fields on the **Field Mapping** tab.

 Test the **Create NetSuite records by metadata mapping** and **Link NetSuite records by metadata mapping** workflows by creating charges with the Stripe API. Add the appropriate metadata of the NetSuite test records you create in alignment with your custom payment application workflows. 

## See also

- [NetSuite-initiated payments workflows](https://docs.stripe.com/use-stripe-apps/netsuite/setup/netsuite-initiated-payments.md)
- [Stripe Billing and Invoicing workflows](https://docs.stripe.com/use-stripe-apps/netsuite/setup/invoice-automation.md)
