Port new chnages to PaymentPluginApi