You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
The `setPaymentMethodAndPlaceOrder` mutation has been deprecated. Use the [setPaymentMethodOnCart]({{page.baseurl}}/graphql/mutations/set-payment-method.html) and [placeOrder]({{page.baseurl}}/graphql/mutations/place-order.html) mutations instead. You can run the two methods in the same call if your use case allows it.
12
+
10
13
The `setPaymentMethodAndPlaceOrder` mutation sets the cart payment method and converts the cart into an order. The
11
14
mutation returns the resulting order ID. You cannot manage orders with GraphQL, because orders are part of the backend.
12
15
You can use REST or SOAP calls to manage orders to their completion.
@@ -28,7 +31,7 @@ Perform the following actions before using the `setPaymentMethodAndPlaceOrder` m
Copy file name to clipboardExpand all lines: guides/v2.3/graphql/tutorials/checkout/checkout-payment-method.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ contributor_name: Atwix
14
14
contributor_link: https://www.atwix.com/
15
15
---
16
16
17
-
{:.bs-callout .bs-callout-tip}
17
+
{:.bs-callout-tip}
18
18
You must always set a payment method.
19
19
20
20
Use the following `cart` query to determine which payment methods which are available for your order.
@@ -23,7 +23,7 @@ Use the following `cart` query to determine which payment methods which are avai
23
23
24
24
**Request**
25
25
26
-
{:.bs-callout .bs-callout-info}
26
+
{:.bs-callout-info}
27
27
For logged-in customers, send the customer's authorization token in the `Authorization` parameter of the header. See ["Get customer authorization token"]({{ page.baseurl }}/graphql/get-customer-authorization-token.html) for more information.
28
28
29
29
```text
@@ -58,19 +58,19 @@ There are two mutation queries in GraphQl which can be use to set the payment me
58
58
59
59
|Mutation|Description|
60
60
|--- |--- |
61
-
|`setPaymentMethodOnCart`|Sets the payment method for your order|
62
-
|`setPaymentMethodAndPlaceOrder`|Sets the payment method and then immediately places your order. In this case ["Step 10. Place the order"]({{ page.baseurl }}/graphql/tutorials/checkout/checkout-place-order.html) can be skipped|
61
+
|`setPaymentMethodOnCart`|Sets the payment method for your order.|
62
+
|`setPaymentMethodAndPlaceOrder`|**Deprecated**Sets the payment method and then immediately places your order. In this case ["Step 10. Place the order"]({{ page.baseurl }}/graphql/tutorials/checkout/checkout-place-order.html) can be skipped.|
63
63
64
64
### Set payment method on cart {#setPaymentMethodOnCart}
65
65
66
66
Use the `setPaymentMethodOnCart` mutation to set the payment method for your order. The value `checkmo` ("Check / Money order" payment method code) was returned in the query.
67
67
68
68
**Request**
69
69
70
-
{:.bs-callout .bs-callout-info}
70
+
{:.bs-callout-info}
71
71
For logged-in customers, send the customer's authorization token in the `Authorization` parameter of the header. See ["Get customer authorization token"]({{ page.baseurl }}/graphql/get-customer-authorization-token.html) for more information.
72
72
73
-
```text
73
+
```graphql
74
74
mutation {
75
75
setPaymentMethodOnCart(input: {
76
76
cart_id: "{ CART_ID }"
@@ -109,9 +109,12 @@ If the operation is successful, the response contains the code of the selected p
109
109
110
110
Use the `setPaymentMethodAndPlaceOrder` mutation to set the payment method and place the order.
111
111
112
+
{:.bs-callout-warning}
113
+
The `setPaymentMethodAndPlaceOrder` mutation has been deprecated.
0 commit comments