I’d like to know if it’s possible to update an order’s status to “paid” through a mutation.
I’m using a payment gateway, but the way I’m capturing the payment (via the gateway’s API) doesn’t automatically update the order status in Shopify. I’d like to confirm if there’s a way to update it via a mutation.
Tagging @JordanFinners and @KyleG-Shopify since you’ve both helped me with some questions before, do you happen to know if this is possible or the recommended approach?
@Andrei_Rodrigues you can make it paid using admin GraphQL API
mutation orderMarkAsPaid($input: OrderMarkAsPaidInput!) {
orderMarkAsPaid(input: $input) {
userErrors {
field
message
}
order {
id
name
canMarkAsPaid
displayFinancialStatus
totalPrice
totalOutstandingSet {
shopMoney {
amount
currencyCode
}
}
transactions(first: 10) {
id
kind
status
amountSet {
shopMoney {
amount
currencyCode
}
}
gateway
createdAt
}
}
}
}
This mutation does not allow marking orders with the status authorized as paid. What should I do? Is there an alternative for this? @kyle_liu@KyleG-Shopify
When I try to mark an order with the status authorized as paid, I get the following message: “Order cannot be marked as paid.”