Place an Order on Behalf of a User in a B2B Commerce Store
Store admins can place an order for a B2B Commerce store checkout on behalf of a user. This enhancement is specifically to complete checkouts that the user has already initiated. This enhancement allows store admins to complete checkouts where the payment is successful but the initial place order call failed.
For example, when a user's payment is successful but the initial order creation fails, the store admin can re-trigger the order placement using the same payment reference, ensuring all successful payments result in a corresponding order.
Resource
/commerce/webstores/{webstoreId}/checkouts/{checkoutId}/orders
Make a POST request to the Commerce Webstore Checkout Orders resource for the order placement.
Request Parameters
| Parameter Name | Type | Description | Required or Optional |
|---|---|---|---|
| webstoreId | String | Specify the webstore ID. | Required |
| checkoutId | String | Specify the checkout ID. The value active isn’t supported for this field. | Required |
| effectiveAccountId | String | Specify the ID of the buyer account or guest buyer profile for which the request is made. | Required |
Considerations for Admin Order Placements
- Only store admins can perform this operation.
- Existing validations, business logic, and permissions remain enforced.
- Orders created through this operation retain the user's ownership details.
- Best practice:
- Perform thorough validation and testing in a sandbox environment, ensuring all related customizations and automations work as expected.
- Use this operation only under controlled administrative conditions to specifically recover orders where a payment succeeded but the original order creation failed..