Spread a layer of peanut butter on one slice of bread. Spread the other slice of bread with mayonnaise. Place a layer of thinly sliced onion on the peanut butter. Season as desired with salt and pepper. Place the other slice of bread mayonnaise-side down on top of the onions. Serve immediately.