syncPaymentOrder mutation
This mutation is available only if you have installed Payment Services for Adobe Commerce 2.3.0 or higher.
The syncPaymentOrder mutation synchronizes the payment order details for the PayPal Smart Buttons and Apple Pay payment methods. This mutation updates the quote with the shipping, billing, email, and phone number details. It returns a Boolean value indicating whether the synchronization was successful.
You must run this mutation after running the createPaymentOrder mutation.
Syntax
Copied to your clipboardmutation {syncPaymentOrder(input: syncPaymentOrderInput!)}
Reference
The syncPaymentOrder reference provides detailed information about the types and fields defined in this mutation.
Example usage
The following example runs the syncPaymentOrder mutation.
Request:
Copied to your clipboardmutation {syncPaymentOrder(input: {cartId: "AJCY8dhIfuch9LcDHAxEkw7oG3DjGdKt"id: "8J864634M9466143S"})}
Response:
Copied to your clipboard{"data": {"syncPaymentOrder": true}}
Input attributes
The SyncPaymentOrderInput object must contain the following input attributes:
| Attribute | Data Type | Description |
|---|---|---|
cartId | String! | The unique ID of the cart |
id | String! | The unique order ID generated by PayPal |

