*Timed* phone charger

So I'm starting a project where a phone will start charging only after a box is closed for fifteen minutes, else the 'timer' resets and phone doesn't charge until box is closed again. I'm not sure how to go about this... Any advice on where to start / how to hook up a phone charging output to a timer? Thanks!

You need a sensor that tells you when the box is open and when not.
Then 15 mins after the box is closed continuously send signal to charger.
Should be pretty simple to implement using the millis() timer. Record the millis() when the box closes, then 900,000 ms later start the charging. Reset when the box is opened again.

a sensor, a relay, an arduino UNO and the following code.

const byte BoxOpenSensorPin = 4;//physical pin 6, Atmel PD4
const byte ActivateChargerPin = 8;//physical pin 14, Atmel PB0

byte timerStart = 0;
unsigned long chargerDelayTimestamp;

void setup() {
  // put your setup code here, to run once:
  pinMode(ActivateChargerPin, OUTPUT);
  digitalWrite(ActivateChargerPin, LOW);// Charger is off while ActivateChargerPin is LOW
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(ActivateChargerPin, (startCharger()) ? HIGH : LOW);
}

bool startCharger() {
  byte timerStart = 0;
  int pinState = digitalRead(BoxOpenSensorPin);
  if (pinState == HIGH) { // lid is closed
    if (timerStart == 0) { //first time lid deteced closed
      chargerDelayTimestamp = millis();
      timerStart = 1;
      return false;
    }
    else if (timerStart > 0) { //lid already detected closed
      if (millis() - chargerDelayTimestamp >= 900000UL) { // 15 minutes has passed
        return true;
      }
      else return false;
    }
    else return false;
  }
  else { // lid detected open
    return false;
    timerStart = 0;
  }
}