Configuration Settings
All invoice settings can be found under the Invoices subtab in the Data Orchestration tab. The fields are grouped together under Stripe to NetSuite for easy access.
Note: Click any field label in the Invoices tab to see a description of its purpose and usage.
Field Descriptions
- Enable Invoices Flow: Check/mark to enable importing Stripe invoices into NetSuite. Uncheck to stop all invoice imports.
Enable Webhook for Invoices: Check/mark to let Stripe webhooks automatically sync invoices to NetSuite when they are finalized or paid.
Update Stripe Metadata: Check/mark to automatically write the NetSuite Invoice Internal ID back to the corresponding Stripe invoice after it is create
Last Exported Date: Shows the last time invoices were imported from Stripe (in Unix timestamp). This value is used in the next import to fetch only invoices created after this time using the created[gte] parameter.
Note: This field is updated by the system after every flow execution and is read-only.
Exclude $0 Invoices: Check/mark to automatically skip importing invoices with a total amount of zero.
Invoice Line Item: Maps the total Stripe invoice amount to the selected NetSuite item. Regardless of how many lines are on the Stripe invoice, only one line will be added to the NetSuite invoice.
Note: Taxes and discounts from Stripe will not be imported.
Discount Item: Maps the NetSuite item that represents any discounts from Stripe invoices.
Note: Use only non-inventory items. All Stripe discounts appear as a single line on the NetSuite invoice.
Tax Item: Maps the NetSuite item that captures taxes from Stripe invoices.
Note: Use only non-inventory items. All Stripe taxes are combined into a single line on the NetSuite invoice.
Invoice Field Mappings: Controls how Stripe Invoice fields are mapped to NetSuite Invoice fields and allows you to include related customer data from the associated Stripe customer.
Note: Fields from the Stripe invoice object can be used. Associated customer data is available via stripeCustomerData (e.g., stripeCustomerData.id, stripeCustomerData.email).
Item Mapping Hierarchy
-
Configured Items (Invoice Line, Discount, Tax):
If items are configured, they are imported as single-line items on the invoice as described above.
-
Multiple Line Items:
Invoice Field Mappings let you link each Stripe invoice line to a NetSuite item. In this case, the default Invoice Line Item field must be left blank in the configuration settings.
You can use either static or dynamic lookups to select NetSuite items for each Stripe Invoice line.Sublist mappings are required even when default items are set (using Invoice Line Item, Discount Item, or Tax Item field). Sublist mappings allow mapping beyond Item, Quantity, and Amount, ensuring all invoice lines, discounts, and taxes from Stripe are imported correctly into NetSuite
Note:
1. Always map Item, Quantity, and Amount for tax and discount lines, plus other required fields. Quantity defaults to 1, and Amount comes from Stripe (total discounts or taxes).
2. Use the record mapping fields to map all required line-level fields.
3. Using the Invoice Line Item always adds a single line for the total amount from the Stripe Invoice.
4. For conditional mapping, always leave the default item fields blank and use static or dynamic mapping. Any values entered in these fields will override the conditional logic in the Invoice Field Mappings.
Refer to the Field Mapping Documentation for examples and detailed instructions on implementing conditional mappings.
Payment Account: Select the NetSuite account where Stripe payments will be recorded. All imported payments are posted to this account.
Payment Method: Select the payment method in NetSuite for recording Stripe payments.
Note: To use condition-based mapping, leave the Payment Account and Payment Method fields empty and use static or dynamic mapping. Filling in these fields sets a global default that overrides any conditional logic in the Customer Payment Field Mappings.
Refer to the Field Mapping Documentation for examples and detailed instructions on implementing conditional mappings
Customer Payment Field Mappings: Controls how Stripe Payment (Payment Intent) fields are mapped to NetSuite Customer Payment fields and allows inclusion of related invoice and customer data from the associated Stripe objects.
Note: Fields from the Stripe payment intent object can be used. Payment data is organized as an array within each payment object, with associated invoice and customer details available via parent objects (for example, parent.stripeInvoiceData.id, parent.stripeCustomerData.id).
Customer Field Mappings: Controls how Stripe Customer fields are mapped to NetSuite Customer fields
Note: Only fields from the Stripe customer object can be used.
For detailed JSON mapping examples and instructions, refer to the Field Mapping Documentation.
Sample Invoice mapping commonly used
{
"fields": [
{
"generate": "custbody_pp_stripe_invoice_id",
"extract": "id"
},
{
"generate": "duedate",
"fieldType": "date",
"extract": "due_date"
},
{
"generate": "custbody25",
"extract": "payments.data.0.payment.payment_intent"
}
],
"sublist": {
"item": [
{
"generate": "item",
"dynamicLookup": {
"recordType": "inventoryitem",
"filters": [
["stockdescription","is",
"{{lines.data[].pricing.price_details.product}}"
],"and",
["isinactive","is","F"]
],
"resultField": "internalid",
"default": "502"
}
},
{
"generate": "quantity",
"handlebars": "{{lines.data[].quantity}}"
},
{
"generate": "rate",
"handlebars": "{{toFixed (divide lines.data[].pricing.unit_amount_decimal 100) 2}}"
},
{
"generate": "location",
"hardCodedValue": "2"
},
{
"generate": "taxcode",
"hardCodedValue": "-7"
}
],
"discount": [
{
"generate": "item",
"extract": "total_discount_amounts[].discount",
"staticLookup": {
"map": {
"di_1SKeCTCzzXCPoFbPIgJxwkgy": "1010",
"di_1SFu9jCzzXCPoFbPApwQpRG6": "1010"
},
"default": 999
}
},
{
"generate": "quantity",
"hardCodedValue": 1
},
{
"generate": "amount",
"handlebars": "-{{toFixed (divide total_discount_amounts[].amount 100) 2}}"
},
{
"generate": "taxcode",
"hardCodedValue": "-7"
}
],
"tax": [
{
"generate": "item",
"hardCodedValue": "2"
},
{
"generate": "location",
"hardCodedValue": "2"
},
{
"generate": "taxcode",
"hardCodedValue": "-7"
}
]
}
}