Troubleshooting Checkout Issues

Common issues encountered during the B2B Commerce checkout process and provides guidance to help identify and resolve them.

  1. OOTB Checkout, Payment, or Place Order API Fails
ActionTroubleshooting Notes
Check for concurrent modificationsVerify if other endpoints or custom code are concurrently modifying WebCart.
Validate last /checkouts API responseLast operation on checkout should return 200.
Handle 202 responseIf last /checkouts API returned 202, wait until GET /checkouts returns 200, indicating asynchronous operations completed.
  1. Custom Components Can’t Update Checkout Information
ActionTroubleshooting Notes
Verify checkout page load statusCheck result of last GET /checkouts call. 202 response means checkout wasn’t completely loaded.
Update customization logicModify customization to wait for GET /checkouts to return 200 before attempting updates.
Use out-of-the-box APIsUse OOTB APIs whenever possible. For example, OOTB API for updating phone number includes necessary validation at invocation.
  1. Payment or Billing Information Gets Overridden
ActionTroubleshooting Notes
Review API orchestrationObserve API call sequence and compare against standard OOTB Checkout flow.
Identify post-payment checkout API usageCheck if any Checkout API is used after entering payment/billing information. For example, updating shipping address re-runs calculators and invalidates payments if total amount changes.
Check custom Apex callsInspect all custom Apex calls made after entering payment/billing information. A customization might be overriding fields.
  1. Payments Created But Not Updated on WebCart
ActionTroubleshooting Notes
Examine /checkouts/payments PostAuth responsesLook for failures in PostAuth API response.
Identify concurrent modificationsMost frequent cause is concurrent modification. Look for concurrent custom code modifying cart state.
Avoid concurrent cart modificationsEliminate concurrent calls modifying cart state.
Verify pre-payment /checkouts statusVerify last /checkouts call returned 200 before invoking payments. If not, modify orchestration to wait for 200 response.
  1. Order or Order Summaries Not Created
ActionTroubleshooting Notes
Check Checkout API failuresReview responses of all Checkout APIs for failures.
Focus on CheckoutPayment PostAuth APICommon point of failure. Refer to troubleshooting steps in “Payments Created But Not Updated on WebCart.”
Verify subsequent API successEnsure APIs following payment step (PlaceOrder/SubmitOrder) were successful.
Review process exceptionsNavigate to Setup > Process Exceptions and check for recent exceptions. See Process Exceptions for more details.
Troubleshoot high scale order ingestionIf High Scale Order Ingestion is enabled, try disabling and re-enabling Order Ingestion from Setup > Order Management.
  1. “Payment Method Isn’t Authorized” Error
ActionTroubleshooting Notes
Check paymentMethodId and paymentGroupId on WebCartVerify both fields are present on WebCart. This applies to Commerce Webstore Checkout Orders API.
Validate payment amount sumEnsure: PaymentGroup.TotalAuthAndSaleAmount + PaymentGroup.PendingAuthAndSaleAmount = WebCart.GrandTotalAmount (or FirstPymtGrandTotalAmount for subscriptions). Applies to Commerce Webstore Checkout Place Order Action API.
Validate custom solutionIf using custom payment solution, ensure it incorporates required field validations.
Verify OOTB solutionIf using OOTB payments, verify CheckoutPayment APIs response was successful.
  1. Order Summary Displays $NaN for $0.00 Line Items
ActionTroubleshooting Notes
Check for custom calculatorDetermine if custom calculator is used for price or promotion logic.
Identify null/undefined price fieldsCheck if any price fields are left as null or undefined instead of being set to 0.
Fix custom calculatorUpdate custom calculator to explicitly set fields to 0 instead of null or undefined.
  1. Shipping Options or Delivery Methods Don’t Load (No Errors)
ActionTroubleshooting Notes
Check for custom shipping calculatorDetermine if shipping calculator is custom implementation.
Verify shipping method generation (custom)If custom, ensure calculator successfully generates and returns shipping methods.
Verify CartValidationOutput (custom)If custom, ensure it creates CartValidationOutput for failure scenarios. Otherwise, checkout may get stuck in bad state.
  1. Phone Numbers Converted to E164 Format
ActionTroubleshooting Notes
Understand phone number validationDefault validation converts input to E.164 format, removing hyphens.
Disable validation (workaround)Enable org permission CheckoutSkipPhoneValidation.
  1. ListPrice on OrderItem Doesn’t Map from CartItem
ActionTroubleshooting Notes
Understand default mappingBy default, CartItem.SalesPrice maps to OrderItem.ListPrice.
Change mappingEnable org permission SalesPriceToListPriceMap. This maps CartItem.ListPrice to OrderItem.ListPrice instead.
  1. “Cart is Currently in Use” Error

Salesforce Knowledge Article Number: 002722661

ActionTroubleshooting Notes
Identify source APIPinpoint which API is returning this error.
Check for concurrent callsError indicates multiple concurrent calls attempting to update cart state.
Eliminate concurrent callsRefactor process to eliminate concurrent calls modifying cart state.
  1. CartCheckoutSession Not Created
ActionTroubleshooting Notes
Check for custom creation logicDetermine if customization creates CartCheckoutSession before invoking Checkout API.
Use single creation methodIf custom logic exists, use only one method. Use standard Checkout API for this operation.
  1. Orders Created Even When Payment Fails in B2B LWR Store
ActionTroubleshooting Notes
Identify Payment Provider and Webhook UsageCheck if a payment provider, such as Adyen is used, which confirms payment via a webhook.
Check for Place Order API UsageIf the webstore uses Place Order API, orders are created immediately without waiting for the payment confirmation webhook, leading to order creation even on failed payments.
Switch to Place order Action API (Recommendation)The recommended solution is to switch to Place order Action API, which only creates Orders after payment is confirmed by the webhook.
  1. Out of Stock Error When Inventory Available
ActionTroubleshooting Notes
Check cart size limitB2B stores have hard limit of 500 line items per order.
Check OCI limit (if enabled)If Order Confirmation Integration (OCI) is enabled, there’s a limit of 100 product ID and location combinations per request.

15.”Invalid checkout session status. Expect: PendingClosed, actual: Active” with cartToOrderSummary

ActionNotes
Check for Place Order Action APIDetermine if Place Order Action is enabled. See Streamline Place Order.
Compatibility issueIf Place Order Action API is enabled, Apex method Sfdc_Checkout.CheckoutOrderService.cartToOrderSummary isn’t supported.
  1. Incorrect Payment Amount
ActionTroubleshooting Notes
Check API orchestration timingPayment was likely initiated before waiting for all Checkout APIs to complete (before receiving 200 response).
Potential amount changesAmount fields on WebCart can change after asynchronous calculators complete. Always wait for 200 status.
  1. “We Can’t Find Checkout” Error
ActionTroubleshooting Notes
Check OptionsCartCalculateEnabledIf OptionsCartCalculateEnabled is disabled, this error is expected. New CartCheckoutSession is required after cart is modified.
  1. Orders Created in Draft Status

Salesforce Knowledge Article Number: 000393690

ActionTroubleshooting Notes
Check for concurrent callsConcurrent calls modifying Cart and Checkout entities compete with Order Activation process, resulting in activation failure and order remaining in Draft status.
Eliminate competitionEnsure no concurrent processes modify Cart/Checkout entities during Order Activation phase.