Review Cart

You can query for the cart’s information with the cart(id: "") node to see the payment requirements:

query cart($cartId: ID!) {
    cart(id: $cartId) {
        id
        buyerDetails {
            email
            companyName
        }
        items {
            id
            learnerDetails {
                email
                lastName
            }
            quantity
            subTotalAmount
        }
        price {
            subTotal
            taxes {
                type {
                    name
                    effectiveRate
                }
                totalAmount
            }
            payableTotal
        }
    }
}

Will result in:

{
    "data": {
        "cart": {
            "id": "T3Bwb3J0dW5pdHk6OTQ4",
            "buyerDetails": {
                "email": "test@example.com",
                "companyName": "UI Team"
            },
            "items": [
                {
                    "id": "T3Bwb3J0dW5pdHlJbnRlcmVzdDo5MTQ=",
                    "learnerDetails": [
                        {
                            "email": "san+test@administrate.co",
                            "lastName": "Smith"
                        }
                    ],
                    "quantity": 1,
                    "subTotalAmount": "150.00"
                }
            ],
            "price": {
                "subTotal": "150.00",
                "taxes": [
                    {
                        "type": {
                            "name": "UK VAT",
                            "effectiveRate": "20.00"
                        },
                        "totalAmount": "30.00"
                    }
                ],
                "payableTotal": "180.00"
            }
        }
    }
}

if payment is required issue a payment