mutation

selectPaymentMode

Select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction.
Arguments
buyNow
Boolean
Whether to get buy_now cart.
The unique identifier of the cart.
updateCartPaymentRequestInput
UpdateCartPaymentRequestInput
Update cart payment mode request schema to update the payment mode by which the payment is to be done to process the order, including cart id, payment identifier, address id, merchant code, aggregator name and payment mode.
Response
applied_promo_details
[AppliedPromotion]
List of applied promotions data to cart which includes promotion id, promotion name, offer text, description, buy rules, discount rules and promotion type.
breakup_values
CartBreakup
Price breakup of cart which denotes different values like coupon, display, and loyalty points.
buy_now
Boolean
Buy now flag for the cart which denotes user is doing fast checkout for the cart using buy now.
cart_id
Int
Unique identifier of the user cart.
checkout_mode
String
Checkout mode of user cart.
comment
String
Comment message to be added in user cart.
Coupon data of user cart which denotes if coupon is applied, coupon code, coupon amount, coupon title and coupon message.
common_config
CartCommonConfig
Common config at sales channel which includes delivery charge config.
coupon_text
String
Coupon text of coupon applied on cart.
currency
CartCurrency
Currency of the price for the cart.
delivery_charge_info
String
Delivery charge in information message on shipment.
delivery_promise
DeliveryPromiseResponse
Delivery promise of user cart.
gstin
String
GSTIN added in user cart.
Unique identifier of the user cart.
is_valid
Boolean
Cart validity flag determines the if the response is valid or not.
Items data list in user cart that includes item id, item size, store id, available sizes and rest of the item related data.
last_modified
String
Last modified timestamp of cart.
message
String
Message of the get cart detail API response.
notification
JSON
Notification object which denotes notification data for user cart.
pan_config
JSON
Pan card config states at what condition user should enter the pan card.
pan_no
String
Permanent Account Number of the user.
payment_selection_lock
PaymentSelectionLock
Payment selection lock config for the user cart.
restrict_checkout
Boolean
Restrict checkout flag to restrict the checkout process.
staff_user_id
String
Staff employee user id if cart is created by staff employee for the customer.
success
Boolean
Success flag of get cart detail API response.
Unique identifier of the user cart.
custom_cart_meta
JSON
Metadata for custom cart
Mutation
1mutation selectPaymentMode(
2 $buyNow: Boolean
3 $id: String
4 $updateCartPaymentRequestInput: UpdateCartPaymentRequestInput
5) {
6 selectPaymentMode(
7 buyNow: $buyNow
8 id: $id
9 updateCartPaymentRequestInput: $updateCartPaymentRequestInput
10 ) {
11 applied_promo_details {
12 amount
13 article_quantity
14 code
15 meta
16 mrp_promotion
17 offer_text
18 promo_id
19 promotion_group
20 promotion_name
21 promotion_type
22 cancellation_allowed
23 }
24 buy_now
25 cart_id
26 checkout_mode
27 comment
28 coupon {
29 cashback_amount
30 cashback_message_primary
31 cashback_message_secondary
32 coupon_code
33 coupon_description
34 coupon_id
35 coupon_subtitle
36 coupon_title
37 coupon_type
38 coupon_value
39 discount
40 is_applied
41 is_valid
42 maximum_discount_value
43 message
44 minimum_cart_value
45 }
46 coupon_text
47 currency {
48 code
49 symbol
50 }
51 delivery_charge_info
52 gstin
53 id
54 is_valid
55 items {
56 coupon_message
57 custom_order
58 discount
59 is_set
60 key
61 message
62 moq
63 parent_item_identifiers
64 product_ean_id
65 quantity
66 bulk_offer
67 }
68 last_modified
69 message
70 notification
71 pan_config
72 pan_no
73 payment_selection_lock {
74 default_options
75 enabled
76 payment_identifier
77 }
78 restrict_checkout
79 staff_user_id
80 success
81 uid
82 custom_cart_meta
83 }
84}
Try it
Input Variables
1{
2 "buyNow": true,
3 "id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",
4 "updateCartPaymentRequestInput": {
5 "address_id": "address_id",
6 "aggregator_name": "aggregator_name",
7 "id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",
8 "merchant_code": "merchant_code",
9 "payment_identifier": "payment_identifier",
10 "payment_mode": "payment_mode"
11 }
12}
Response
1{
2 "selectPaymentMode": {
3 "applied_promo_details": [
4 {
5 "amount": 30.7,
6 "article_quantity": 42,
7 "code": "code",
8 "meta": {},
9 "mrp_promotion": true,
10 "offer_text": "offer_text",
11 "promo_id": "promo_id",
12 "promotion_group": "promotion_group",
13 "promotion_name": "promotion_name",
14 "promotion_type": "promotion_type",
15 "cancellation_allowed": true
16 }
17 ],
18 "buy_now": true,
19 "cart_id": 42,
20 "checkout_mode": "checkout_mode",
21 "comment": "comment",
22 "coupon": {
23 "cashback_amount": 30.7,
24 "cashback_message_primary": "cashback_message_primary",
25 "cashback_message_secondary": "cashback_message_secondary",
26 "coupon_code": "coupon_code",
27 "coupon_description": "coupon_description",
28 "coupon_id": "coupon_id",
29 "coupon_subtitle": "coupon_subtitle",
30 "coupon_title": "coupon_title",
31 "coupon_type": "coupon_type",
32 "coupon_value": 30.7,
33 "discount": 30.7,
34 "is_applied": true,
35 "is_valid": true,
36 "maximum_discount_value": 30.7,
37 "message": "message",
38 "minimum_cart_value": 30.7
39 },
40 "coupon_text": "coupon_text",
41 "currency": {
42 "code": "code",
43 "symbol": "symbol"
44 },
45 "delivery_charge_info": "delivery_charge_info",
46 "gstin": "gstin",
47 "id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",
48 "is_valid": true,
49 "items": [
50 {
51 "coupon_message": "coupon_message",
52 "custom_order": {},
53 "discount": "discount",
54 "is_set": true,
55 "key": "key",
56 "message": "message",
57 "moq": {},
58 "parent_item_identifiers": {},
59 "product_ean_id": "product_ean_id",
60 "quantity": 42,
61 "bulk_offer": {}
62 }
63 ],
64 "last_modified": "last_modified",
65 "message": "message",
66 "notification": {},
67 "pan_config": {},
68 "pan_no": "pan_no",
69 "payment_selection_lock": {
70 "default_options": "default_options",
71 "enabled": true,
72 "payment_identifier": "payment_identifier"
73 },
74 "restrict_checkout": true,
75 "staff_user_id": "staff_user_id",
76 "success": true,
77 "uid": "uid",
78 "custom_cart_meta": {}
79 }
80}