Configure - Add Customer Payments to Open NetSuite Invoices from Stripe Charges

  • Updated
Data Flow Add Customer Payments to Open NetSuite Invoices from Stripe Charges
Flow Type Scheduled
NS Record novamodule Open Invoices from Stripe Charges to Create Customer Payments Export Template, Customer Payment

 

Description:

 

Get the list of open Invoices from NetSuite which does not have a invoice record in Stripe using novamodule Open Invoices from Stripe Charges to Create Customer Payments Export Template saved search. Then create a customer payment for the invoice record

 

  • Once the flow is scheduled it gets the list of open invoices from NetSuite using Novamodule Open Invoices from Stripe Charges to Create Customer Payments Export Template . It gets all the invoices where at least one of Stripe Charge Id or Stripe Invoice Id or Stripe Payment Id fields are populated and the invoice status is neither void or paid in full. A script is used to add the NetSuite Payment id to the backend data.
  • If the Stripe payment Id is empty then the flow looks for charge in Stripe using Stripe Charge Id in Stripe Lookup
  • If the Stripe Payment Id is empty then the flow looks for payment intent in Stripe using StripeCharge Id from previous Stripe Lookup. A script is used to convert the payment response to JSON and attach it to each entry.

Customer Payments

  • However, if the Stripe Payment ID field is not empty, the process switches to locating the payment intent in Stripe, using the Stripe Payment Intent ID from the Netsuite Stripe Payment Intent Id in the Stripe Lookup. Prior to this, the system verifies the existence of a customer payment record in Netsuite for the specified payment details. This validation is performed using the filter ["custbody_nm_stripe_payment_intent","is","{{{paymentDetails.id}}}"], where the value in the field custbody_nm_stripe_payment_intent serves as an external ID for the customer payment record in Netsuite.
  • Should a customer payment record already exist, the step is bypassed, ensuring no duplicate records are created. Conversely, if no existing record is found, a new customer payment entry is generated in Netsuite for the payment in Stripe

Metadata Update

  • Subsequently, if the checkbox is enabled in the settings, the NetSuite Customer Payment ID is appended to the Stripe payment metadata.



 

Configure IO Settings:

 

  •  Click on Settings - Payments - Stripe to NetSuite 

 



  • Select account for NetSuite Customer Payment.
    • Select the account  to be used for customer payments in NetSuite

 

  • Select the NetSuite saved search for Open invoices which will be available after the bundle installation novamodule Open Invoices from Stripe Charges to Create Customer Payments Export Template. Make a copy of the saved search and use the copied saved search for any additional criteria or results

 

  • Select Payment method for NetSuite
    • Select the payment method to be used for customer payments in NetSuite

 

  • Update NetSuite Payment Id to Stripe Metadata
    • Check this checkbox to update netsuite payment id into stripe metadata

 

IO Mappings: 

  • Create a Customer Payment into NetSuite
    • The process incorporates a dynamic lookup method to retrieve customer information by employing the filter condition ["custentity_nm_stripe_customer_id","is","{{{_PARENT.stripe_customer_id}}}"].
    • In the event that the customer does not exist in NetSuite, the import process encounters an error and halts execution. 

 

  • Update Stripe Payments Metadata with NetSuite Open Invoices Customer Payment Id
    • Add the mappings as mentioned below
      • Source record field (Stripe)
        • Give the name of the field you want to get the value from
      • Destination record field (Stripe)
        • Enter metadata followed by the name you wish to give to the field

(metadata.<anyNameForTheField>)



● Adjust the mappings if needed like location mapping.