You can redeem a game code on your PlayStation4 by following these instructions.
  1. Open a PlayStation Network (PSN) account (or use your existing PSN account).
  2. Select the PlayStationStore icon on the PS4™ system home screen.
  3. On PlayStationStore, select Redeem Codes at the bottom of the menu.
  4. Enter the code.
  5. Once the code has been entered correctly, select Continue on the dialog box.
  6. Select Confirm to accept the Terms of Service.
  7. Select Continue to complete code redemption.