The recharge plans API is something very crucial if your website or the app provides an online recharge service. The API is normally called browse plan API or it is also known as mobile operator plan offer finder API. DataYuge provides a daily updated recharge plan API which all the offers are daily updated, unlike the other providers. Using the free API, the developer can implement the recharge plan API on the website. This recharge plans API is totally a free solution without any limitation. However, you can see the premium plan if you wanted a completely white labelled browse plan API solution with technical assistance.
Step 1 – Obtain the recharge plans API key
DataYuge’s browse plan API works by sending a request to the secure server using an API key parameter in the URL. The developer has to obtain a free API key or a premium key by contacting DataYuge team.
After obtaining the API key, the developer can start integrating the API into the web/mobile apps. The API looks something like this.
Please note that the API key used in the above browse plan API is a dummy key. You have to obtain a valid key to use them.
This is the sample code for accessing the mobile plans API on your website. The sample code is written using basic HTML and PHP. You are welcome to modify the code as you need and implement on your website. Commenting is done for basic code readability. You can ask in comments if something you didn’t understand.
First, create a “plans.css” using the following code, which will the be CSS for the HTML page.
Now create another file and name it as “plans.php” with the following code.
This will look something like
Now you have implemented the plans API. Similarly DataYuge providers API for DTH recharge Plans and Data card recharge plans. The more details about this browse plans API can be found here. Also please check out the MNP lookup API where the operator and circle of MNP (ported numbers) can be found.