add cached payment cost calculation