Testing & Technical Questions

Before moving your integration account to production, it's helpful to run tests against your Stripe test environment connected to your NetSuite sandbox.


Which record fields are utilized by the integration?

Which fields are used depends on your exact configuration. The list below provides a guide that is correct in the large number of configuration.

Note that it is important for the fields used below to exist on the custom forms used for any of the records created or used by the integration.

Auth-capture:

  • SalesOrder. Read-only.
  • Invoice. Read-only.
    • custbody_suitesync_authorization_code. In some cases, the value in this field is updated by the integration.
    • amountRemaining (sometimes called "Amount Due")
    • status
    • currency
    • tranId
    • memo. More information on how the memo is used
    • createdFrom
    • entity
    • externalId. Learn more.
  • Customer
    • externalId
  • CreditMemo
    • memo
    • currency
    • custbody_suitesync_authorization_code
    • Line items sublist.
  • CustomerPayment
    • memo
    • currency
    • paymentMethod. Set to the "Stripe" payment method (this is created in your account)
    • account. Set to "Undeposited Funds" by the integration
    • payment
    • tranDate. Always set to the exact date of the transaction in Stripe.
  • CustomerRefund
    • memo
    • currency
    • tranDate. Always set to the exact date of the transaction in Stripe.
    • paymentMethod. Set to the "Stripe" payment method (this is created in your account)
    • account. Set to "Undeposited Funds" by the integration
  • Deposit.
    • currency
    • memo
    • All sublists: payment list, other deposits, cash back

I don't have a NetSuite sandbox. Can I still test the integration?

Yes. If you don't have a sandbox account, we can work directly in your production account. During testing, they’ll be some test data created in your account. If you are using your production NetSuite account, these test records will need to be manually deleted.

Can I test multiple Stripe accounts simultaneously?

Yes! Reach out to support@suitesync.io and we'll set you up.

How do I create a test transfer in the Stripe test environment?

Transfers are created automatically in your test environment, just as they are in your Stripe live environment. There isn't a way to create transfer at-will in a Stripe test environment.

To test transfer translation with the integration, you'll need to wait until the test charges and refunds you created are bundled into a transfer.

How do I create a dispute in the Stripe test environment?

You create disputes by using a special card number. Alternatively, you can use this example code to create disputes in your test environment.

Is the integration tested against upcoming NetSuite releases?

Yes. We have a automated testing system that runs on a daily basis against the most recent NetSuite release that tests every feature and use-case of the integration. In additional, when a new NetSuite version is released, there are manual tests run with the integration to ensure that everything is functioning properly.

Can I test the integration against the upcoming NetSuite release?

Yes, you can connect your Stripe test environment to your NetSuite release preview to ensure that the Stripe NetSuite integration functions properly with the latest NetSuite release and any other integrations you have in place.

How can I verify programmatically that a Stripe record was successfully created in NetSuite?

When a Stripe record is successfully translated to NetSuite, the created record's NetSuite internalId is written back to the Stripe record's metadata. You can verify that a Stripe record has been translated to NetSuite by checking the Stripe metadata. Here's an example:

require 'stripe'

customer = Stripe::Customer.retrieve('cus_123')

loop do
  customer.refresh

  if ns_customer_internal_id = customer.metadata['netsuite_customer_id']
    puts "NetSuite Customer ID: #{ns_customer_internal_id}"
    exit(0)
  end

  puts "Waiting for customer to translate to NetSuite..."
  sleep(1)
end

Alternatively, you can attempt to get a record in NetSuite by the Stripe ID:

require 'netsuite'

while (ns_customer = NetSuite::Records::Customer.get(external_id: 'cus_123')).nil? do
  puts "Waiting for customer to translate to NetSuite..."
  sleep(1)
end

How long does it take a Stripe record to translate to NetSuite?

Under normal conditions, around ten seconds. Transfers can take much longer, depending on how many transactions are bundled into the transfer.

Note that translation times can vary greatly depending on various factors (the Stripe webhooks system, NetSuite API performance, and many other factors) and are not guaranteed.

Are uncaptured Stripe charges pulled into NetSuite?

No. Uncaptured Stripe charges do not effect your available balance, and therefore do not effect your cash accounts in NetSuite.

When I inspect a uncaptured and released Stripe Charge using the Stripe API, it indicates there is a refund. Why? Is this refund pulled into NetSuite?

This refund is not pulled into NetSuite. Stripe represents the release of the funds with a refund object. This refund does not effect your available balance, and therefore is not pulled into NetSuite.

Here's some tips relating to uncaptured or partially captured charges:

  • When a charge is fully released, there be a single refund with reason = null
  • When a charge is partially captured you will reason = partial_capture
  • You can test for released charges with !charge.captured && charge.refunded

How do partially captured charges look on my customer's credit card statement?

The customer will only see the captured portion of their charge on their credit card statement. They will not see a refund for the uncaptured amount.

However, when a portion of the charge is released each bank can represent the "transition" from a authorized charge to a captured charge however they would like.

For instance, consider this example:

  • A $10 charge was authorized with a company name "UNCAPTURED-CHARGE"
  • The next day, $5 was captured

Here's how this charge looked in a credit card's online portal over the course of three days

Stripe Captured Charge
Stripe Captured Charge
Stripe Captured Charge

Performance is slow! What's wrong?

Most likely, SuiteTalk (the NetSuite technology that SuiteSync uses behind the scenes) is performing slowly. You can monitor performance on the "Web Services Usage Log" page.

For most records, performance should be less than a second. For most get operations, performance should hover just above 0.1 seconds.

Here are some factors which influence performance:

  • The NetSuite sandbox. Sandbox performance can vary significantly; it's not uncommon for performance to degrade by 100x for a short period. Often in an hour or two sandbox performance returns to normal.
  • SuiteScripts. Some scripts can hugely effect NetSuite performance—both in the GUI and via SuiteTalk. Use NetSuite performance tools to audit poorly performing scripts.
  • NetSuite data center issues. It's possible for the server that your NetSuite account to experience problems which decrease SuiteTalk performance.

NetSuite support is the best channel to resolve these issues.

Note that since SuiteSync uses SuiteTalk to communicate with NetSuite, SuiteSync does not effect NetSuite performance.

If your pages are generally loading slowly, try double clicking on the NetSuite logo in the upper left. You'll be presented with a popup detailing performance details about the page. The sandbox version of this popup is very limited, if you sandbox performance is very slow try contacting NetSuite support.

Is SuiteCloud Plus Supported?

Yes. If SuiteCloud plus is enabled on your NetSuite account, support for this feature can be enabled in your SuiteSync account increasing the throughput of your account by 10x. Contact support to enable this feature.

I don't see any SuiteScripts in my NetSuite account related to SuiteSync. How does this system work?

SuiteSync does not use SuiteScript for NetSuite communication. The SuiteTalk API is used.

SuiteTalk is used to push and pull data from your NetSuite account to SuiteSync's servers, where all integration work is handled. SuiteSync is designed to be resilient against lots of various failures (system outages, network downtime, intermittent NetSuite or Stripe errors, etc).

Unfortunately, SuiteScript is not an option for robust system integrations. Here are some of the SuiteScript limitations that motivated us to use SuiteTalk and not SuiteScript for this integration:

  • Poor error reporting
  • No delayed error retry support (if the Stripe API is down or slow, for example)
  • Limited support for external libraries
  • Limited automated testing support (there are 100s of automated tests that run daily to ensure the integration works with the latest Stripe & NetSuite APIs)
  • Limited deployment automation

How do I view the internal ID for NetSuite records?

The internal ID is a unique identifier for NetSuite records that does not change over time. SuiteSync uses this identifier to reference NetSuite records. Here are two ways to easily retrieve this ID:

  1. Grab the internal ID from the URL. The internal ID of NetSuite records are always included in the URL. For instance, the internal ID of https://system.na1.netsuite.com/app/accounting/transactions/custpymt.nl?id=720201 is 720201.
  2. Show internal IDs in the NetSuite GUI. You can do this by navigating to 'Home > Set Preferences > General > Defaults > Show Internal IDs'

Show Internal IDs Preference Pane Permissions

Here's another tip: if you want to view the internal structure of a NetSuite record, include xml=true at the end of the URL. For instance:

https://system.na1.netsuite.com/app/accounting/transactions/custpymt.nl?id=720201&xml=true

If I have an internal ID of a NetSuite record, how do I view the corresponding record?

Unfortunately, there's not an easy way. You cannot search for a record in the global search by its internal ID and there's no "global" URL you can use to find a record by the internal ID.

However, the majority of records you'll want to look up are "transaction" records (payments, refunds, invoices, etc). There's a hidden URL you can use to lookup a record by it's internal ID:

https://system.netsuite.com/app/accounting/transactions/transaction.nl?id=123

Just replace the 123 in the above URL (and the system.netsuite if you are on a separate datacenter).

How do I test the customer credit hold feature?

The credit hold feature is helpful for indicating in NetSuite when a customer's stored card is failing to charge. Here's how to test it:

  1. For subscriptions, use the special card number 4000 0000 0000 0341 combined with a short trial period on a new subscription. When the trial ends, a new invoice is created in Stripe for the next subscription period, which will failed to be paid because of the 0341 card number. In the dashboard, you must set the trial period to be at least one day. Using the API, you can set the trial period to be 1 minute, which examples you to quickly test the customer hold feature. Here's an example
  2. For the auth-fulfill-capture flow, capture the charge before creating an invoice for the SalesOrder and the card used for the charge from the customer. When the integration encounters a captured charge, it will attempt to create a new charge for that invoice. Since the payment method was deleted, the charge creation will fail. This can be done through the dashboard, or through the API.

How can I watch for errors or failures?

Any errors integrating data to NetSuite appear in the SuiteSync failure queue:

https://dashboard.suitesync.io/dashboard/failures

However, failures related to processing Stripe charges are not displayed in SuiteSync. Stripe has a "logs" area which provides an easy way to see which requests are failing against its API. If SuiteSync encounters an error when processing a card the error will show up in these logs:

https://dashboard.stripe.com/logs?success=false