Is there an Android API for stop charging even though physically the charging is on?
AFAIK no.
Justification:
android.intent.action.BATTERY_CHANGED
is a protected intent that can only be sent by the system. Therefore you cannot duplicate or override the functionality.