How to add custom metered usage items in IBM Marketplace (AppDirect)

161 Views Asked by At

I am trying to do a full integration of a solution into IBM Marketplace. (The one using AppDirect). There are many metering items available (Users, MBs, ...) but I can use none of them. Let's say, for example, we use "Places". I have checked the option "Allow custom metered usage" but that won't allow me to add this "Places" metering item in my pricing option. How can I achieve this?

Note: IBM has discontinued it's Marketplace. Probably this question is of no use anymore but I decided not to delete it as we never know if they will enable it back. Also... before the discontinuation announce, I manage to get a reply from IBM stating that they don't allow the custom unit types and I was invited to use the generic "Item".

1

There are 1 best solutions below

3
And1 On

If you are billing a custom usage unit, the request looks like:

{
    "account": {
        "accountIdentifier": "{UUID}"
    },
    "items": [{
        "quantity": 5,
        "customUnit": "Places",
        "price": 2.99,
        "description": "some cool places"
    }]
}

Custom units use a different field name than the predefined "units"- I'm not sure which error you were getting back when attempting to bill usage, but that might explain the error if you were getting back a dump of expected unit values.