Automatic Payment Application


The invoice auto-match workflow is designed to eliminate integration coordination in complex billing and collection situations. For example, consider the following situations:

  • Stripe handles subscription billing but invoices in NetSuite are created later on by a custom system.
  • SalesForce/Docusign manages sales and initial payment, and NetSuite is used for A/R.
  • Invoices are created in NetSuite before a Stripe charge is created and the system managing payment collection is not connected to NetSuite

In most cases, there is a disconnect between these various systems: the system creating the Stripe charge isn’t connected to NetSuite. Auto-match eliminates coordination between these systems: one system can create a charge, another can create the invoice in NetSuite, and SuiteSync manages applying the payment to the correct invoice.

Here’s how it works:

  1. The Stripe charge is brought over to NetSuite as an "unapplied" CustomerPayment
  2. A search is run for an open invoice with an amount remaining (plus/minus $0.05). Note that this mismatch tolerance can be customized or eliminated.
  3. If an open invoice is found, the CustomerPayment is applied against the invoice.
  4. If an invoice match is not found the search process repeats every hour for three days. This retry schedule can be customized.
  5. Whether or not a match is found, the payment is reconciled against a bank deposit and fees are calculated.

Technical Overview

Your system is responsible for:

  1. Ensuring the Stripe customer is linked to the same customer the NetSuite Invoice is created against. Here’s an example of how to link a Stripe customer to a Netsuite customer.
  2. Creating a Stripe charge with an amount that matches the total amount due. Note that a tolerance amount can be configured to enable payments to match if they are within a couple of cents of the amount due on an open NetSuite Invoice. Slight mismatches can often occur in more complex invoice structures where NetSuite will round floating point numbers in an unexpected way.

View Example Implementation

SuiteSync handles the rest:

  1. Pulling the charge over as an unapplied CustomerPayment
  2. Running a search every hour for an open invoice with an amount remaining (i.e. amount due) that matches the total unapplied amount of the CustomerPayment. Note that in most cases, the invoice total will match the amount remaining and the unapplied amount of a CustomerPayment will match the CustomerPayment total.
  3. Handling refunds or disputes created against the charge.
  4. Reconciling payments and refunds or disputes to the correct bank deposit
  5. Calculating processing fees, fee refunds, dispute fees, etc

Some other details to keep in mind:

  • The currency of the created invoice must match the currency of the Stripe charge
  • By default, if there are multiple matches for a Stripe charge, the charge is not applied to any of the matched invoices. There is an optional feature available to apply the payment to the invoice whose transaction date is closest to the date that the Stripe charge was created.
What happens if no match is found?

If no match is found, the auto-match operation is re-run every hour for the next three days.

After a three day period if no match is found, Stripe Error: no invoice match found is added to the memo of the CustomerPayment.

If no match is found, there’s an optional feature available which enables "auto apply" on the CustomerPayment.

If a CustomerPayments is manually applied does the integration continue to search for a match?

No. As soon as the CustomerPayment is fully applied to one or more invoices SuiteSync will stop searching for matches.

Can I manually apply a portion of a CustomerPayment, and let SuiteSync auto-match the remaining unapplied amount?

Yes. The auto-match functionality looks at the unapplied amount of a CustomerPayment and the amount remaining amount on invoices to determine a match.

How are refunds and disputes handled?

If the charge is successfully linked to an invoice, both a CreditMemo and CustomerRefund are created to handle both the income and cash representation of the refund. Disputes function in a very similar way.

It’s also possible to initiate a refund from NetSuite, by creating a CreditMemo on the associated invoice or by creating a CustomerRefund applied directly against the CustomerPayment. This is an optional feature.