Split extractApiKeyPayloads into two methods