Payment Method Isn't Authorized error diagnosis
Key Takeaway
When a place-order API returns "Looks like the payment method isn't authorized", find out which API the store calls, then check the payment fields and amounts on the WebCart.
In B2B Commerce checkout, the place-order APIs return the error "Looks like the payment method isn't authorized" when the payment details on the cart don't meet the API's requirements. A common misconfiguration that causes the error is a custom payment option, such as Cash on Delivery, that doesn't meet those requirements. Knowing what each API checks tells you where to look on the WebCart.
The two place-order APIs
There are two place-order APIs. Each one checks payment differently. The Commerce Webstore Checkout Orders API is v1, also called Place Order V1. The Commerce Webstore Checkout Place Order Action API is v2.
| v1 Orders API | v2 Place Order Action API | |
|---|---|---|
| Endpoint | /orders | /orders/actions |
| Placing the order | In a single step | In two parts: Prepare, which runs before payments, and Submit, which runs after payments |
| When payment is validated | Only when the Place Order Action API is enabled | Always, during Submit |