Patent ID: 7558758

Claim:
A computer-implemented method of processing payments, comprising: receiving, at a policy engine from an executing application, a business event notification signifying that business processing of a transaction has reached a particular business stage; programmatically determining, by the policy engine responsive to the receiving, which of a plurality of payment-processing policies was previously selected, by a merchant for which the business processing of the transaction is processed by the executing application, to specify how to process a payment when using a payment method that is associated with this transaction, wherein: each of the payment-processing policies comprises a state transition specification for each of at least three phases of payment processing; and the state transition specifications for each of the phases specify: a desired state toward which the payment processing is progressing in that phase; a plurality of starting states for interim payment processing in that phase; for each of the starting states, at least two conditions comparing an existing payment amount already processed for the transaction to an amount of payment currently being processed for the transaction in this phase; and for each of the specified conditions, any actions that are to be carried out, when that starting state is applicable for the transaction and that condition is met, for progressing the payment processing toward the desired state; programmatically determining, by the policy engine, which of the at least three phases of payment processing is applicable to the received business event notification; and using, by the policy engine, the state transition specification for the programmatically-determined applicable phase in the programmatically-determined policy to process the payment using the payment method that is associated with this transaction, further comprising carrying out each of the any actions that are specified in a currently-applicable one of the starting states for interim payment processing in this programmatically-determined applicable phase in the programmatically-determined policy and for which the specified condition is met, wherein: the currently-applicable one of the starting states for interim payment processing comprises that one of the starting states matching a current state of the payment processing for the transaction; a plurality of the actions specified in each of the state transition specifications change the current state of the payment processing for the transaction; and at least one of the actions specified in each of the state transition specifications changes the current state of the payment processing for the transaction to the desired state for that state transition specification.