Set Payment Method
Select cart fields, not id
This mutation returns the updated cart — select itemsCount, grandTotal, formattedGrandTotal, success, message, etc. Do not select id (or _id): this is an action result with no addressable record, so the auto-generated IRI field is null and selecting it errors out the whole payload.
Prerequisites
The example uses an illustrative cart id. Admin cart endpoints only operate on draft carts (is_active=0) — storefront carts are rejected by the admin cart guard. Create a draft cart first with the createAdminDraftCart mutation and use the returned cartId.
Operation
| Operation | Type | Purpose |
|---|---|---|
setPaymentMethodAdminCart(input) | Mutation | Save the chosen payment method on the draft cart |
Errors
| Cause | Notes |
|---|---|
| 409 — shipping missing | Select a shipping method first |
| 400 — method missing | Input must include method |
| 403 — active storefront cart | Only draft carts can be modified |
| Unauthenticated | Missing admin Bearer token |

