# PE Device activation flow ```mermaid sequenceDiagram participant O as Ops participant M as Merchant participant D as Device participant W as PFWeb participant S as PFDevice loop while not connected D ->> S: attempts to connect note over D, S: deviceType (proximity,<br/> felix, pax...), deviceId... S ->> S: checks if device is activated alt activated D ->> D: looks for required information note over D: based on deviceType (terminalID for iOS and deviceCode for Felix...) loop no information configured O ->> W: configure merchant's gateway alt Ops has configured S ->> D: initializationData D ->> D: Tap2pay initialization D ->> S: inform that device is ready S -->> D: keeps websocket connection for purchase events else S ->> D: disconnects end end else not activated S ->> D: disconnects M ->> W: register the device using activation code shown on device end end ```