Stripe to NetSuite Charges Import

Configuration Settings

All charge settings are located under the Charges subtab within the Data Orchestration tab. In this subtab, the Charges and Customer Settings field groups contain all configuration fields required for managing the Charges flow.

Note: Click any field label in the Charges and Customer Settings field groups to see a description of its purpose and usage.

 

Field Descriptions

  • Enable Charges Flow: Check/mark to enable importing Stripe charges into NetSuite. Uncheck to stop all charge imports.enable charges.jpg 
  • Update Stripe Charge Metadata: Check/mark to automatically write the NetSuite Selected Transaction Record’s Internal ID back to the corresponding Stripe charge after it is created.charges - update stripe charge metadata.jpg

  • Last Exported Date: Shows the last time charges were imported from Stripe (in Unix timestamp). This value is used in the next import to fetch only charges created after this time using the created[gte] parameter.
    Note: The system updates this field after every flow execution, and it is read-only.charges - last exported date.jpg 

  • Stripe Charge Status Filter (Applied after retrieval): Stripe charges with status Succeeded are imported. This field specifies which charge status is allowed for processing after retrieval, ensuring that only Succeeded charges are synced to NetSuite.
    Note: The value is set to Succeeded and is read-only.charges - filter.jpg 

  • Transaction Type: Determines which NetSuite transaction type is created for each imported Stripe charge. Choose from Cash Sale, Customer Payment, or Customer Deposit based on your accounting workflow.charges -transaction type.jpg

  • Transaction Field Mappings: Controls how Stripe Charge fields are mapped to NetSuite transaction fields (Cash Sale, Customer Payment, or Customer Deposit) and allows you to include related customer data from the associated Stripe customer.
    Note: Fields from the Stripe charge object can be used. Associated customer data is available via stripeCustomerData (e.g., stripeCustomerData.id, stripeCustomerData.email).
    The NetSuite Customer record ID is available as nsCustomerId and can be used to link the transaction to the corresponding NetSuite customer. 
    Refer to the Sample Field Mappings section for guidance on linking the NetSuite Customer Record ID. charges -transaction field mappings.jpg

  • Payment Account: Select the NetSuite account where Stripe payments will be recorded. All imported payments are posted to this account.charges - payment account.jpg

  • 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 Transaction Field Mappings.
    Refer to the Field Mapping Documentation for examples and detailed instructions on implementing conditional mappings.charges - payment method.jpg 

  • 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.charges - customer field mappings.jpg 

  • Criteria to find existing customer record:
    Use this field to define a lookup that determines whether a record already exists in NetSuite. If no result is found from the lookup, a default value can be provided by specifying a default NetSuite customer internal ID. If no lookup criteria is provided, the flow will use the Stripe Customer ID (PayPack) field OR email to find an existing customer.charges - customer criteria.jpg

In the sample lookup below, metadata.cus_email is a property on the Stripe Charge object

{
  "filters": [
    [
      "comments",
      "is",
      "{{metadata.cus_email}}"
    ]
  ],
  "default": ""
}

Sample Field Mappings

Sample Cash Sale Field Mappings

{
  "fields": [
     {
      "generate": "entity",
      "extract": "nsCustomerId"
    },
    {
      "generate": "location",
      "hardCodedValue": "2"
    },
    {
      "generate": "custbody_nm_stripe_dcharge_id",
      "extract": "id"
    }
  ],
  "sublist": {
    "item": [
      {
        "generate": "item",
        "hardCodedValue": "502"
      },
      {
        "generate": "quantity",
        "hardCodedValue": "1"
      },
      {
        "generate": "price",
        "hardCodedValue": "-1"
      },
      {
         "generate": "amount",
        "handlebars": "{{toFixed (divide amount 100) 2}}"
      },
      {
        "generate": "taxcode",
        "hardCodedValue": "-7"
      }
    ]
  }
}

 


Sample Customer Payment Field Mappings

{
  "fields": [
      {
      "generate": "customer",
      "extract": "nsCustomerId"
    },
    {
      "generate": "payment",
      "handlebars": "{{toFixed (divide amount 100) 2}}"
    },
    {
      "generate": "paymentmethod",
      "hardCodedValue": "10"
    },
    {
      "generate": "account",
      "hardCodedValue": "2"
    },
    {
      "generate": "custbody_nm_stripe_dcharge_id",
      "extract": "id"
    }
  ]
}

 


Sample Customer Deposit Field Mappings

{
  "fields": [
     {
      "generate": "customer",
      "extract": "nsCustomerId"
    },
    {
      "generate": "payment",
      "handlebars": "{{toFixed (divide amount 100) 2}}"
    },
    {
      "generate": "location",
      "hardCodedValue": "2"
    },
    {
      "generate": "paymentmethod",
      "hardCodedValue": "10"
    },
    {
      "generate": "account",
      "hardCodedValue": "2"
    },
    {
      "generate": "custbody_nm_stripe_dcharge_id",
      "extract": "id"
    }
  ]
}


 

Was this article helpful?
0 out of 0 found this helpful

More resources