Cert++
Close

Place Order API versus Place Order Action API for webhook-confirmed payments

Key Takeaway

When a payment provider confirms payments through a webhook, use the Place Order Action API. The Place Order API doesn't wait for webhook confirmation, so it can create orders for failed payments.

B2B Commerce has two APIs for placing an order at checkout. The older Place Order API (v1) does everything in one call. The newer Place Order Action API (v2) splits the work into a Prepare step and a Submit step. The difference matters most when a payment provider confirms payments later through a webhook, because only the Place Order Action API waits for that confirmation before it creates the order.

How the two APIs differ

The two APIs divide the checkout work differently around payment.

Place Order APIPlace Order Action API
Full nameCommerce Webstore Checkout Orders API (v1)Commerce Webstore Checkout Place Order Action API (v2)
Endpoint/orders/orders/actions
StepsA single-step call, made after paymentTwo actions: Prepare runs before payment, and Submit runs after payment
Validations, inventory handling and coupon processingIn the single callIn Prepare
Order placementIn the single callIn Submit
Successful call returns201 Created200 OK
Cart-to-order processingRuns asynchronously after the callRuns asynchronously after Submit
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.