# OnInpayment Event Fires when a device received credit. Syntax
    SiteKiosk.Plugins("SiteCash").OnInpayment = handler
Parameters
obj | DevInfoAdapter object that represents the device.
amount | Currency value that contains the amount.
Remarks The object that caused the event can be referenced in the event function using "this". When this event fires, Inpayment method must be called. Use the CurrencyFormatter object for currency functionality. Examples The following example deposits the amount when a device received credit.
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    SiteKiosk.Plugins("SiteCash").OnInpayment = OnInpayment;
    function OnInpayment(obj, amount)
    {
       SiteKiosk.Plugins("SiteCash").Inpayment(obj.ShortName, amount);
       alert("Deposit: " + amount);
    }
    </SCRIPT>
Applies to SiteKiosk v6.0 (and later versions). Back to top