Creating Stripe Refunds from NetSuite

SuiteSync enables your support and finance teams to create a Stripe refund from within NetSuite. This automates refund reconciliation, in addition to decreasing the possibility of a mistake being made and eliminating process friction by keeping the refund flow in NetSuite


This feature can be used with any of the supported flows, enabling your support or accounting team to issue refunds to payments in Stripe without leaving NetSuite. Since the refunds are created by SuiteSync, they are automatically reconciled to a bank deposit along with any fee refunds.

Here's how it works:

  1. Your team, or an automated process on your end, creates a unapplied CreditMemo in NetSuite. This CreditMemo contains a reference to the Stripe charge you'd like to refund. If you are using the eCommerce, auth-capture, or subscription flows this is done automatically.
  2. When the CreditMemo is created, SuiteSync creates a refund in Stripe for the total amount of the CreditMemo.
  3. A CustomerRefund is created and applied to the unapplied CreditMemo (just like a standard refund).

Technical Overview

  1. When the Invoice was created, the Stripe Charge ID was associated with it using the "SuiteSync Authorization Code" custom field.
  2. In most cases, when you create a CreditMemo, this Stripe Charge ID will be copied to the CreditMemo from the Invoice the CreditMemo is created from.
  3. SuiteSync looks for CreditMemos linked to Stripe Charge IDs via the custom field, and creates a Stripe refund for the total amount of the CreditMemo.
  4. The Stripe refund is brought over to NetSuite as a CustomerRefund, and is applied to the CreditMemo.
  5. The CreditMemo’s "SuiteSync Authorization Code" field is set to the newly created Stripe refund ID.

Here's a couple of details to keep in mind:

  • If the "SuiteSync Authorization Code" is blank, or does not contain a valid Stripe Charge ID, no refund is created in Stripe
  • Multiple partial refunds are supported (as long at the total refund amount is less than the amount of the charge).
  • The CreditMemo total field, not the unapplied amount of the CreditMemo, is used for the refund amount. If you partially apply a CreditMemo to a Invoice in NetSuite it does not effect the amount that is refunded in Stripe.
  • If the CreditMemo does not have a status of "Open", a refund is not issued.
  • The Stripe charge ID does not need to be in place when the CreditMemo is created. You can update the "SuiteSync Authorization Code" with the Stripe Charge you'd like to refund at any point after the CreditMemo is created.
  • If you fully refund a charge in Stripe, either directly through Stripe or using the CreditMemo, do not void the associated CustomerPayment in NetSuite. This will cause issues during the reconciliation process: the amount in Stripe will not match the amount in NetSuite.

eCommerce Example

Here's an example of how this can be used with a standard NetSuite eCommerce workflow.

Without SuiteSync in place, here's what the return and refund workflow would look like in NetSuite:

  1. Create a Return Authorization. This transaction is non-posting. A return authorization is only required if 1) the items the customer purchased are tied to inventory and 2) the customer is returning those items.
  2. Create a Credit Memo. This transaction posts to your income and A/R accounts based on the items contained with the Credit Memo.
  3. Create a Customer Refund. This transaction posts to your A/R and cash accounts and should be created once the payment is returned to the customer.

With SuiteSync, step #1 and #2 is handled by your sales personnel, or an automated system on your end; SuiteSync will handle #3.

When a CreditMemo is created, if the original charge ID is specified in the "SuiteSync Authorization Code" field, SuiteSync will automatically create a CustomerRefund. This CustomerRefund is then applied to the CreditMemo.

By default, the CreditMemo will copy the charge ID from the Invoice it was created from. This means there is no manual work or scripting that needs to be done to automatically refund a Stripe charge from within NetSuite.

Note that the custom form your invoice and credit memo is using must expose the "SuiteSync Authorization Code" field otherwise this process will not work.

Refunding an Unapplied Payment or Customer Deposit

To issue a refund for an unapplied payment, don't create a CreditMemo. Instead, create a CustomerRefund for the amount you'd like to refund and make sure it's applied to the payment you'd like to refund. The payment you'd like to refund must have been created by the integration.

After the refund is created in NetSuite, SuiteSync creates a refund in Stripe for the amount of the CustomerRefund in NetSuite automatically.

Here are some details to keep in mind:

  • A refund is only issued if the CustomerRefund is applied to a CustomerPayment which represents a Stripe payment.
  • A refund will not be issued if the CustomerRefund is applied to more than one CustomerPayment. Only apply the refund to a single NetSuite payment.

Refunding a CashSale

Issuing refunds from CashSales by creating a CashRefund is also supported.

How are failures handled?

Some failures simply cause a delay (if the NetSuite or Stripe API is down, for instance) and are handled automatically. However, there are some errors that cannot be recovered from automatically and require intervention on your end to resolve.

Charge is already refunded

If the charge specified on the CreditMemo is already fully refunded in Stripe, Stripe Refund Error: charge is already refunded is to the memo of the CreditMemo.

Requested refund exceeds original charge amount

If the refund amount specified is greater than the original charge amount, a message is added to the memo of the CreditMemo Stripe Refund Error: refund is greater than original charge amount 10.00.

Requested refund exceeds available refund amount

If the refund amount specified on the CreditMemo is greater than the amount of the original charge, Stripe Refund Error: refund is greater than remaining unrefunded amount is added to the memo of the CreditMemo. For instance, if the original charge was for $120 but the CreditMemo total is $130 you will encounter this error.

Currency of the CreditMemo does not match the currency of the charge

Stripe Refund Error: currency mismatch is added to the memo of the CreditMemo.

Refund requested, but charge is not linked to a invoice

In most cases, this is not a hard failure. The refund will still be processed in Stripe.

However, the refund cannot be pulled into NetSuite until the charge is linked with a NetSuite Invoice. This will be noted on the credit memo with the following message Stripe Refund Error: charge is not linked to invoice. In most cases, to fix this issue add the charge ID to the "SuiteSync Authorization Code" of the corresponding invoice.

Note that if you are using netsuite_block_integration then this case is a hard failure. You will need to ensure the charge is linked to the invoice before the refund is processed. In some cases, eCommerce workflows will use the netsuite_block_integration feature. contact support if you are not sure if this is enabled on your account.

Refund requested, but a chargeback has already been issued on the charge

Once a chargeback is issued, a payment cannot be refunded. If you issue a refund after a chargeback has already occurred Stripe Refund Error: charge is disputed is added to the memo of the CreditMemo (or CustomerRefund).

Refund is applied to multiple transactions

This error is only applicable when unapplied customer payments or deposits are refunded.

When issuing a refund for a Stripe charge, the CustomerRefund should only contain a single apply item: the Stripe charge you would like to refund. If you create a refund for multiple payments at once, Stripe Refund Error: refund request detected, but refund is connected to multiple transactions is added to the memo of the CustomerRefund.

Generic Failure

The error message from Stripe is indicated on the CreditMemo's memo field.

Network or API Errors

If there is a Stripe or NetSuite outage, or if there are network errors the refund operation is retried. Retries are run every hour for the next 72 hours until it succeeds. If it fails after 72 attempts, you must manually retry the operation in the SuiteSync dashboard.