402 Payment Required

When a request is made via crossbar and this request is updating a quantity from the services (Ex: Adding a device, a user ...).

Format

Note: "activation_charges" is the total for all category / items.

{
    "data": {
        "{CATEGORY}": {
            "{ITEM}": {
                "category": "{CATEGORY}",
                "item": "{ITEM}",
                "quantity": 1,
                "rate": 2.0,
                "single_discount": true,
                "single_discount_rate": 0.0,
                "cumulative_discount": 0,
                "cumulative_discount_rate": 0.0,
                "activation_charges": 1.0
            }
        },
        "activation_charges": 1.0
    },
    "error": "402",
    "message": "accept charges",
    "status": "error"
}

Ex:

{
    "data": {
        "ui_apps": {
            "numbers": {
                "category": "ui_apps",
                "item": "numbers",
                "quantity": 1,
                "rate": 2.0,
                "single_discount": false,
                "single_discount_rate": 0.0,
                "cumulative_discount": 0,
                "cumulative_discount_rate": 0.0,
                "activation_charges": 1.0
            },
            "accounts": {
                "category": "ui_apps",
                "item": "accounts",
                "quantity": 1,
                "rate": 5.0,
                "single_discount": false,
                "single_discount_rate": 0.0,
                "cumulative_discount": 0,
                "cumulative_discount_rate": 0.0,
                "activation_charges": 4.0
            }
        },
        "activation_charges": 5.0
    },
    "error": "402",
    "message": "accept charges",
    "status": "error"
}

Edit this page here