Skip to main content

Configure your dev portal

Developer portal configuration

First, you need to add the monetisation object to your developer portal. You can copy and paste the following example.

Configure monetisation

dev-portal.json
"monetisation": {
"enabled": true,
"provider": "stripe",
"config" : {
"pricing_table_id" : "${environment.STRIPE_PRICING_TABLE_ID}",
"pub_key" : "${environment.STRIPE_PUB_KEY}",
"secret_key" : "${environment.STRIPE_SECRET_KEY}"
}
}

Configure plans

You now have to configure your plans linked to your stripe products. You can copy the following code and rename the plans as you wish. Do not forget to edit the value of the stripe_plan_id and put your product id from stripe.

dev-portal.json
"plans" : 
[
{
"id" : "free",
"name" : "Free Plan",
"daily" : 25,
"default" : true,
"monthly" : 500,
"throttling" : 5,
"description" : "Free plan",
"stripe_plan_id": "Stripe product id here"
},
{
"id" : "silver",
"name" : "Silver Plan",
"daily" : 200,
"default" : false,
"monthly" : 500,
"throttling" : 15,
"description" : "Silver plan",
"stripe_plan_id": "Stripe product id here"
},
{
"id" : "gold",
"name" : "Gold Plan",
"daily" : 500,
"default" : false,
"monthly" : 12500,
"throttling" : 50,
"description" : "Gold plan",
"stripe_plan_id": "Stripe product id here"
}
]