Automatic NetSuite Invoice Payment Using Stripe
Automate collections by paying NetSuite invoices used saved card or bank information. Send links to customers that enable them to easily update their saved card or bank account.
This workflow is helpful for users who need to automatically pay invoices generated inside NetSuite and provide a simple way for customers to submit a card or bank account for future use.
Here's where this workflow is helpful:
- SuiteBilling, or some other NetSuite service, creates Invoices. These invoices need to be paid automatically using Stripe, based on their due date or some other data on the Invoice.
- Most sales are handled through a webstore or online billing platform, but some are managed using a manual process that creates NetSuite invoices. These invoices need to be paid after they are created in NetSuite
- NetSuite invoices are imported using a CSV-based workflow. After these invoices are imported customers should be automatically charged for the amount due.
- If a customer does not have a saved card or bank account, the customer needs to be able to update their payment details easily.
Here's an overview of this workflow:
- You create a NetSuite Invoice and set the due date
- Each day, SuiteSync pulls all unpaid invoices due and attempts to pay them using the customer's default card or bank account in Stripe
- If a payment is successful, a NetSuite CustomerPayment is applied to the open invoice in NetSuite.
- If a payment fails, this is noted on the invoice.
- Refunds can be issued directly in NetSuite
- Disputes are automatically pulled into NetSuite
- All payments automatically reconcile to a NetSuite bank deposit. Fees are recorded.
This workflow pairs nicely with the payment form. This payment form integrates with this workflow and can be used to:
- Create a Stripe customer if one does not exist for a NetSuite customer
- Save or update payment credentials if no saved payment credentials exist or if the saved payment method is failing
This auto-bill or "batch payment" functionality is driven by two primary invoice fields:
- Due Date. Each day, invoices that are due are attempted to be paid.
- Status. The invoice must be
Every day at 5 am PT invoices that are due and unpaid are attempted to be paid using the customer's saved card or bank account.
In most cases, you'll want to limit the invoices that are "marked" for automatic payment. This can be done using a saved search.
You can create a NetSuite Invoice saved search with whatever criteria you'd like and provide SuiteSync with the internal ID of the search. SuiteSync appends the due date (today) and status criteria (open or unpaid) to the saved search that you create. Any invoices that meet the criteria of your saved search in combination with these two additional criteria will be auto-paid.
For each invoice that is scheduled to be paid:
- If a saved card or bank account exists for that customer, a payment for the amount due on the invoice is attempted. The Stripe charge description is set to "Automatic Payment for Invoice XYZ" (where XYZ is the NetSuite transaction ID).
- If the payment succeeds, a CustomerPayment is created and applied to the Invoice.
- If the charge fails:
- A memo is added to the invoice indicating that the charge failed.
- A metadata field is added to the default card indicating that it failed. This instructs the payment form to update the customer's default card when the customer enters new payment credentials
- A NetSuite workflow can easily be created to email the user with a link to the invoice when their payment fails.
I only want certain invoices to be automatically billed. What's the best way to set this up?
Create a NetSuite Invoice saved search which identifies the invoices you'd like to automatically bill.
If there isn't an obvious way to identify these invoices through a saved search, the payment terms on the invoice is an excellent way to filter invoices for automatic payment. Setup a new payment term for use only on invoices that should be automatically paid. Then go ahead and associate the new terms with all invoices (and customers) that should be auto-billed and create a saved search to exclude any invoices that do not have these special payment terms.
For most users, not all invoices should be automatically billed. Creating a saved search to select a specific set of invoices to be automatically billed is how SuiteSync ensures only the correct invoices are auto-charged.
How is the NetSuite customer linked to a Stripe customer?
externalId field. The Stripe customer ID (
cus_123) is used as the external ID of the corresponding NetSuite customer.
externalId is not set on a NetSuite customer, then it hasn't been linked to a Stripe customer.
I already have customers created in NetSuite, but not in Stripe. Are Stripe customers created automatically?
Yes. When a customer pays an invoice with the payment form a customer is created in Stripe, their payment credentials are saved, and the NetSuite customer associated with the invoice that was paid is linked to the Stripe customer.
This is an optional feature.
I already have Stripe customers and NetSuite customers. Can these be linked together?
Yes. We have migration tools available that can link existing Stripe and NetSuite customers together during the onboarding process.
How can I email the customer automatically when their invoices are unpaid?
This can be done through a combination of a saved search and a NetSuite workflow. Contact support for details.
How are failures handled?
Some failures simply cause a payment delay (if the NetSuite or Stripe API is down, for instance) and are handled automatically. Other failures cause additional information to be added to the NetSuite invoice but are resolved automatically as well.
However, there are some errors that cannot be recovered from automatically and require intervention on your end to resolve.
Customer does not have a payment method saved
If a customer does not have a payment method saved, the following message is added to the Invoice memo:
Stripe: no default payment method for customer cus_123
This can occur on new NetSuite customers, or if the Stripe customer's payment method was edited manually or through the API.
Saved payment method fails to charge
If the customer's saved payment method failed to charge,
Stripe: payment failure for customer cus_123 is added to the Invoice memo.
NetSuite customer is not linked to Stripe customer
If no Stripe customer is associated with the NetSuite customer,
Stripe: no linked customer is added to the Invoice memo.
Note if you are using the payment form a customer can be added automatically to the NetSuite customer when a customer uses that form.
Network or API outages
If there is a Stripe or NetSuite outage, or if there are network errors, the auto-bill batch operation is retried until it is successful.