Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer tools
Overview
Versioning
Changelog
Upgrade your API version
Upgrade your SDK version
Developer tools
SDKs
API
Testing
Workbench
Event Destinations
Workflows
Stripe CLI
Stripe Shell
Developers Dashboard
Agent toolkit
Build with LLMsStripe for Visual Studio CodeStripe health alertsFile uploads
Security and privacy
Security
Privacy
Extend Stripe
Stripe Apps
Stripe Connectors
    Overview
    Integrate a connector
    Commercetools
    Adobe Commerce
    Mirakl
    NetSuite
      Accountant hub
      Developers hub
      Prepare for onboarding
      Deposit automation
      Invoice automation
      Invoice payment page
      Customer payment page
      Custom payment application
        Fields and references
        Field mappings
        Sync data
      Multiple subsidiaries
      Multiple currencies
      Troubleshooting
      Invoice payment link
    Oracle Opera
    Cegid
    PrestaShop
    Salesforce
    SAP
    Shopware 6
    Stripe Tax for WooCommerce
    Stripe Tax for BigCommerce
    Partner connectors
    Build your own connector
Partners
Partner ecosystem
Partner certification
HomeDeveloper toolsStripe ConnectorsNetSuiteCustom payment application

Field mappings

Learn how to customise data synced to your NetSuite records using the Stripe Connector for NetSuite.

Copy page

You use field mappings when you want additional reporting or categorisation of records in NetSuite, or to add values for required fields that the connector needs to create records.

The Stripe Connector for NetSuite provides two ways for you to add data to your NetSuite records:

  • Field defaults (static)
  • Field mappings (dynamic)

You can find both mapping methods in the connector app when you navigate to Settings > Field mappings. This allows you to customise the data that’s synced to NetSuite, for example, if you require more data in the NetSuite record than what’s synced by default.

Field defaults

You can add field defaults (static values) to any record that the integration creates, even if it’s not present in Stripe. If one of your NetSuite records has a required field, the connector must include a value for that field to create the record. Otherwise, the request to create the record fails with an error.

For example, if your invoice form has a required Class field, you must provide a value for Class so the connector can create the record. Because Class is a recordReference or dropdown field, the connector needs the internal ID of the value to use as the field default. To use the value Corporate with internalID: 5, you enter the following JSON hash:

invoice: { "klass_id": 5 }

If the invoice line item requires the same field, you enter the following JSON hash:

invoice_item: { "klass_id": 5 }

In the above examples, we use klass instead of class, which is specific to the NetSuite API for this field. The suffix _id indicates to NetSuite that the field value is a recordReference (dropdown). Another common suffix is _date, which indicates a NetSuite date field that must be in Unix timestamp format.

Common mistake

The same error message displays if the following are missing: required fields, header level fields for invoice, or line level fields for invoice_item. If you add the header level mapping and the record fails to sync, you can try adding the line level mapping.

Field mappings

You can pass field mappings (dynamic values) from Stripe to NetSuite. To do so, the connector retrieves data from the Stripe field and records it in the NetSuite field.

For example, your system that’s integrated with Stripe passes a company_id to the metadata of each payment. You want that ID passed to a custom field on the NetSuite customer payment for tracking purposes. To do so, you set up the following field mapping:

customer_payment: { "metadata.company_id": "custbody_company_identifier" }

The above example uses the suffix _identifier instead of _id on the custom field in NetSuite. Custom fields must use a value other than the suffix _id because NetSuite uses _id to indicate a record reference or dropdown field type.

For example, a field default for setting a revenue recognition rule on service sales items might look as follows:

"service_sale_item": { "revenue_recognition_rule_id": 123 }

Overwrite customisations

When the connector creates a record in NetSuite, it maps a standard set of data from the Stripe record to the NetSuite record. For example, the Stripe customer ID and email map to the NetSuite customers created by the connector.

If you want to overwrite the connector’s standard data mappings, you can use field defaults or field mappings. If you have a default mapping (static) and a field mapping (dynamic) on the same NetSuite field, the field mapping takes precedence over the field default.

For example, the connector maps the Stripe customer name to the NetSuite field company_name. NetSuite copies the value for the company_name to the entity ID, by default. The connector overrides this functionality and uses the Stripe customer ID instead to make sure it meets the NetSuite requirement of using a unique entity ID. Don’t use the Stripe customer ID, we recommend using a unique ID instead.

In this case, you can override the standard data mapping by nullifying the entity ID. This allows NetSuite to copy the customer name as the entity ID, and use the default NetSuite behaviour.

"customer": { "entity_id": null }

See also

  • Stripe and NetSuite fields and references
  • NetSuite schema browser
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access programme.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc