data-src=../../../../../includes/commerce-only.md
setNegotiableQuotePaymentMethod mutation
The setNegotiableQuotePaymentMethod mutation defines which payment method to apply to the cart. The negotiable quote must be in the UPDATED state to successfully apply the payment method.
Supported online payment methods include:
- Braintree
- Braintree Vault
- PayPal Express Checkout
- PayPal Payflow Link
- PayPal Payflow Pro
- PayPal Payflow Pro Vault
- PayPal Payments Advanced
- PayPal Website Payments Pro Hosted Solution
- Express Checkout for other PayPal solutions
The following offline payment methods are also supported:
Title
Code
Bank Transfer Payment
banktransferCash on Delivery
cashondeliveryCheck / Money order
checkmoNo Payment Information Required
freePurchase Order
purchaseorderThis mutation requires a valid customer authentication token.
Syntax
{
setNegotiableQuotePaymentMethod(
input: SetNegotiableQuotePaymentMethodInput!
): SetNegotiableQuotePaymentMethodOutput
}
Reference
The setNegotiableQuotePaymentMethod reference provides detailed information about the types and fields defined in this mutation.
Example usage
The following example sets the payment method .
Request:
mutation {
setNegotiableQuotePaymentMethod(
input: {
quote_uid: "xCA4wSZEHsb5QbFiKfoq5k1Dk8vIPBgb"
payment_method: { code: "checkmo" }
}
) {
quote {
uid
name
status
available_payment_methods {
code
title
}
selected_payment_method {
code
title
purchase_order_number
}
items {
product {
sku
name
}
}
}
}
}
Response:
{
"data": {
"setNegotiableQuotePaymentMethod": {
"quote": {
"uid": "xCA4wSZEHsb5QbFiKfoq5k1Dk8vIPBgb",
"name": "April 22 request",
"status": "UPDATED",
"available_payment_methods": [
{
"code": "checkmo",
"title": "Check / Money order"
}
],
"selected_payment_method": {
"code": "checkmo",
"title": "Check / Money order",
"purchase_order_number": null
}
}
}
}
}