Skip to main content

changeMobileOrderPaymentMethod

Requires a customer (portal or buyer app) session.

Buyer 'change payment method': switch how this order will be paid — COD, EFT, Online, or On-account (gated by the org's Organization.creditLimitEnabled + the customer's available credit, same check checkout uses). A SEPARATE gate from item/address edits: allowed even on an ONLINE order while unpaid, since that is exactly the case a buyer needs to switch OFF of. Refused if the new method would need to move the order's status BACKWARD from CONFIRMED to AWAITING_PAYMENT (a deliberately guarded status-transition invariant).

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation ChangeMobileOrderPaymentMethod($input: ChangeMobileOrderPaymentMethodInput!) {
changeMobileOrderPaymentMethod(input: $input) {
id
orderNumber
paymentNumber
salesRepName
status
addressId
amendment {
canChangeAddress
canChangePaymentMethod
canEditItems
lockReason
paymentMethodLockReason
version
}
}
}

Variables:

{
"input": {
"orderId": "id",
"paymentMethod": "COD"
}
}

Response:

{
"data": {
"changeMobileOrderPaymentMethod": {
"id": "id",
"orderNumber": "string",
"paymentNumber": "string",
"salesRepName": "string",
"status": "AWAITING_PAYMENT",
"addressId": "id",
"amendment": {
"canChangeAddress": true,
"canChangePaymentMethod": true,
"canEditItems": true,
"lockReason": "string",
"paymentMethodLockReason": "string",
"version": 0
}
}
}
}
changeMobileOrderPaymentMethod(
input: ChangeMobileOrderPaymentMethodInput!
): MobileOrder!

Arguments​

changeMobileOrderPaymentMethod.input ● ChangeMobileOrderPaymentMethodInput! non-null input​

The fields of the mobile order payment method to change.

Type​

MobileOrder object​

Order placed via the mobile BFF. v1 is COD only; persisted in Redis until SalesOrder wiring lands.