Oh, I see. The complete sentence is:
My father had finally agreed to buy a pet dog for me with a few conditions of course.
You can state it this way:
My father had finally agreed to buy a pet dog for me under a few conditions, of course.
However, it's not wrong to say:
My father had finally agreed to buy a pet dog for me on a few conditions, of course.
But, it sounds slightly strange to say:
My father had finally agreed to buy a pet dog for me with a few conditions, of course.