Insurance Payment Automater
Most companies have some sort of automatic payment system. You can set up a recurring payment, or you can set up a one-time payment. Unfortunately, my insurance provider does not have this option. So I decided to write a script that would automate the process for me.
Overview
TL;DR — The insurance provider I use unfortunately provides no automatic payment methods. So I decided to write a script that would automate the process for me.
from selenium import webdriver
driver = webdriver.Chrome('../chromedriver')
driver.get('YOUR INSURANCE PROVIDER WEBSITE')
driver.find_element_by_id('rdoPolicyNum').click()
driver.find_element_by_id('MainContent_txtPolicyNumAlpha').send_keys('NAC')
driver.find_element_by_id('MainContent_txtPolicyNum').send_keys("YOUR POLICY NUMBER")
driver.find_element_by_id('MainContent_txtZip').send_keys("95762")
driver.find_element_by_id('loginButton').click()
driver.implicitly_wait(10)
driver.find_element_by_id('MainContent_makeAPaymentButton').click()
driver.implicitly_wait(10)
driver.switch_to.window(driver.window_handles[1])
driver.find_element_by_name('EWF_ENTRY_CC Number').send_keys('YOUR CARD NUMBER')
driver.find_element_by_name('EWF_ENTRY_ExpDate1').send_keys('YOUR CARD EXPIRATION MONTH')
driver.find_element_by_name('EWF_ENTRY_ExpDate2').send_keys('YOUR CARD EXPIRATION YEAR')
driver.find_element_by_css_selector("input[value='MinPay']").click()
print('Bill Successfully Paid')
Overview
This will log into the insurance provider's website, navigate to the payment page, and enter your credit card information. It will then select the minimum payment option and submit the payment.
How to Use
- Download the script and the [chromedriver](https://chromedriver.chromium.org/downloads) for your version of chrome.
- Install the selenium package with `pip install selenium`
- Open the script and replace the following with your information:
1. `YOUR INSURANCE PROVIDER WEBSITE`
2. `YOUR POLICY NUMBER`
3. `YOUR CARD NUMBER`
4. `YOUR CARD EXPIRATION MONTH`
5. `YOUR CARD EXPIRATION YEAR`
- Run the script with `python3 insurance.py`
Notes
This script is written in python3.
Future Improvements
Add confirmation that the payment was successful or failure. Add support for email. This would allow the script to send an email to the user if the payment was successful or not.