Case Study
Our customer needed a more efficient way to pre-authorize credit cards before sending sales orders to the warehouse. Previously, their process involved taking the order, fulfilling it, updating the sales order with the shipping cost, and then creating the invoice to apply a customer payment.
To improve efficiency and reduce errors, we implemented a workflow that allows the credit card to be pre-authorized as soon as the sales order is created—before it reaches the fulfillment stage and then change the amount of payment once the shipping cost was calculated . This proactive approach helps prevent cancellations of billed sales orders, minimizes unnecessary work, and eliminates potential mistakes during fulfillment.
This post highlights how automating the pre-authorization process not only streamlines operations but also strengthens cash flow control and improves customer experience. By securing payment before fulfillment, your team can confidently release orders to the warehouse, knowing that the funds are verified and ready to capture once the order is completed.
Another requested feature—applying open credits and payments at the sales order level—further enhances the process by ensuring that any customer balances or prepayments are automatically linked to the correct orders, reducing manual reconciliation work. We will visit this in our next post.
In this sales process, the cycle begins with a Quote, where the sales representative specifies the customer, items, and any relevant instructions such as “Free Shipping” or “Money on Account”.
Once the quote is converted to a Sales Order, which proceeds through Item Fulfillment, and eventually generates an Invoice.
This new requirement introduced technical and accounting challenges:
NetSuite Behavior After Authorization
When a credit card is authorized on a Sales Order in NetSuite, subsequent fulfillment automatically generates a Cash Sale instead of an Invoice.
This default behavior aligns with NetSuite’s logic that “authorized + fulfilled” transactions are immediately payable.
However, this became problematic because Cash Sales cannot have Credit Memos or Customer Payments applied to them, even though official NetSuite documentation suggests otherwise.
After extensive testing, we confirmed that Credit Memos can only be applied to open Invoices, not Cash Sales.
This meant that once the card was authorized, no credits can be applied, breaking the client’s accounting rules and customer expectations.
Shipping Cost Uncertainty
For customers with “Prepaid and Charge” terms, shipping costs are not known until the Item Fulfillmentrecord is created.
However, the business requirement was to authorize the full amount before fulfillment.
To solve this, we designed an approach to estimate shipping at 10% of the total item cost during the Quote stage.
This allows the system to authorize an amount close to the final total without waiting for the actual shipping rate.
Applying Customer Credits and Customer Payments
This to be discussed in our next post
The Solution Design
Shipping Estimation Logic
When a Quote is created and the customer’s terms are “Prepaid and Charge,” the system automatically:
When the actual fulfillment happens, the real shipping cost replaces the estimate, and the captured amount reflects the true total.
Custom “Credits to Apply” Subtab
We developed a custom tab available on both Quote and Sales Order records, labeled:
“Credit Memos / Customer Payments to Apply.”
This subtab contains a dynamic sub-list that:
Validations enforced:
Adjusting the Authorized Amount
When the user selects available credits:
Example:
If the order total is $110 and the customer applies $50 in credits, the authorized amount will be $60.
Dummy Invoice Creation
Because Credit Memos and Customer Payments cannot be applied to Cash Sales, we introduced an intermediate record — the “Dummy Invoice.”
When the Sales Order is saved:
Giving as result; Invoice total amount = credit amount to apply.
This ensures that the credits are marked as used in NetSuite, preventing reapplication, while keeping the main Sales Order available for CyberSource authorization and later Cash Sale creation.
Scenario-Based Behavior
During implementation, several possible payment scenarios were identified, each requiring a distinct workflow.
The following section describes the behavior of the system for each case, the validations applied, and how CyberSource and NetSuite respond under those conditions.
Scenario 1 — No Customer Credits Available
Condition:
The customer has no available Credit Memos or Customer Payments.
The entire order amount must be paid via credit card.
Flow:
Outcome:
A standard “authorized capture” flow with no credit application. The Sales Order transitions smoothly from authorization to fulfillment to Cash Sale.
Scenario 2 — Partial Payment Using Credits and Credit Card
Condition:
The customer will partially pay the order using credits on account and cover the remaining balance with a credit card.
Flow:
Example:
If the Sales Order total is $100, and the customer applies $50 in credits, only $50 is authorized through CyberSource.
The Dummy Invoice is created for $50 and used to consume the credits.
Outcome:
Credits are properly consumed through a separate Invoice record, while the remaining balance is processed via credit card authorization and later captured.
Scenario 3 — Fully Paid with Customer Credits
Condition:
The customer has enough Credit Memos or Customer Payments to cover the full Sales Order amount.
No card authorization is needed.
Flow:
Outcome:
The entire order is paid with existing credits.
The resulting Invoice reflects all applied records under Related Records → Payments, confirming that no authorization was required.
Scenario 4 — Authorization Failure (No Credits)
Condition:
The Sales Order has no credits applied, but the CyberSource authorization fails.
Flow:
Outcome:
The failed Sales Order is closed.
This prevents accidental reuse or double processing of payment data.
Scenario 5 — Partial Credits + Authorization Failure
Condition:
The Sales Order includes credits to apply and still requires partial authorization through CyberSource, but the authorization fails.
Flow:
Outcome:
No financial impact occurs.
Credits are not consumed, and the user can safely create a new Sales Order to retry authorization.
Validation Logic
To maintain data integrity, the following checks are enforced before saving the Sales Order record:
This implementation successfully bridged the gap between NetSuite’s native payment flow and the business requirement to authorize funds early while still honoring existing customer credits.
By combining the CyberSource Payment Bundle, a custom “Credits to Apply” feature, and a controlled “Dummy Invoice” process, the requirements achieved an automated payment workflow that remains compliant with both accounting rules and CyberSource’s transaction model.
The resulting solution minimizes human intervention, prevents double application of credits, and provides clear visibility into every financial event — from authorization to final payment.
It also ensures that customers with funds on account are accurately credited before any charge is made to their card, improving both user experience and reconciliation accuracy.