mutation

checkoutCart

Enhanced version of checkout process that supports multiple mode of payment(MOP).
Arguments
buyNow
Boolean
This indicates the type of cart to checkout.
cartCheckoutDetailRequestInput
CartCheckoutDetailRequestInput
Checkout request schema which includes custom meta, merchant code, cart id, payment methods, address id, callback url, order type, billing address and card details.
cartType
String
The type of cart.
Response
app_intercept_url
String
App intercept url which is used to redirect on app after payment in confirmed/failed.
callback_url
String
Callback url to be redirected after payment received/failed.
Checkout cart detail respoonse schema includes cart id, delivery promise, items, comment, coupon text etc.
data
JSON
Data of the user cart checkout includes cart data, address, user id, order type etc.
message
String
Message of the cart checkout API response.
order_id
String
Order id generated after placing order.
payment_confirm_url
String
Payment confirm url used to redirect after payment is confirmed.
success
Boolean
Success flag of cart checkout API response.
Mutation
1mutation checkoutCart(
2 $buyNow: Boolean
3 $cartCheckoutDetailRequestInput: CartCheckoutDetailRequestInput
4 $cartType: String
5) {
6 checkoutCart(
7 buyNow: $buyNow
8 cartCheckoutDetailRequestInput: $cartCheckoutDetailRequestInput
9 cartType: $cartType
10 ) {
11 app_intercept_url
12 callback_url
13 cart {
14 buy_now
15 cart_id
16 checkout_mode
17 cod_available
18 cod_charges
19 cod_message
20 comment
21 coupon_text
22 delivery_charge_info
23 custom_cart_meta
24 delivery_charge_order_value
25 delivery_charges
26 error_message
27 gstin
28 id
29 is_valid
30 last_modified
31 message
32 order_id
33 restrict_checkout
34 store_code
35 store_emps
36 success
37 uid
38 user_type
39 }
40 data
41 message
42 order_id
43 payment_confirm_url
44 success
45 }
46}
Try it
Input Variables
1{
2 "buyNow": true,
3 "cartCheckoutDetailRequestInput": {
4 "address_id": "address_id",
5 "aggregator": "aggregator",
6 "billing_address": {},
7 "billing_address_id": "billing_address_id",
8 "callback_url": "callback_url",
9 "cart_id": "cart_id",
10 "custom_meta": {},
11 "customer_details": {
12 "email": "[email protected]",
13 "mobile": "mobile",
14 "name": "A name"
15 },
16 "delivery_address": {},
17 "extra_meta": {},
18 "id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",
19 "iin": "iin",
20 "merchant_code": "merchant_code",
21 "meta": {},
22 "network": "network",
23 "order_type": "order_type",
24 "ordering_store": 42,
25 "payment_auto_confirm": true,
26 "payment_identifier": "payment_identifier",
27 "payment_methods": [
28 {
29 "amount": 30.7,
30 "mode": "mode",
31 "name": "A name",
32 "payment": "payment",
33 "payment_extra_identifiers": {},
34 "payment_meta": {
35 "merchant_code": "merchant_code",
36 "payment_gateway": "payment_gateway",
37 "payment_identifier": "payment_identifier",
38 "type": "type"
39 }
40 }
41 ],
42 "payment_mode": "payment_mode",
43 "payment_params": {},
44 "staff": {
45 "_id": "_id",
46 "employee_code": "employee_code",
47 "first_name": "first_name",
48 "last_name": "last_name",
49 "user": "user"
50 },
51 "type": "type"
52 },
53 "cartType": "cartType"
54}
Response
1{
2 "checkoutCart": {
3 "app_intercept_url": "app_intercept_url",
4 "callback_url": "callback_url",
5 "cart": {
6 "buy_now": true,
7 "cart_id": 42,
8 "checkout_mode": "checkout_mode",
9 "cod_available": true,
10 "cod_charges": 42,
11 "cod_message": "cod_message",
12 "comment": "comment",
13 "coupon_text": "coupon_text",
14 "delivery_charge_info": "delivery_charge_info",
15 "custom_cart_meta": {},
16 "delivery_charge_order_value": 42,
17 "delivery_charges": 42,
18 "error_message": "error_message",
19 "gstin": "gstin",
20 "id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",
21 "is_valid": true,
22 "last_modified": "last_modified",
23 "message": "message",
24 "order_id": "order_id",
25 "restrict_checkout": true,
26 "store_code": "store_code",
27 "store_emps": [
28 {}
29 ],
30 "success": true,
31 "uid": "uid",
32 "user_type": "user_type"
33 },
34 "data": {},
35 "message": "message",
36 "order_id": "order_id",
37 "payment_confirm_url": "payment_confirm_url",
38 "success": true
39 }
40}