If you are using dried kidney beans, sort and rinse dried beans well, put them in a large bowl or pot. Add enough water to cover (about 3 cups) and soak beans overnight or for around 8 hours.
Rinse and drain beans, place beans and water to cover (about 6 cups) in a large pot to boil. Reduce heat and simmer for about 1 hour, or until beans are tender.
Drain beans and reserve 1/2 cup cooking liquid, set aside. Heat a large saucepan with oil on medium-high heat.
Add onion and cook until soft, about 4 minutes. Add garlic and ginger, cook for 30 seconds. Add green onions, tomatoes, coriander, cumin, turmeric, and thyme, stirring for 2 minutes.
Add beans, coconut milk, water or reserved liquid, Scotch bonnet pepper, and bring to a boil, reduce to simmer for about 15 minutes, or until sauce thickens.
Add salt to taste.