completeOrder
completeOrder is a Magento 2 GraphQL mutation in the PaymentServicesPaypal module. Synchronizes order details and place the order. It returns PlaceOrderOutput and requires an Authorization header (Bearer customer token).
Last verified: against Magento 2.4.9.
Returns
Resolver class
\Magento\PaymentServicesPaypalGraphQl\Model\Resolver\CompleteOrderResolver
Arguments
Describes the variables needed to complete or place the order
Example request
Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.
Headers
Query
mutation {
completeOrder {
order {
order_number
order_id
}
orderV2 {
gift_message {
to
from
message
}
id
order_date
status
number
items {
gift_message { ... }
id
product_name
product_sku
product_url_key
product_type
status
product_sale_price { ... }
discounts { ... }
selected_options { ... }
entered_options { ... }
quantity_ordered
quantity_shipped
quantity_refunded
quantity_invoiced
quantity_canceled
quantity_returned
product { ... }
prices { ... }
}
total {
subtotal { ... }
discounts { ... }
total_tax { ... }
taxes { ... }
grand_total { ... }
base_grand_total { ... }
total_shipping { ... }
shipping_handling { ... }
subtotal_incl_tax { ... }
subtotal_excl_tax { ... }
grand_total_excl_tax { ... }
}
invoices {
id
number
total { ... }
items { ... }
comments { ... }
}
shipments {
id
number
tracking { ... }
items { ... }
comments { ... }
}
credit_memos {
id
number
items { ... }
total { ... }
comments { ... }
}
payment_methods {
name
type
additional_data { ... }
}
shipping_address {
firstname
lastname
middlename
region
region_id
country_code
street
company
telephone
fax
postcode
city
prefix
suffix
vat_id
}
billing_address {
firstname
lastname
middlename
region
region_id
country_code
street
company
telephone
fax
postcode
city
prefix
suffix
vat_id
}
carrier
shipping_method
comments {
timestamp
message
}
increment_id
order_number
created_at
grand_total
token
applied_coupons {
code
}
email
is_virtual
available_actions
customer_info {
firstname
lastname
middlename
prefix
suffix
}
order_status_change_date
}
errors {
message
code
}
}
}Variables
{}Related in PaymentServicesPaypalGraphQl
Other fields shipped by the same module.
addProductsToNewCart
Creates a new cart and add any type of product to it
PaymentServicesPaypal · returns AddProductsToNewCartOutput
createPaymentOrder
Creates a payment order for further payment processing
PaymentServicesPaypal · returns CreatePaymentOrderOutput
createVaultCardPaymentToken
Creates a vault payment token
PaymentServicesPaypal · returns CreateVaultCardPaymentTokenOutput
createVaultCardSetupToken
Creates a vault card setup token
PaymentServicesPaypal · returns CreateVaultCardSetupTokenOutput
getPaymentConfig
Retrieves the payment configuration for a given location
PaymentServicesPaypal · returns PaymentConfigOutput
getPaymentOrder
Retrieves the payment details for the order
PaymentServicesPaypal · returns PaymentOrderOutput
Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.