Cert++
Close

Checkout API status codes and polling for calculator completion

Key Takeaway

Don't invoke another Checkout API until the previous request returns 200 OK. A 202 means keep polling, and a 422 means a calculator failed.

Checkout APIs start calculators that keep running in the background to work out pricing, promotions, inventory, shipping and tax. The HTTP status code tells you whether that work is finished. Calling the next API or changing the cart too early causes conflicts, locked-cart errors and wrong payment amounts, so you poll the checkout until it returns 200 OK before taking the next step.

Calculators run in the background

Calculators run automatically when you invoke Checkout APIs. Because they run asynchronously, a successful API response doesn't mean processing is complete or that the data is ready.

Salesforce Accredited B2B Commerce Developer Professional Study Guide

Checklist progress

0/124Learned

Troubleshoot the B2B Commerce system using available tools

0/22

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Salesforce Accredited B2B Commerce Developer Professional studiers. 757 members and growing.