Enhanced version of checkout process that supports multiple mode of payment(MOP).
Arguments
buyNow
BooleanThis indicates the type of cart to checkout.
cartCheckoutDetailRequestInput
CartCheckoutDetailRequestInputCheckout request schema which includes custom meta, merchant code, cart id, payment methods, address id, callback url, order type, billing address and card details.
cartType
StringThe type of cart.
Response
app_intercept_url
StringApp intercept url which is used to redirect on app after payment in confirmed/failed.
callback_url
StringCallback url to be redirected after payment received/failed.
cart
CheckCartCheckout cart detail respoonse schema includes cart id, delivery promise, items, comment, coupon text etc.
data
JSONData of the user cart checkout includes cart data, address, user id, order type etc.
message
StringMessage of the cart checkout API response.
order_id
StringOrder id generated after placing order.
payment_confirm_url
StringPayment confirm url used to redirect after payment is confirmed.
success
BooleanSuccess flag of cart checkout API response.
Mutation
1mutation checkoutCart(2 $buyNow: Boolean3 $cartCheckoutDetailRequestInput: CartCheckoutDetailRequestInput4 $cartType: String5) {6 checkoutCart(7 buyNow: $buyNow8 cartCheckoutDetailRequestInput: $cartCheckoutDetailRequestInput9 cartType: $cartType10 ) {11 app_intercept_url12 callback_url13 cart {14 buy_now15 cart_id16 checkout_mode17 cod_available18 cod_charges19 cod_message20 comment21 coupon_text22 delivery_charge_info23 custom_cart_meta24 delivery_charge_order_value25 delivery_charges26 error_message27 gstin28 id29 is_valid30 last_modified31 message32 order_id33 restrict_checkout34 store_code35 store_emps36 success37 uid38 user_type39 }40 data41 message42 order_id43 payment_confirm_url44 success45 }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": true39 }40}
Was this section helpful?