Heat the oil in a large frying pan. Add the onion and fry for 5 minutes until softened. Add the red pepper, carrot, potato and garlic, if using, and fry for 5 minutes. Stir in the mixed Cajun spice, tomatoes, sugar, stock and plenty of salt and pepper and bring to the boil.
Add the drained beans and mix together. Bring to the boil, then cover and simmer for 45 minutes until the vegetables are tender.
Add the sliced green vegetables, re-cover and cook for 5 minutes until just cooked. Ladle the soup into bowls and serve with crusty bread.