Creating composed services dynamically to meet the demand of every individual customer can be an inexpensive way for a service provider to differentiate itself from its competitors. Charging and billing systems are one of the key components supporting this business model. However, many existing charging and billing systems suffer from their time-consuming scheme 1 configuration process. This limits the flexibility of service providers to offer composed services. This paper proposes a framework named Accounting Logic Generator (ALG) that automates the generation and deployment of charging schemes for composed services. It processes a two-part charging scheme which contains rules that can be used to govern how the usage of a service is charged for when it is executed standalone, used in the context of a composed service, invoked within specific time intervals of interest or completed successfully in the context of composed service invocations where one or more other services fail. Furthermore, an approach that estimates service cost for the selection process of service composition is presented.