Implement payment modification API

This implements:

- capture payment
- cancel payment
- refund payment
- cancel or refund payment