markSalesOrderPaid mutation
markSalesOrderPaid is a GraphQL mutation of the Chameleoon MAX API. Send it as POST https://max-api.chameleoon.sk/api/v1/graphql with your API key, see Chameleoon MAX.
Marks the order as paid in full. Call it when the customer has paid in the external source.
MAX records one settled payment for the amount still owed, in the order's payment method. If a user changed the order in MAX since it was placed, the MAX total applies.
Permissions
Requires the order.write and order.read permissions.
Repeated calls
A repeat changes nothing and returns changed: false. The same happens when the payment
reference is already settled on this order.
Errors
CONFLICTwhen the order is cancelled, merged or a draft.CONFLICTwhen a pending or authorised payment is recorded on the order.CONFLICTwhen thereferenceis on this order with another status, such as a failed or voided payment or a refund. A user in MAX resolves these cases.CONFLICTwhen thereferencebelongs to another order. Send the correct reference.NOT_FOUNDwhen the order does not exist or your API key cannot see it.
An error whose path runs below this field does not mean the call failed: the payment was recorded, so do not retry. See
Mutation.
Arguments
ref:SalesOrderRefInput!· requiredpaid:SalesOrderPaidInput
Returns
Example
Mutation
Code
Variables
Code
Response
Code
Values are illustrative: replace IDs and codes with your own before you send the call.