Electricity

Electricity

Manages electricity bill payments.

Constructor

new Electricity()

Source:

Methods

(async, static) CheckStatus(transactionID)

Checks status of a previously submitted bill payment request. We make use of Rocket in Pocket callbacks for status updates. So this is largely implemented as a backup in case RIP callback systems fail.

Parameters:
Name Type Description
transactionID

Magic Batua transaction ID of the recharge request

Source:

(async, static) GetProviders()

Returns a list of all electricity providers supported by Rocket in Pocket API.

Source:

(async) Pay(creds, amount, extra)

Makes the bill payment of electricity connection.

In case of MSEDC - MAHARASHTRA provider, you must send billUnit and processingCycle information too through the optional extra parameter.

In case of Reliance Energy - MUMBAI provider, you must send cycleNumber information through the optional extra parameter.

In case of Torrent Power provider, you must send city name through the extra parameter.

Parameters:
Name Type Description
creds

Merchant credentials to access Rocket in Pocket API

amount

In Rupees. Must be exact due amount.

extra

Any optional parameters.

Source:

(async) Validate(creds, extra)

Returns the current due amount of the account. Since utility APIs, expect exact bill amount you must call this API before calling the payment API.

In case of MSEDC - MAHARASHTRA provider, you must send billUnit and processingCycle information too through the optional extra parameter.

In case of Reliance Energy - MUMBAI provider, you must send cycleNumber information through the optional extra parameter.

In case of Torrent Power provider, you must send city name through the extra parameter.

Parameters:
Name Type Description
creds

Merchant credentials to connect to Rocket in Pocket API

extra

Optional parameters only required for some parameters

Source: