Thank you for the question. Unfortunately this ticket can not be bought online. The only thing you can buy online which also works for public transportation is the Budapest Card, but in most situations you will only receive this once you arrive to your hotel (you buy it online and then the company will deliver them to your hotel so they will wait for you there as you arrive). If you want more information and order the Budapest Card, you can do so here. The one week transportation card can only be bought at larger metro stations around in Budapest.
You will find several other similar questions and answers here.
Ask your Budapest question!